]> git.itanic.dy.fi Git - linux-stable/commit
s390/dasd: fix kernel panic when alias is set offline
authorStefan Haberland <stefan.haberland@de.ibm.com>
Fri, 10 Jul 2015 08:47:09 +0000 (10:47 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 13 Jul 2015 09:02:14 +0000 (11:02 +0200)
commitf81a49d13b3014c2b7c424628779a8af93f25c04
tree5acd89ff363fcf1f1da4b082a798aed0709f5efe
parentf9c87a6f46d508eae0d9ae640be98d50f237f827
s390/dasd: fix kernel panic when alias is set offline

The dasd device driver selects which (alias or base) device is used
for a given requests when the request is build. If the chosen alias
device is set offline before the request gets queued to the device
queue the starting function may use device structures that are
already freed. This might lead to a hanging offline process or a
kernel panic.

Add a check to the starting function that returns the request to the
upper layer if the device is already in offline processing.

In addition to that prevent that an alias device that's already in
offline processing gets chosen as start device.

Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Peter Oberparleiter <peter.oberparleiter@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.c
drivers/s390/block/dasd_alias.c