linux/drivers/scsi
James Bottomley 8354a9e00a Fix oops caused by queue refcounting failure
commit e73e079bf1 upstream.

In certain circumstances, we can get an oops from a torn down device.
Most notably this is from CD roms trying to call scsi_ioctl.  The root
cause of the problem is the fact that after scsi_remove_device() has
been called, the queue is fully torn down.  This is actually wrong
since the queue can be used until the sdev release function is called.
Therefore, we add an extra reference to the queue which is released in
sdev->release, so the queue always exists.

Reported-by: Parag Warudkar <parag.lkml@gmail.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-23 15:24:06 -07:00
..
aacraid SCSI: aacraid: Eliminate use after free 2010-08-02 10:20:50 -07:00
aic7xxx aic79xx: check for non-NULL scb in ahd_handle_nonpkt_busfree 2010-08-13 13:20:23 -07:00
aic7xxx_old
aic94xx dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
arcmsr dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
arm ARM: 5944/1: scsi: fix timer setup in fas216.c 2010-03-15 08:49:32 -07:00
be2iscsi [SCSI] be2iscsi: Moving to pci_pools v3 2009-10-02 14:01:55 -05:00
bfa bfa: fix system crash when reading sysfs fc_host statistics 2011-01-07 14:43:13 -08:00
bnx2i [SCSI] libiscsi: iscsi_session_setup to allow for private space 2009-10-02 14:01:39 -05:00
cxgb3i [SCSI] libiscsi: iscsi_session_setup to allow for private space 2009-10-02 14:01:39 -05:00
device_handler scsi_dh_emc: request flag cleanup 2011-05-09 15:55:34 -07:00
dpt trivial: fix typo milisecond/millisecond for documentation and source comments. 2009-06-12 18:01:46 +02:00
fcoe fcoe: Fix getting san mac for VLAN interface 2010-01-28 15:01:42 -08:00
fnic [SCSI] fcoe, fnic, libfc: modifies current code paths to use EM anchor list 2009-08-22 17:52:08 -05:00
ibmvscsi ibmvfc: Reduce error recovery timeout 2010-08-13 13:20:24 -07:00
libfc fcoe, libfc: fix an libfc issue with queue ramp down in libfc 2010-01-28 15:01:40 -08:00
libsas libsas: fix runaway error handler problem 2011-02-17 15:36:54 -08:00
lpfc lpfc: fix hang on SGI ia64 platform 2010-01-28 15:01:24 -08:00
megaraid megaraid_sas: Sanity check user supplied length before passing it to dma_alloc_coherent() 2011-05-23 11:20:26 -07:00
mpt2sas mpt2sas: fix the incorrect scsi_dma_map error checking 2011-05-09 15:55:39 -07:00
mvsas mvsas: add support for Adaptec ASC-1045/1405 SAS/SATA HBA 2010-04-01 15:58:15 -07:00
osd [SCSI] Merge branch 'linus' 2009-06-12 10:02:03 -05:00
pcmcia [SCSI] nsp_cs: fix buf overflow 2009-08-22 17:52:22 -05:00
qla2xxx qla2xxx: Disable MSI on qla24xx chips other than QLA2432. 2010-07-05 11:11:21 -07:00
qla4xxx trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
sym53c8xx_2 sym53c8xx: ratelimit parity errors 2009-06-21 11:12:17 -05:00
.gitignore
3w-9xxx.c [SCSI] 3w-9xxx: scsi_dma_unmap fix 2009-05-15 12:23:32 -04:00
3w-9xxx.h
3w-xxxx.c [SCSI] 3w-xxxx: scsi_dma_unmap fix 2009-05-15 12:24:59 -04:00
3w-xxxx.h [SCSI] 3w-xxxx: scsi_dma_unmap fix 2009-05-15 12:24:59 -04:00
53c700_d.h_shipped
53c700.c
53c700.h
53c700.scr
a100u2w.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
a100u2w.h
a2091.c
a2091.h
a3000.c
a3000.h
a4000t.c scsi: a4000 - Correct driver unregistration in case of failure 2009-04-22 20:39:06 +02:00
advansys.c
aha152x.c
aha152x.h
aha1542.c
aha1542.h
aha1740.c scsi: remove driver_data direct access of struct device 2009-06-15 21:30:27 -07:00
aha1740.h
aic7xxx_old.c
atari_NCR5380.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
atari_scsi.c
atari_scsi.h
atp870u.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
atp870u.h
BusLogic.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
BusLogic.h
bvme6000_scsi.c
ch.c [SCSI] ch: Check NULL for kmalloc() return 2009-08-22 17:52:22 -05:00
constants.c [SCSI] update scsi/constants.c 2009-08-22 17:51:50 -05:00
dc395x.c
dc395x.h
dmx3191d.c
dpt_i2o.c dpt_i2o: Fix typo of EINVAL 2009-10-31 12:11:38 -07:00
dpti.h
dtc.c
dtc.h
eata_generic.h
eata_pio.c
eata_pio.h
eata.c block: convert to pos and nr_sectors accessors 2009-05-11 09:50:54 +02:00
esp_scsi.c
esp_scsi.h
fd_mcs.c
fdomain.c
fdomain.h
FlashPoint.c
g_NCR5380_mmio.c
g_NCR5380.c
g_NCR5380.h
gdth_ioctl.h
gdth_proc.c [SCSI] gdth: fix overlapping snprintf users 2009-06-09 10:31:46 -05:00
gdth_proc.h
gdth.c gdth: integer overflow in ioctl 2010-11-22 10:47:38 -08:00
gdth.h
gvp11.c
gvp11.h
hosts.c SCSI: scsi_lib_dma: fix bug with dma maps on nested scsi objects 2009-12-14 09:44:44 -08:00
hptiop.c [SCSI] hptiop: Add RR44xx adapter support 2009-10-02 09:45:22 -05:00
hptiop.h [SCSI] hptiop: Add RR44xx adapter support 2009-10-02 09:45:22 -05:00
ibmmca.c
imm.c
imm.h
in2000.c
in2000.h
initio.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
initio.h
ipr.c SCSI: ipr: fix EEH recovery 2010-01-06 15:03:11 -08:00
ipr.h [SCSI] ipr: add workaround for MSI interrupts on P7 2009-11-06 11:09:27 -06:00
ips.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
ips.h
iscsi_tcp.c [SCSI] libiscsi: iscsi_session_setup to allow for private space 2009-10-02 14:01:39 -05:00
iscsi_tcp.h
jazz_esp.c
Kconfig [SCSI] be2iscsi: add 10Gbps iSCSI - BladeEngine 2 driver 2009-10-02 09:50:33 -05:00
lasi700.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
libiscsi_tcp.c libiscsi: don't run scsi eh if iscsi task is making progress 2009-06-21 10:52:39 -05:00
libiscsi.c SCSI: libiscsi: regression: fix header digest errors 2010-05-12 14:57:16 -07:00
libsrp.c [SCSI] libsrp: fix memory leak in srp_ring_free() 2009-09-12 09:35:34 -05:00
mac_esp.c
mac_scsi.c
mac_scsi.h
mac53c94.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
mac53c94.h
Makefile [SCSI] be2iscsi: add 10Gbps iSCSI - BladeEngine 2 driver 2009-10-02 09:50:33 -05:00
megaraid.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
megaraid.h trivial: typo (en|dis|avail|remove)bale -> (en|dis|avail|remove)able 2009-06-12 18:01:45 +02:00
mesh.c
mesh.h
mvme16x_scsi.c
mvme147.c
mvme147.h
NCR_D700.c [SCSI] NCR_D700: fix IRQ handler return type 2009-05-23 15:44:09 -05:00
NCR_D700.h
NCR_Q720.c
NCR_Q720.h
ncr53c8xx.c [SCSI] ncr53c8xx: div reaches -1 2009-06-15 10:09:30 -05:00
ncr53c8xx.h
NCR53c406a.c
NCR5380.c
NCR5380.h
nsp32_debug.c
nsp32_io.h
nsp32.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
nsp32.h
osst_detect.h
osst_options.h
osst.c
osst.h
pas16.c
pas16.h
pmcraid.c pmcraid: reject negative request size 2011-05-09 15:54:55 -07:00
pmcraid.h headers: kref.h redux 2009-09-26 10:17:19 -07:00
ppa.c
ppa.h
ps3rom.c ps3rom: Use ps3_system_bus_[gs]et_drvdata() instead of direct access 2009-06-16 14:15:46 +10:00
qla1280.c SCSI: qla1280: Drop host_lock while requesting firmware 2010-03-15 08:49:44 -07:00
qla1280.h [SCSI] qla1280: error recovery rewrite 2009-05-20 17:21:13 -05:00
qlogicfas.c
qlogicfas408.c
qlogicfas408.h
qlogicpti.c
qlogicpti.h
raid_class.c
script_asm.pl
scsi_debug.c scsi_debug: virtual_gb ignores sector_size 2010-05-12 14:57:16 -07:00
scsi_devinfo.c scsi_devinfo: update Hitachi entries (v2) 2010-01-28 15:01:21 -08:00
scsi_error.c SCSI: Retry commands with UNIT_ATTENTION sense codes to fix ext3/ext4 I/O error 2010-05-12 14:57:17 -07:00
scsi_ioctl.c SCSI: add scsi target reset support to scsi ioctl 2010-04-26 07:41:30 -07:00
scsi_lib_dma.c SCSI: scsi_lib_dma: fix bug with dma maps on nested scsi objects 2009-12-14 09:44:44 -08:00
scsi_lib.c fix oops in scsi_run_queue() 2011-05-09 15:55:42 -07:00
scsi_logging.h
scsi_module.c
scsi_netlink.c
scsi_priv.h driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
scsi_proc.c
scsi_sas_internal.h
scsi_scan.c Fix oops caused by queue refcounting failure 2011-06-23 15:24:06 -07:00
scsi_sysctl.c
scsi_sysfs.c Fix oops caused by queue refcounting failure 2011-06-23 15:24:06 -07:00
scsi_tgt_if.c
scsi_tgt_lib.c block: cleanup rq->data_len usages 2009-05-11 09:50:55 +02:00
scsi_tgt_priv.h
scsi_transport_api.h
scsi_transport_fc_internal.h
scsi_transport_fc.c fc class: fail fast bsg requests 2010-04-26 07:41:29 -07:00
scsi_transport_iscsi.c iscsi class: modify handling of replacement timeout 2010-01-28 15:01:17 -08:00
scsi_transport_sas.c [SCSI] scsi_transport_sas: fix incorrect duplicate setup of max_phys 2009-08-22 17:52:01 -05:00
scsi_transport_spi.c scsi_transport_spi: Blacklist Ultrium-3 tape for IU transfers 2009-06-21 10:52:46 -05:00
scsi_transport_srp_internal.h
scsi_transport_srp.c
scsi_typedefs.h
scsi_wait_scan.c driver synchronization: make scsi_wait_scan more advanced 2009-04-21 19:40:00 -07:00
scsi.c [SCSI] Fix protection scsi_data_buffer leak 2009-10-02 09:46:52 -05:00
scsi.h
scsicam.c
sd_dif.c [SCSI] sd: Return correct error code for DIF 2009-11-26 08:54:46 -06:00
sd.c fix medium error problems with some arrays which can cause data corruption 2011-02-17 15:36:54 -08:00
sd.h [SCSI] sd: Support disks formatted with DIF Type 2 2009-10-02 09:47:04 -05:00
ses.c ses: show devices for enclosures with no page 7 2011-04-14 16:53:20 -07:00
sg.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2009-10-11 11:12:33 -07:00
sgiwd93.c
sim710.c
sni_53c710.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
sr_ioctl.c [SCSI] sr: report more accurate drive status after closing the tray. 2009-04-27 09:32:30 -05:00
sr_vendor.c
sr.c [SCSI] sr: consider the last written sector when determining media size 2009-10-02 09:45:46 -05:00
sr.h
st_options.h
st.c SCSI: st: fix mdata->page_order handling 2010-01-06 15:03:13 -08:00
st.h SCSI: st: fix mdata->page_order handling 2010-01-06 15:03:13 -08:00
stex.c [SCSI] stex: Add reset code for st_yel (v2) 2009-09-05 08:50:41 -05:00
sun_esp.c
sun3_NCR5380.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
sun3_scsi_vme.c
sun3_scsi.c
sun3_scsi.h
sun3x_esp.c
sym53c416.c
sym53c416.h
t128.c
t128.h
tmscsim.c
tmscsim.h
u14-34f.c block: convert to pos and nr_sectors accessors 2009-05-11 09:50:54 +02:00
ultrastor.c Fix Ultrastor asm snippet 2011-06-23 15:24:01 -07:00
ultrastor.h
wd33c93.c
wd33c93.h
wd7000.c
zalon.c [SCSI] zalon: fix oops on attach failure 2009-06-25 11:37:23 -05:00
zorro7xx.c