linux-uconsole/drivers/s390/block
Stefan Haberland 729a7f5e41 s390/dasd: fix memleak in path handling error case
[ Upstream commit 00b39f698a ]

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:17:22 +01:00
..
dasd.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2018-08-13 19:07:17 -07:00
dasd_3990_erp.c
dasd_alias.c s390/dasd: fix endless loop after read unit address configuration 2019-08-06 19:06:55 +02:00
dasd_devmap.c s390/dasd,zfcp: fix gcc 8 stringop-truncation warnings 2018-07-02 11:24:52 +02:00
dasd_diag.c s390/dasd: move dasd_ccw_req to per request data 2018-06-12 15:14:19 +02:00
dasd_diag.h
dasd_eckd.c s390/dasd: fix memleak in path handling error case 2020-01-12 12:17:22 +01:00
dasd_eckd.h
dasd_eer.c s390/dasd,zfcp: fix gcc 8 stringop-truncation warnings 2018-07-02 11:24:52 +02:00
dasd_erp.c
dasd_fba.c s390/dasd: move dasd_ccw_req to per request data 2018-06-12 15:14:19 +02:00
dasd_fba.h
dasd_genhd.c
dasd_int.h s390/dasd: reduce the default queue depth and nr of hardware queues 2018-07-02 11:22:41 +02:00
dasd_ioctl.c
dasd_proc.c proc: introduce proc_create_seq{,_data} 2018-05-16 07:23:35 +02:00
dcssblk.c s390, dcssblk: kaddr and pfn can be NULL to ->direct_access() 2018-07-30 09:33:03 -07:00
Kconfig
Makefile
scm_blk.c s390/scm_blk: correct numa_node in scm_blk_dev_setup 2018-07-02 11:24:48 +02:00
scm_blk.h
scm_drv.c
xpram.c