summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-07-17 15:01:08 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-10-14 14:32:20 +0200
commit98733791e8ea9f700ce2c6feedcbeb7c4703359e (patch)
treef795b94defda04b04ad6f446418490b1b22100b9 /drivers/s390
parent889875a14f0a3205e78613b3e78ecc4efc187d74 (diff)
downloadop-kernel-dev-98733791e8ea9f700ce2c6feedcbeb7c4703359e.zip
op-kernel-dev-98733791e8ea9f700ce2c6feedcbeb7c4703359e.tar.gz
s390/zcrypt: fix device unregister race
The ap_queue_messsage function will call device_unregister if the unregistered field of the device has been set while trying to queue a message. This races with other device_unregister calls, e.g. from the ap_scan_bus. Remove the call to device_unregister from ap_queue_message and let ap_scan_bus deal with it. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/crypto/ap_bus.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index 689f46c..80af1bd 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -1666,8 +1666,6 @@ void ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg)
rc = -ENODEV;
}
spin_unlock_bh(&ap_dev->lock);
- if (rc == -ENODEV)
- device_unregister(&ap_dev->device);
}
EXPORT_SYMBOL(ap_queue_message);
OpenPOWER on IntegriCloud