]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[SCSI] scsi_transport_sas: fix the lifetime of sas bsg objects
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 18 Apr 2008 15:43:15 +0000 (00:43 +0900)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 22 Apr 2008 20:16:32 +0000 (15:16 -0500)
commit93c20a59af4624aedf53f8320606b355aa951bc1
tree9d17e23f66e4db98171f7342f3ddf27af9664b49
parent97f46ae45c70857e459b7f8df1fc2807e7bd90a9
[SCSI] scsi_transport_sas: fix the lifetime of sas bsg objects

scsi_transport_sas calls blk_cleanup_queue too early for bsg
queues. If a user holds a sas_host, end_device, or expander device
open, remove the device, then send a request to it, we get a kernel
crash. We need to call blk_cleanup_queue in the release callback as we
do with scsi devices.

This patch moves blk_cleanup_queue to sas_expander_release and
sas_end_device_release from sas_bsg_remove. sas_host can't use the
release callback in struct device so use bsg's release callback.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/scsi_transport_sas.c