diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2010-02-26 22:37:46 +0100 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-02-26 22:37:32 +0100 |
commit | 9eb251225ab4dbea3119cfcf4c5194eed223a740 (patch) | |
tree | 6305782cf36aee2949b7a6d1661db24ef618e2ce /drivers/s390/block/dasd_int.h | |
parent | 22e0a0467292222214d1974d9bc2664a6c05980d (diff) |
[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_int.h')
-rw-r--r-- | drivers/s390/block/dasd_int.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index e4c2143dabf6..ed73ce550822 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h @@ -368,6 +368,7 @@ struct dasd_device { /* Device state and target state. */ int state, target; + struct mutex state_mutex; int stopped; /* device (ccw_device_start) was stopped */ /* reference count. */ |