Commit 8e64d23
s390/dasd: fix error checks in dasd_copy_pair_store()
dasd_add_busid() can return an error via ERR_PTR() if an allocation
fails. However, two callsites in dasd_copy_pair_store() do not check
the result, potentially resulting in a NULL pointer dereference. Fix
this by checking the result with IS_ERR() and returning the error up
the stack.
Fixes: a91ff09 ("s390/dasd: add copy pair setup")
Signed-off-by: Carlos López <[email protected]>
Signed-off-by: Stefan Haberland <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 1f5a333 commit 8e64d23
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2248 | 2248 | | |
2249 | 2249 | | |
2250 | 2250 | | |
2251 | | - | |
| 2251 | + | |
2252 | 2252 | | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
2253 | 2256 | | |
2254 | 2257 | | |
2255 | 2258 | | |
2256 | | - | |
| 2259 | + | |
2257 | 2260 | | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
2258 | 2264 | | |
2259 | 2265 | | |
2260 | 2266 | | |
| |||
0 commit comments