linux/drivers/ata
Xiaotian Feng 26cd4d65de [libata] fix Null pointer dereference on disk error
Following oops were observed when disk error happened:

[ 4272.896937] sd 0:0:0:0: [sda] Unhandled error code
[ 4272.896939] sd 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 4272.896942] sd 0:0:0:0: [sda] CDB: Read(10): 28 00 00 5a de a7 00 00 08 00
[ 4272.896951] end_request: I/O error, dev sda, sector 5955239
[ 4291.574947] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 4291.658305] IP: [] ahci_activity_show+0x1/0x40
[ 4291.730090] PGD 76dbbc067 PUD 6c4fba067 PMD 0
[ 4291.783408] Oops: 0000 [#1] SMP
[ 4291.822100] last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/sw_activity
[ 4291.934235] CPU 9
[ 4291.958301] Pid: 27942, comm: hwinfo ......

ata_scsi_find_dev could return NULL, so ata_scsi_activity_{show,store} should check if atadev is NULL.

Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
Cc: James Bottomley <JBottomley@Parallels.com>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2012-12-14 09:40:34 -05:00
..
acard-ahci.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
ahci_platform.c ahci_platform: make structs static 2012-12-14 09:38:17 -05:00
ahci.c ahci: Add identifiers for ASM106x devices 2012-09-13 00:24:29 -04:00
ahci.h ata/ahci_platform: Add clock framework support 2012-09-13 01:10:18 -04:00
ata_generic.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
ata_piix.c ata_piix: re-order code and remove prototypes 2012-12-03 04:57:51 -05:00
Kconfig ata: add platform driver for Calxeda AHCI controller 2012-09-13 01:09:41 -04:00
libahci.c ahci: convert ata_link_printk() to ata_link_warn() 2012-12-14 09:38:50 -05:00
libata-acpi.c libata: restore acpi disable functionality 2012-12-03 04:57:15 -05:00
libata-core.c Revert "libata: check SATA_SETTINGS log with HW Feature Ctrl" 2012-12-14 09:34:01 -05:00
libata-eh.c libata: set dma_mode to 0xff in reset 2012-12-03 05:07:13 -05:00
libata-pmp.c libata: migrate ACPI code over to new bindings 2012-06-29 11:38:11 -04:00
libata-scsi.c [libata] fix Null pointer dereference on disk error 2012-12-14 09:40:34 -05:00
libata-sff.c ata: remove the second argument of k[un]map_atomic() 2012-03-20 21:48:16 +08:00
libata-transport.c libata-transport.c: local functions should not be exposed globally 2012-07-25 15:14:55 -04:00
libata-transport.h [libata] Add ATA transport class 2010-10-21 20:21:03 -04:00
libata.h ahci: implement aggressive SATA device sleep support 2012-09-13 01:08:53 -04:00
Makefile [libata] Makefile: Fix build error in sata_highbank 2012-10-01 22:50:37 -04:00
pata_acpi.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_ali.c pata_ali: fix "Satelite" typo 2011-10-14 13:10:42 -04:00
pata_amd.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_arasan_cf.c pata_arasan_cf: declare/use more local variables in arasan_cf_dma_start() 2012-11-28 12:40:07 -05:00
pata_artop.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_at32.c libata: remove ATA_FLAG_MMIO 2011-03-02 02:36:46 -05:00
pata_at91.c pata/at91: use newly introduced SMC accessors 2012-02-13 18:31:37 +01:00
pata_atiixp.c pata_atiixp: override cable detection on MSI E350DM-E33 2012-08-17 13:26:51 -04:00
pata_atp867x.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_bf54x.c [libata] pata_bf54x: Support sg list in bmdma transfer. 2012-01-17 20:49:28 -05:00
pata_cmd64x.c ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>( 2012-11-28 12:40:15 -05:00
pata_cmd640.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_cs5520.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_cs5530.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_cs5535.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_cs5536.c pata_cs5536: add quirk for broken udma 2012-11-28 12:38:41 -05:00
pata_cypress.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_efar.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_ep93xx.c ARM: ep93xx: convert ata_<foo>_printk() to ata_<foo>_<level>() 2012-12-14 09:38:42 -05:00
pata_hpt3x2n.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_hpt3x3.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_hpt37x.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_hpt366.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_icside.c ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level> 2011-07-23 17:57:36 -04:00
pata_imx.c pata_imx: convert ata_dev_printk() to ata_dev_info() 2012-12-14 09:38:46 -05:00
pata_isapnp.c [libata] Improve timeout handling 2009-03-24 22:52:39 -04:00
pata_it821x.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_it8213.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_ixp4xx_cf.c pata_ixp4xx_cf: utilize common ata_platform_remove_one() 2012-12-03 05:15:20 -05:00
pata_jmicron.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_legacy.c pata_legacy: correctly mask recovery field for HT6560B 2012-03-13 12:43:13 -04:00
pata_macio.c ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level> 2011-07-23 17:57:36 -04:00
pata_marvell.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_mpc52xx.c pata_mpc52xx: utilize common ata_platform_remove_one() 2012-12-03 05:15:22 -05:00
pata_mpiix.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_netcell.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_ninja32.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_ns87410.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_ns87415.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_octeon_cf.c Revert "pata_octeon_cf: perform host detach, removal on exit" 2012-12-14 09:35:51 -05:00
pata_of_platform.c pata_of_platform: fix compile error 2012-12-03 13:53:40 -05:00
pata_oldpiix.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_opti.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_optidma.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_palmld.c pata_palmld: utilize common ata_platform_remove_one() 2012-12-03 05:15:35 -05:00
pata_pcmcia.c drivers/ata/pata_pcmcia.c: adjust suspicious bit operation 2012-07-25 15:06:20 -04:00
pata_pdc202xx_old.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_pdc2027x.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_piccolo.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_platform.c pata_platform: remove unused remove function 2012-12-03 05:15:33 -05:00
pata_pxa.c ARM: pxa: move platform_data definitions 2012-09-14 11:18:10 +02:00
pata_radisys.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_rb532_cf.c SATA/PATA: convert drivers/ata/* to use module_platform_driver() 2012-01-08 19:14:58 -05:00
pata_rdc.c pata_rdc: remove unused variable in rdc_init_one() 2012-11-28 12:38:53 -05:00
pata_rz1000.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_samsung_cf.c ARM: samsung: move platform_data definitions 2012-09-19 17:42:18 +02:00
pata_sc1200.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_scc.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_sch.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_serverworks.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_sil680.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_sis.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_sl82c105.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_triflex.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pata_via.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
pdc_adma.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
sata_dwc_460ex.c sata_dwc_460ex: device tree may specify dma_channel 2012-07-25 15:54:21 -04:00
sata_fsl.c sata_fsl: add workaround for data length mismatch on freescale V2 controller 2012-09-13 01:09:19 -04:00
sata_highbank.c sata_highbank: utilize common ata_platform_remove_one() 2012-12-03 13:53:25 -05:00
sata_inic162x.c sata_inic162x: remove unused variable in inic_scr_read() 2012-11-28 12:39:09 -05:00
sata_mv.c sata_mv: Fix warnings when no PCI 2012-10-01 22:53:23 -04:00
sata_nv.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
sata_promise.c sata_promise: fix hardreset lockdep error 2012-11-28 12:37:56 -05:00
sata_promise.h libata annotations and fixes 2008-01-23 05:24:15 -05:00
sata_qstor.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
sata_sil24.c sata_sil24: remove unused variable from sata_sil24.c 2012-11-28 12:39:20 -05:00
sata_sil.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
sata_sis.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
sata_svw.c sata_svw: check DMA start bit before reset 2012-11-15 23:54:41 -05:00
sata_sx4.c sata_sx4: pdc20621_{ata|host}_sg() do not need 'tf' parameter 2012-11-28 12:39:44 -05:00
sata_uli.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
sata_via.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
sata_vsc.c ata: use module_pci_driver 2012-07-25 15:12:11 -04:00
sis.h libata: PATA-mode fixes for sis_sata 2007-07-02 10:17:42 -04:00