linux-brain/drivers/s390
Stefan Haberland 66aa3bf42c s390/dasd: fix memleak in path handling error case
[ Upstream commit 00b39f698a4f1ee897227cace2e3937fc4412270 ]

If for whatever reason the dasd_eckd_check_characteristics() function
exits after at least some paths have their configuration data
allocated those data is never freed again. In the error case the
device->private pointer is set to NULL and dasd_eckd_uncheck_device()
will exit without freeing the path data because of this NULL pointer.

Fix by calling dasd_eckd_clear_conf_data() for error cases.

Also use dasd_eckd_clear_conf_data() in dasd_eckd_uncheck_device()
to avoid code duplication.

Reported-by: Qian Cai <cai@lca.pw>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-12 12:12:00 +01:00
..
block s390/dasd: fix memleak in path handling error case 2020-01-12 12:12:00 +01:00
char s390/3270: fix lockdep false positive on view->lock 2019-05-16 19:42:21 +02:00
cio s390/dasd/cio: Interpret ccw_device_get_mdc return value correctly 2020-01-12 12:12:00 +01:00
crypto s390/zcrypt: handle new reply code FILTERED_BY_HYPERVISOR 2020-01-04 13:59:54 +01:00
net s390/qeth: invoke softirqs after napi_schedule() 2019-11-20 18:00:04 +01:00
scsi scsi: zfcp: trace channel log even for FCP command responses 2019-12-17 20:39:47 +01:00
virtio s390/virtio: handle find on invalid queue gracefully 2019-03-23 14:35:20 +01:00
Makefile virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio 2015-07-07 14:27:06 +03:00