android_kernel_google_msm/drivers/edac
Jean Delvare 9f84cff071 i7core_edac: Fix PCI device reference count
commit c0f5eeed0f upstream.

The reference count changes done by pci_get_device can be a little
misleading when the usage diverges from the most common scheme. The
reference count of the device passed as the last parameter is always
decreased, even if the function returns no new device. So if we are
going to try alternative device IDs, we must manually increment the
device reference count before each retry. If we don't, we end up
decreasing the reference count, and after a few modprobe/rmmod cycles
the PCI devices will vanish.

In other words and as Alan put it: without this fix the EDAC code
corrupts the PCI device list.

This fixes kernel bug #50491:
https://bugzilla.kernel.org/show_bug.cgi?id=50491

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Link: http://lkml.kernel.org/r/20140224093927.7659dd9d@endymion.delvare
Reviewed-by: Alan Cox <alan@linux.intel.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-11 16:10:01 -07:00
..
amd64_edac.c amd64_edac:__amd64_set_scrub_rate(): avoid overindexing scrubrates[] 2012-10-28 10:14:15 -07:00
amd64_edac.h amd64_edac: Erratum #637 workaround 2011-04-26 16:18:56 +02:00
amd64_edac_dbg.c EDAC, MCE: Rework MCE injection 2010-10-21 14:47:59 +02:00
amd64_edac_inj.c amd64_edac: Add support for F15h DCT PCI config accesses 2011-03-17 14:46:11 +01:00
amd76x_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
amd8111_edac.c edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
amd8111_edac.h
amd8131_edac.c edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
amd8131_edac.h tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
cell_edac.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
cpc925_edac.c cpc925_edac: Support single-processor configurations 2011-09-01 16:00:18 +10:00
e7xxx_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
e752x_edac.c e752x_edac: Fix pci_dev usage count 2014-02-06 11:05:46 -08:00
edac_core.h edac: convert sysdev_class to a regular subsystem 2011-12-14 15:21:07 -08:00
edac_device.c edac: convert sysdev_class to a regular subsystem 2011-12-14 15:21:07 -08:00
edac_device_sysfs.c edac: convert sysdev_class to a regular subsystem 2011-12-14 15:21:07 -08:00
edac_mc.c Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2012-03-28 14:24:40 -07:00
edac_mc_sysfs.c EDAC: Correct scrub rate API 2012-03-19 12:03:58 +01:00
edac_module.c edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
edac_module.h edac: convert sysdev_class to a regular subsystem 2011-12-14 15:21:07 -08:00
edac_pci.c edac: convert sysdev_class to a regular subsystem 2011-12-14 15:21:07 -08:00
edac_pci_sysfs.c EDAC: Test correct variable in ->store function 2013-02-03 18:24:41 -06:00
edac_stub.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
i7core_edac.c i7core_edac: Fix PCI device reference count 2014-03-11 16:10:01 -07:00
i3000_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
i3200_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
i5000_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
i5100_edac.c Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2012-03-28 14:24:40 -07:00
i5400_edac.c Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2012-03-28 14:24:40 -07:00
i7300_edac.c i7300_edac: Fix error flag testing 2012-12-10 10:59:40 -08:00
i82443bxgx_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
i82860_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
i82875p_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
i82975x_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
Kconfig edac: sb_edac: Let the driver depend on PCI_MMCONFIG 2012-03-21 15:19:56 -03:00
Makefile edac: sb_edac: Add it to the building system 2011-11-01 10:01:54 -02:00
mce_amd.c MCE, AMD: Drop too granulary family model checks 2012-04-04 15:50:11 +02:00
mce_amd.h MCE, AMD: Constify error tables 2012-03-19 12:06:26 +01:00
mce_amd_inj.c device.h: cleanup users outside of linux/include (C files) 2012-03-11 14:27:37 -04:00
mpc85xx_edac.c drivers/edac/mpc85xx_edac.c: fix memory controller compatible for edac 2011-11-24 01:59:38 -06:00
mpc85xx_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
mv64x60_edac.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mv64x60_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
pasemi_edac.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ppc4xx_edac.c edac/ppc4xx_edac: Fix compilation 2012-03-21 15:19:44 -03:00
ppc4xx_edac.h
r82600_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00
sb_edac.c edac: fix the error about memory type detection on SandyBridge 2012-06-22 11:37:15 -07:00
tile_edac.c edac: say "TILEGx" not "TILEPro" for the tilegx edac driver 2012-04-02 12:14:06 -04:00
x38_edac.c EDAC: Make pci_device_id tables __devinitconst. 2012-03-19 12:04:54 +01:00