diff options
author | Jan Höppner <hoeppner@linux.vnet.ibm.com> | 2016-10-12 12:51:04 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-10-28 10:09:04 +0200 |
commit | 9de67725c80cb8a7b34b1932e196d2ed61a08879 (patch) | |
tree | 3a29c6b57286e62cd550542abcddde4c8fde34bc /drivers/vlynq/Kconfig | |
parent | 0f57c97f241b4fc18251fb2b1c499e9f71e93c78 (diff) | |
download | blackbird-op-linux-9de67725c80cb8a7b34b1932e196d2ed61a08879.tar.gz blackbird-op-linux-9de67725c80cb8a7b34b1932e196d2ed61a08879.zip |
s390/dasd: Fix locking issue when changing EER attribute
The reference to a device in question may get lost when the extended
error reporting (EER) attribute is being enabled/disabled while the
device is set offline at the same time. This is due to missing
refcounting and incorrect locking. Fix this by the following:
- In dasd_eer_store() get the device directly and handle the refcount
accordingly.
- Move the lock in dasd_eer_enable() up so we can ensure safe
processing.
- Check if the device is being set offline and return with -EBUSY if so.
- While at it, change the return code from -EPERM to -EMEDIUMTYPE as
suggested by a FIXME, since that is what we're actually checking.
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>
Diffstat (limited to 'drivers/vlynq/Kconfig')
0 files changed, 0 insertions, 0 deletions