s390/dasd: fix double free in dasd_eckd_read_conf
authorStefan Haberland <stefan.haberland@de.ibm.com>
Thu, 15 Oct 2015 09:10:08 +0000 (11:10 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 3 Nov 2015 13:40:44 +0000 (14:40 +0100)
commitc7c0c9deb0a4b0715d2c09438420437b86f387c4
tree9144935f736ed2457fe09a12d0305b26eed1d98a
parent55a423b6f105fa323168f15f4bb67f23b21da44e
s390/dasd: fix double free in dasd_eckd_read_conf

The configuration data is stored per path and also the first valid
configuration data per device. When dasd_eckd_read_conf is called
again after a path got lost the device configuration data is cleared
but possibly not the per path configuration data. This might lead to a
double free when the lost path gets operational again.

Fix by clearing all per path configuration data when the first valid
configuration data is received and stored.

Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd_eckd.c