linux/drivers/s390
Jan Höppner 9f9d53e5bd s390/dasd: Fix locking issue when changing RO attribute
The function dasd_ro_store() calls set_disk_ro() to set the device in
question read-only. Since set_disk_ro() might sleep, we can't call it
while holding a lock. However, we also can't simply check if the device,
block, and gdp references are valid before we call set_disk_ro() because
an offline processing might have been started in the meanwhile which
will destroy those references.

In order to reliably call set_disk_ro() we have to ensure several
things:

- Still check validity of the mentioned references but additionally
  check if offline processing is running and bail out accordingly. Also,
  do this while holding the device lock.
- To ensure that the block device is still safe after the lock, increase
  the open_count while still holding the device lock.

Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2016-10-28 10:09:04 +02:00
..
block s390/dasd: Fix locking issue when changing RO attribute 2016-10-28 10:09:04 +02:00
char Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-10-04 14:05:52 -07:00
cio s390/cio: clean up DEV_STATE_SENSE_PGID 2016-10-28 10:09:03 +02:00
crypto s390/zcrypt: fix possible memory leak in ap_module_init() 2016-07-31 06:10:41 -04:00
net s390/qeth: fix setting VIPA address 2016-09-16 04:29:14 -04:00
scsi scsi: zfcp: spin_lock_irqsave() is not nestable 2016-10-14 16:21:08 -04:00
virtio virtio/s390: deprecate old transport 2016-08-09 13:42:41 +03:00
Makefile virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio 2015-07-07 14:27:06 +03:00