mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
[S390] cio: ensure proper locking during device recognition
Device recognition needs to be started with the ccw device lock held to prevent race conditions between I/O starting and interrupt reception. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
7c4d964fa4
commit
1f5bd3848b
@ -488,7 +488,9 @@ static int online_store_recog_and_online(struct ccw_device *cdev)
|
||||
{
|
||||
/* Do device recognition, if needed. */
|
||||
if (cdev->private->state == DEV_STATE_BOXED) {
|
||||
spin_lock_irq(cdev->ccwlock);
|
||||
ccw_device_recognition(cdev);
|
||||
spin_unlock_irq(cdev->ccwlock);
|
||||
wait_event(cdev->private->wait_q,
|
||||
cdev->private->flags.recog_done);
|
||||
if (cdev->private->state != DEV_STATE_OFFLINE)
|
||||
|
Loading…
Reference in New Issue
Block a user