aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
author <axboe@suse.de>2005-04-12 17:22:06 -0400
committerJames Bottomley <jejb@titanic>2005-04-16 21:10:09 -0400
commit152587deb8903c0edf483a5b889f975bc6bea7e0 (patch)
tree62fc13bff0a28134adbb523ed1a2c0efdd9a85cb /drivers/scsi/scsi_lib.c
parent56fece20086ebe32bce2c0d74ceadd516b56baae (diff)
[PATCH] fix NMI lockup with CFQ scheduler
The current problem seen is that the queue lock is actually in the SCSI device structure, so when that structure is freed on device release, we go boom if the queue tries to access the lock again. The fix here is to move the lock from the scsi_device to the queue. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 7cbc4127fb5a..d230c699c728 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -360,9 +360,9 @@ void scsi_device_unbusy(struct scsi_device *sdev)
360 shost->host_failed)) 360 shost->host_failed))
361 scsi_eh_wakeup(shost); 361 scsi_eh_wakeup(shost);
362 spin_unlock(shost->host_lock); 362 spin_unlock(shost->host_lock);
363 spin_lock(&sdev->sdev_lock); 363 spin_lock(sdev->request_queue->queue_lock);
364 sdev->device_busy--; 364 sdev->device_busy--;
365 spin_unlock_irqrestore(&sdev->sdev_lock, flags); 365 spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
366} 366}
367 367
368/* 368/*
@@ -1425,7 +1425,7 @@ struct request_queue *scsi_alloc_queue(struct scsi_device *sdev)
1425 struct Scsi_Host *shost = sdev->host; 1425 struct Scsi_Host *shost = sdev->host;
1426 struct request_queue *q; 1426 struct request_queue *q;
1427 1427
1428 q = blk_init_queue(scsi_request_fn, &sdev->sdev_lock); 1428 q = blk_init_queue(scsi_request_fn, NULL);
1429 if (!q) 1429 if (!q)
1430 return NULL; 1430 return NULL;
1431 1431