Commit 8b8498ce authored by Qiheng Lin's avatar Qiheng Lin Committed by sanglipeng
Browse files

s390/dasd: Fix potential memleak in dasd_eckd_init()

stable inclusion
from stable-v5.10.173
commit a50e28d433acf22258f9f34831057387f04ef074
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a50e28d433acf22258f9f34831057387f04ef074



--------------------------------

[ Upstream commit 460e9bed ]

`dasd_reserve_req` is allocated before `dasd_vol_info_req`, and it
also needs to be freed before the error returns, just like the other
cases in this function.

Fixes: 9e12e54c ("s390/dasd: Handle out-of-space constraint")
Signed-off-by: default avatarQiheng Lin <linqiheng@huawei.com>
Link: https://lore.kernel.org/r/20221208133809.16796-1-linqiheng@huawei.com


Signed-off-by: default avatarStefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20230210000253.1644903-3-sth@linux.ibm.com


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