Commit d0ea4c6
linux/zvol_os: don't try to set disk ops if alloc fails
If the kernel fails to allocate the gendisk, zvo_disk will be NULL, and
derefencing it will explode. So don't do that.
Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #173961 parent 023a432 commit d0ea4c6
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
| 1398 | + | |
| 1399 | + | |
1398 | 1400 | | |
1399 | 1401 | | |
1400 | 1402 | | |
| 1403 | + | |
| 1404 | + | |
1401 | 1405 | | |
1402 | 1406 | | |
1403 | | - | |
1404 | | - | |
1405 | 1407 | | |
1406 | 1408 | | |
1407 | 1409 | | |
| |||
0 commit comments