Skip to content

Commit 23c79d3

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] Fix oops caused by queue refcounting failure
2 parents 0e833d8 + e73e079 commit 23c79d3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

drivers/scsi/scsi_scan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,
297297
kfree(sdev);
298298
goto out;
299299
}
300-
300+
blk_get_queue(sdev->request_queue);
301301
sdev->request_queue->queuedata = sdev;
302302
scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun);
303303

drivers/scsi/scsi_sysfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ static void scsi_device_dev_release_usercontext(struct work_struct *work)
322322
kfree(evt);
323323
}
324324

325+
blk_put_queue(sdev->request_queue);
325326
/* NULL queue means the device can't be used */
326327
sdev->request_queue = NULL;
327328

0 commit comments

Comments
 (0)