提交 98733791 编写于 作者: M Martin Schwidefsky

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: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 889875a1
...@@ -1666,8 +1666,6 @@ void ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg) ...@@ -1666,8 +1666,6 @@ void ap_queue_message(struct ap_device *ap_dev, struct ap_message *ap_msg)
rc = -ENODEV; rc = -ENODEV;
} }
spin_unlock_bh(&ap_dev->lock); spin_unlock_bh(&ap_dev->lock);
if (rc == -ENODEV)
device_unregister(&ap_dev->device);
} }
EXPORT_SYMBOL(ap_queue_message); EXPORT_SYMBOL(ap_queue_message);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册