aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_genhd.c
diff options
context:
space:
mode:
authorStefan Haberland <stefan.haberland@de.ibm.com>2010-02-26 22:37:46 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-02-26 22:37:32 +0100
commit9eb251225ab4dbea3119cfcf4c5194eed223a740 (patch)
tree6305782cf36aee2949b7a6d1661db24ef618e2ce /drivers/s390/block/dasd_genhd.c
parent[S390] use kprobes_built_in() in mm/fault code (diff)
downloadlinux-dev-9eb251225ab4dbea3119cfcf4c5194eed223a740.tar.xz
linux-dev-9eb251225ab4dbea3119cfcf4c5194eed223a740.zip
[S390] dasd: fix online/offline race
Setting a DASD online and offline in quick succession may cause a kernel panic or let the chhccwdev command wait forever. The Online process is split into two parts. After the first part is finished the offline process may be called. This may result in a situation where the second online processing part tries to set the DASD offline as well. Use a mutex to protect online and offline against each other. Also correct some checking. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_genhd.c')
-rw-r--r--drivers/s390/block/dasd_genhd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index d3198303b93c..94f92a1247f2 100644
--- a/drivers/s390/block/dasd_genhd.c
+++ b/drivers/s390/block/dasd_genhd.c
@@ -88,6 +88,7 @@ void dasd_gendisk_free(struct dasd_block *block)
if (block->gdp) {
del_gendisk(block->gdp);
block->gdp->queue = NULL;
+ block->gdp->private_data = NULL;
put_disk(block->gdp);
block->gdp = NULL;
}