android_kernel_samsung_msm8976/drivers/edac
Jean Delvare f7caf94294 i7300_edac: Fix device reference count
commit 75135da0d68419ef8a925f4c1d5f63d8046e314d upstream.

pci_get_device() decrements the reference count of "from" (last
argument) so when we break off the loop successfully we have only one
device reference - and we don't know which device we have. If we want
a reference to each device, we must take them explicitly and let
the pci_get_device() walk complete to avoid duplicate references.

This is serious, as over-putting device references will cause
the device to eventually disappear. Without this fix, the kernel
crashes after a few insmod/rmmod cycles.

Tested on an Intel S7000FC4UR system with a 7300 chipset.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Link: http://lkml.kernel.org/r/20140224111656.09bbb7ed@endymion.delvare
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-06 21:30:13 -08:00
..
Kconfig Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2013-02-28 20:42:33 -08:00
Makefile ghes_edac: Register at EDAC core the BIOS report 2013-02-25 19:42:12 -03:00
amd64_edac.c amd64_edac: Fix single-channel setups 2013-09-26 17:18:28 -07:00
amd64_edac.h amd64_edac: Add Family 16h support 2013-04-19 12:46:50 +02:00
amd64_edac_dbg.c amd64_edac: convert sysfs logic to use struct device 2012-06-11 13:23:40 -03:00
amd64_edac_inj.c amd64_edac: Fix bogus sysfs file permissions 2013-05-21 09:13:11 +02:00
amd76x_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08: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
cell_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
cpc925_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
e7xxx_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
e752x_edac.c e752x_edac: Fix pci_dev usage count 2014-02-06 11:08:12 -08:00
edac_core.h edac: add support for raw error reports 2013-02-21 14:16:03 -03:00
edac_device.c Merge branch 'devel' 2012-07-29 21:11:05 -03:00
edac_device_sysfs.c edac: Convert debugfX to edac_dbg(X, 2012-06-11 13:23:49 -03:00
edac_mc.c EDAC: Correct workqueue setup path 2014-02-22 12:41:29 -08:00
edac_mc_sysfs.c EDAC: Poll timeout cannot be zero, p2 2014-02-22 12:41:29 -08:00
edac_module.c edac: initialize the core earlier 2013-02-21 11:06:36 -03:00
edac_module.h EDAC: Poll timeout cannot be zero, p2 2014-02-22 12:41:29 -08:00
edac_pci.c EDAC: Respect operational state in edac_pci.c 2012-11-28 11:22:47 +01:00
edac_pci_sysfs.c Linux 3.8-rc7 2013-02-20 15:45:52 -03:00
edac_stub.c EDAC: Change Boris' email address 2012-10-30 10:05:51 +01:00
ghes_edac.c ghes_edac: fix to use list_for_each_entry_safe() when delete list items 2013-02-26 10:05:35 -03:00
highbank_l2_edac.c edac, highbank: Fix interrupt setup of mem and l2 controller 2013-12-04 10:57:15 -08:00
highbank_mc_edac.c edac, highbank: Fix interrupt setup of mem and l2 controller 2013-12-04 10:57:15 -08:00
i7core_edac.c i7core_edac: Fix PCI device reference count 2014-03-06 21:30:09 -08:00
i3000_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
i3200_edac.c i3200_edac: Fix the logic that detects filled memories 2013-02-21 11:06:31 -03:00
i5000_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
i5100_edac.c EDAC: Fix lockdep splat 2013-07-28 16:30:11 -07:00
i5400_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
i7300_edac.c i7300_edac: Fix device reference count 2014-03-06 21:30:13 -08:00
i82443bxgx_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
i82860_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
i82875p_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
i82975x_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
mce_amd.c EDAC, MCE, AMD: Remove unneeded exports 2013-01-22 22:40:03 +01:00
mce_amd.h EDAC, MCE, AMD: Remove unneeded exports 2013-01-22 22:40:03 +01:00
mce_amd_inj.c EDAC: Change Boris' email address 2012-10-30 10:05:51 +01:00
mpc85xx_edac.c mpc85xx_edac: Fix typo 2013-02-10 13:28:41 +01:00
mpc85xx_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
mv64x60_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
mv64x60_edac.h edac: Drop __DATE__ usage 2011-04-19 00:23:22 +02:00
octeon_edac-l2c.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
octeon_edac-lmc.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
octeon_edac-pc.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
octeon_edac-pci.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
pasemi_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
ppc4xx_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
ppc4xx_edac.h
r82600_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
sb_edac.c edac: sb_edac.c should not require prescence of IMC_DDRIO device 2013-04-29 10:32:40 -03:00
tile_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00
x38_edac.c Drivers: edac: remove __dev* attributes. 2013-01-03 15:57:03 -08:00