diff options
author | Jean Delvare <jdelvare@suse.de> | 2014-02-25 08:43:13 (GMT) |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-03-05 16:13:54 (GMT) |
commit | 6e511735ceacf47932d0c123f786df7698a221b8 (patch) | |
tree | 4faf8aed0c1f86b7ecd9643ea87ecd750ec0b137 /drivers/iio/common | |
parent | 1222b6db1d6b92b995b57b41a4f1f5c8c27a67ad (diff) | |
download | linux-fsl-qoriq-6e511735ceacf47932d0c123f786df7698a221b8.tar.xz |
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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/iio/common')
0 files changed, 0 insertions, 0 deletions