kernel-hacking-2024-linux-s.../drivers/edac
Mauro Carvalho Chehab a3e1541637 i7core_edac: Avoid PCI refcount to reach zero on successive load/reload
That's a nasty bug that took me a lot of time to track, and whose
solution took just one line to solve. The best fragrances and the worse
poisons are shipped on the smalest bottles.

The drivers/pci/quick.c implements the pci_get_device function. The normal
behavior is that you call it, the function returns you a pdev pointer
and increment pdev->kobj.kref.refcount of the pci device. However,
if you want to keep searching an object, you need to pass the previous
pdev function to the search.

When you use a not null pointer to pdev "from" field, pci_get_device
will decrement pdev->kobj.kref.refcount, assuming that the driver won't
be using the previous pdev.

The solution is simple: we just need to call pci_dev_get() manually,
for the pdev's that the driver will actually use.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-24 11:20:41 -02:00
..
amd64_edac.c amd64_edac: Do not report error overflow as a separate error 2010-08-26 12:46:03 +02:00
amd64_edac.h amd64_edac: Remove unneeded defines 2010-08-03 16:14:01 +02:00
amd64_edac_dbg.c
amd64_edac_inj.c
amd76x_edac.c
amd8111_edac.c
amd8111_edac.h
amd8131_edac.c
amd8131_edac.h
cell_edac.c
cpc925_edac.c
e7xxx_edac.c
e752x_edac.c edac, mc: Improve scrub rate handling 2010-08-03 16:14:06 +02:00
edac_core.h i7core_edac: move #if PAGE_SHIFT to edac_core.h 2010-10-24 11:20:36 -02:00
edac_device.c
edac_device_sysfs.c
edac_mc.c i7core_edac: don't use a freed mci struct 2010-10-24 11:20:38 -02:00
edac_mc_sysfs.c i7core_edac: don't use a freed mci struct 2010-10-24 11:20:38 -02:00
edac_mce.c
edac_mce_amd.c amd64_edac: Do not report error overflow as a separate error 2010-08-26 12:46:03 +02:00
edac_mce_amd.h
edac_module.c
edac_module.h
edac_pci.c
edac_pci_sysfs.c
edac_stub.c
i7core_edac.c i7core_edac: Avoid PCI refcount to reach zero on successive load/reload 2010-10-24 11:20:41 -02:00
i3000_edac.c
i3200_edac.c
i5000_edac.c edac: i5000: improve handling of pci_enable_device() return value 2010-08-11 08:59:21 -07:00
i5100_edac.c edac, mc: Improve scrub rate handling 2010-08-03 16:14:06 +02:00
i5400_edac.c edac: i5400: improve handling of pci_enable_device() return value 2010-08-11 08:59:21 -07:00
i82443bxgx_edac.c
i82860_edac.c
i82875p_edac.c
i82975x_edac.c
Kconfig edac: Remove EDAC_DEBUG_VERBOSE 2010-08-03 16:14:00 +02:00
Makefile
mpc85xx_edac.c Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-08-12 09:11:31 -07:00
mpc85xx_edac.h
mv64x60_edac.c
mv64x60_edac.h
pasemi_edac.c
ppc4xx_edac.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
ppc4xx_edac.h
r82600_edac.c
x38_edac.c