tree f25b06ee61ffa8b000a45d0ec5f8a92ebb67f0ce
parent 152587deb8903c0edf483a5b889f975bc6bea7e0
author <[EMAIL PROTECTED]> Wed, 13 Apr 2005 02:38:09 -0500
committer James Bottomley <[EMAIL PROTECTED]> Sun, 17 Apr 2005 06:10:34 -0500
updates for CFQ oops fix
- add a comment to the device structure that the device_busy field
is now protected by the request_queue->queue_lock
- null out sdev->request_queue after the queue is released to trap
any (and there shouldn't be any) use after the queue is freed.
Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
scsi/scsi_sysfs.c | 3 +++
scsi/scsi_device.h | 1 +
2 files changed, 4 insertions(+)
Index: drivers/scsi/scsi_sysfs.c
===================================================================
--- 62fc13bff0a28134adbb523ed1a2c0efdd9a85cb/drivers/scsi/scsi_sysfs.c
(mode:100644 sha1:134d3a3e4222a4154ad25b938e78b37276219bb4)
+++ f25b06ee61ffa8b000a45d0ec5f8a92ebb67f0ce/drivers/scsi/scsi_sysfs.c
(mode:100644 sha1:e75ee4671ee3a0a6dcb608a73d6bd2f4007eff09)
@@ -171,6 +171,9 @@
if (sdev->request_queue) {
sdev->request_queue->queuedata = NULL;
scsi_free_queue(sdev->request_queue);
+ /* temporary expedient, try to catch use of queue lock
+ * after free of sdev */
+ sdev->request_queue = NULL;
}
scsi_target_reap(scsi_target(sdev));
Index: include/scsi/scsi_device.h
===================================================================
--- 62fc13bff0a28134adbb523ed1a2c0efdd9a85cb/include/scsi/scsi_device.h
(mode:100644 sha1:f6d051318299c17bf10240b042bca624e96ee97e)
+++ f25b06ee61ffa8b000a45d0ec5f8a92ebb67f0ce/include/scsi/scsi_device.h
(mode:100644 sha1:fe9571d2e306434df698b5d997b8204e0755bc56)
@@ -43,6 +43,7 @@
struct list_head siblings; /* list of all devices on this host */
struct list_head same_target_siblings; /* just the devices sharing
same target id */
+ /* this is now protected by the request_queue->queue_lock */
volatile unsigned short device_busy; /* commands actually active on
low-level */
spinlock_t list_lock;
struct list_head cmd_list; /* queue of in use SCSI Command
structures */
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html