Commit e511167e authored by Carlos López's avatar Carlos López Committed by Greg Kroah-Hartman
Browse files

s390/dasd: fix error checks in dasd_copy_pair_store()



[ Upstream commit 8e64d235 ]

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: a91ff09d ("s390/dasd: add copy pair setup")
Signed-off-by: default avatarCarlos López <clopez@suse.de>
Signed-off-by: default avatarStefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20240715112434.2111291-3-sth@linux.ibm.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 145bc128
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment