1
linux/drivers/s390/block
Stefan Weinhuber 65f8da4759 [S390] dasd: fix race between open and offline
The dasd_open function uses the private_data pointer of the gendisk to
find the dasd_block structure that matches the gendisk. When a DASD
device is set offline, we set the private_data pointer of the gendisk
to NULL and later remove the dasd_block structure, but there is still
a small race window, in which dasd_open could first read a pointer
from the private_data field and then try to use it, after the structure
has already been freed.
To close this race window, we will store a pointer to the dasd_devmap
structure of the base device in the private_data field. The devmap
entries are not deleted, and we already have proper locking and
reference counting in place, so that we can safely get from a devmap
pointer to the dasd_device and dasd_block structures of the device.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2011-04-20 10:15:43 +02:00
..
dasd_3990_erp.c Fix common misspellings 2011-03-31 11:26:23 -03:00
dasd_alias.c [S390] dasd: prevent panic with unresumed devices 2011-01-31 11:30:20 +01:00
dasd_devmap.c [S390] dasd: fix race between open and offline 2011-04-20 10:15:43 +02:00
dasd_diag.c [S390] dasd: do path verification for paths added at runtime 2011-01-05 12:47:30 +01:00
dasd_diag.h [S390] cleanup lowcore access from external interrupts 2010-10-25 16:10:19 +02:00
dasd_eckd.c Fix common misspellings 2011-03-31 11:26:23 -03:00
dasd_eckd.h [S390] dasd: Add support for raw ECKD access. 2011-01-05 12:47:30 +01:00
dasd_eer.c [S390] dasd: Improve handling of stolen DASD reservation 2011-01-05 12:47:30 +01:00
dasd_erp.c [S390] dasd: do path verification for paths added at runtime 2011-01-05 12:47:30 +01:00
dasd_fba.c [S390] ccw_driver: remove duplicate members 2011-03-23 10:15:59 +01:00
dasd_fba.h
dasd_genhd.c [S390] dasd: fix race between open and offline 2011-04-20 10:15:43 +02:00
dasd_int.h [S390] dasd: fix race between open and offline 2011-04-20 10:15:43 +02:00
dasd_ioctl.c [S390] dasd: fix race between open and offline 2011-04-20 10:15:43 +02:00
dasd_proc.c [S390] dasd: fix use after free in dbf 2010-10-25 16:10:20 +02:00
dasd.c [S390] dasd: fix race between open and offline 2011-04-20 10:15:43 +02:00
dcssblk.c s390/block: kill the big kernel lock 2010-09-26 16:25:51 +02:00
Kconfig [S390] cleanup s390 Kconfig 2011-01-05 12:47:23 +01:00
Makefile [S390] dasd: add hyper PAV support to DASD device driver, part 1 2008-01-26 14:11:28 +01:00
xpram.c [S390] xpram: remove __initdata attribute from module parameters 2011-03-03 17:56:14 +01:00