summaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/ap_queue.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-06-22 21:55:24 -0600
committerJens Axboe <axboe@kernel.dk>2017-06-22 21:55:24 -0600
commitf95a0d6a95b12a79b7492da7ab687ae4cd741124 (patch)
tree503ad30af40e94bbc090fc7de45a051030646141 /drivers/s390/crypto/ap_queue.c
parenta9590fe148c03cb4157b56255357419cb4e14124 (diff)
parent8e8320c9315c47a6a090188720ccff32a6a6ba18 (diff)
downloadop-kernel-dev-f95a0d6a95b12a79b7492da7ab687ae4cd741124.zip
op-kernel-dev-f95a0d6a95b12a79b7492da7ab687ae4cd741124.tar.gz
Merge commit '8e8320c9315c' into for-4.13/block
Pull in the fix for shared tags, as it conflicts with the pending changes in for-4.13/block. We already pulled in v4.12-rc5 to solve other conflicts or get fixes that went into 4.12, so not a lot of changes in this merge. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/s390/crypto/ap_queue.c')
-rw-r--r--drivers/s390/crypto/ap_queue.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/s390/crypto/ap_queue.c b/drivers/s390/crypto/ap_queue.c
index 480c58a..0f1a5d0 100644
--- a/drivers/s390/crypto/ap_queue.c
+++ b/drivers/s390/crypto/ap_queue.c
@@ -584,7 +584,14 @@ static struct device_type ap_queue_type = {
static void ap_queue_device_release(struct device *dev)
{
- kfree(to_ap_queue(dev));
+ struct ap_queue *aq = to_ap_queue(dev);
+
+ if (!list_empty(&aq->list)) {
+ spin_lock_bh(&ap_list_lock);
+ list_del_init(&aq->list);
+ spin_unlock_bh(&ap_list_lock);
+ }
+ kfree(aq);
}
struct ap_queue *ap_queue_create(ap_qid_t qid, int device_type)
OpenPOWER on IntegriCloud