public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Kamal Mostafa <kamal@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	kernel-team@lists.ubuntu.com
Cc: Aristeu Rozanski <aris@redhat.com>, Borislav Petkov <bp@suse.de>,
	Kamal Mostafa <kamal@canonical.com>
Subject: [PATCH 3.8 110/124] e752x_edac: Fix pci_dev usage count
Date: Mon, 10 Feb 2014 11:40:50 -0800	[thread overview]
Message-ID: <1392061264-28124-111-git-send-email-kamal@canonical.com> (raw)
In-Reply-To: <1392061264-28124-1-git-send-email-kamal@canonical.com>

3.8.13.18 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Aristeu Rozanski <aris@redhat.com>

commit 90ed4988b8c030d65b41b7d13140e9376dc6ec5a upstream.

In case the device 0, function 1 is not found using pci_get_device(),
pci_scan_single_device() will be used but, differently than
pci_get_device(), it allocates a pci_dev but doesn't does bump the usage
count on the pci_dev and after few module removals and loads the pci_dev
will be freed.

Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Reviewed-by: mark gross <mark.gross@intel.com>
Link: http://lkml.kernel.org/r/20131205153755.GL4545@redhat.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/edac/e752x_edac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index 644fec5..f1e9d7b 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -1182,9 +1182,11 @@ static int e752x_get_devs(struct pci_dev *pdev, int dev_idx,
 	pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL,
 				pvt->dev_info->err_dev, pvt->bridge_ck);
 
-	if (pvt->bridge_ck == NULL)
+	if (pvt->bridge_ck == NULL) {
 		pvt->bridge_ck = pci_scan_single_device(pdev->bus,
 							PCI_DEVFN(0, 1));
+		pci_dev_get(pvt->bridge_ck);
+	}
 
 	if (pvt->bridge_ck == NULL) {
 		e752x_printk(KERN_ERR, "error reporting device not found:"
-- 
1.8.3.2


  parent reply	other threads:[~2014-02-10 19:40 UTC|newest]

Thread overview: 126+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10 19:39 [3.8.y.z extended stable] Linux 3.8.13.18 stable review Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 001/124] KVM: s390: kvm/sigp.c: fix memory leakage Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 002/124] KVM: s390: Always store status during SIGP STOP_AND_STORE_STATUS Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 003/124] KVM: s390: fix diagnose code extraction Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 004/124] rtlwifi: rtl8192cu: Fix W=1 build warning Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 005/124] rtlwifi: rtl8192cu: Add new firmware Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 006/124] rtlwifi: Set the link state Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 007/124] rtlwifi: rtl8192cu: Fix duplicate if test Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 008/124] rtlwifi: rtl8192cu: Fix some code in RF handling Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 009/124] NFSv4: OPEN must handle the NFS4ERR_IO return code correctly Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 010/124] parport: parport_pc: remove double PCI ID for NetMos Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 011/124] staging: vt6656: [BUG] BBvUpdatePreEDThreshold Always set sensitivity on bScanning Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 012/124] [SCSI] bfa: Chinook quad port 16G FC HBA claim issue Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 013/124] usb: option: add new zte 3g modem pids to option driver Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 014/124] [media] dib8000: make 32 bits read atomic Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 015/124] serial: add support for 200 v3 series Titan card Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 016/124] usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix() Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 017/124] [media] anysee: fix non-working E30 Combo Plus DVB-T Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 018/124] x86/efi: Fix off-by-one bug in EFI Boot Services reservation Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 019/124] perf kvm: Fix kvm report without guestmount Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 020/124] rtc-cmos: Add an alarm disable quirk Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 021/124] slub: Fix calculation of cpu slabs Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 022/124] mtd: mxc_nand: remove duplicated ecc_stats counting Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 023/124] xen/pvhvm: If xen_platform_pci=0 is set don't blow up (v4) Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 024/124] USB: pl2303: fix data corruption on termios updates Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 025/124] USB: serial: add support for iBall 3.5G connect usb modem Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 026/124] USB: Nokia 502 is an unusual device Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 027/124] USB: cypress_m8: fix ring-indicator detection and reporting Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 028/124] ALSA: rme9652: fix a missing comma in channel_map_9636_ds[] Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 029/124] SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 030/124] sunrpc: Fix infinite loop in RPC state machine Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 031/124] tpm/tpm_ppi: Do not compare strcmp(a,b) == -1 Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 032/124] dm thin: initialize dm_thin_new_mapping returned by get_next_mapping Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 033/124] dm thin: fix discard support to a previously shared block Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 034/124] dm thin: fix set_pool_mode exposed pool operation races Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 035/124] SELinux: Fix memory leak upon loading policy Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 036/124] drm/radeon: warn users when hw_i2c is enabled (v2) Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 037/124] USB: fix race between hub_disconnect and recursively_mark_NOTATTACHED Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 038/124] ext4: avoid clearing beyond i_blocks when truncating an inline data file Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 039/124] USB: ftdi_sio: added CS5 quirk for broken smartcard readers Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 040/124] dm: wait until embedded kobject is released before destroying a device Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 041/124] dm space map common: make sure new space is used during extend Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 042/124] ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 043/124] radeon/pm: Guard access to rdev->pm.power_state array Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 044/124] drm/radeon: skip colorbuffer checking if COLOR_INFO.FORMAT is set to INVALID Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 045/124] staging: r8712u: Set device type to wlan Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 046/124] ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 047/124] [media] media: s5p_mfc: remove s5p_mfc_get_node_type() function Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 048/124] mmc: atmel-mci: fix timeout errors in SDIO mode when using DMA Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 049/124] ftrace: Check module functions being traced on reload Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 050/124] ftrace: Fix function graph with loading of modules Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 051/124] ftrace: Use schedule_on_each_cpu() as a heavy synchronize_sched() Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 052/124] ftrace: Fix synchronization location disabling and freeing ftrace_ops Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 053/124] rtlwifi: rtl8192cu: Add new device ID Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 054/124] mwifiex: add missing endian conversion for fw_tsf Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 055/124] b43: Fix lockdep splat Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 056/124] b43: Fix unload oops if firmware is not available Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 057/124] b43legacy: " Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 058/124] nfs4.1: properly handle ENOTSUP in SECINFO_NO_NAME Kamal Mostafa
2014-02-10 19:39 ` [PATCH 3.8 059/124] usb: ehci: add freescale imx28 special write register method Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 060/124] audit: reset audit backlog wait time after error recovery Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 061/124] audit: correct a type mismatch in audit_syscall_exit() Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 062/124] xtensa: xtfpga: fix definitions of platform devices Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 063/124] dm sysfs: fix a module unload race Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 064/124] KVM: x86: limit PIT timer frequency Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 065/124] ata: sata_mv: introduce compatible string "marvell, armada-370-sata" Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 066/124] ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 067/124] arm: mvebu: fix length of SATA registers area in .dtsi Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 068/124] ARM: mvebu: update the SATA compatible string for Armada 370/XP Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 069/124] md/raid5: fix long-standing problem with bitmap handling on write failure Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 070/124] x86: Add check for number of available vectors before CPU down Kamal Mostafa
     [not found]   ` <52F973E0.7030400@redhat.com>
2014-02-11 22:29     ` Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 071/124] libata: disable LPM for some WD SATA-I devices Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 072/124] mmc: sdhci: fix lockdep error in tuning routine Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 073/124] turbostat: Don't put unprocessed uapi headers in the include path Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 074/124] turbostat: Use GCC's CPUID functions to support PIC Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 075/124] drm/radeon: disable ss on DP for DCE3.x Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 076/124] nfs4: fix discover_server_trunking use after free Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 077/124] drm/radeon: fix surface sync in fence on cayman (v2) Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 078/124] drm/radeon: set the full cache bit for fences on r7xx+ Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 079/124] mfd: max77686: Fix regmap resource leak on driver remove Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 080/124] hp_accel: Add a new PnP ID HPQ6007 for new HP laptops Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 081/124] ASoC: wm5110: Extend SYSCLK patch file for rev D Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 082/124] intel-iommu: fix off-by-one in pagetable freeing Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 083/124] arch/sh/kernel/kgdb.c: add missing #include <linux/sched.h> Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 084/124] fuse: fix pipe_buf_operations Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 085/124] drm/cirrus: correct register values for 16bpp Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 086/124] IB/qib: Fix QP check when looping back to/from QP1 Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 087/124] ore: Fix wrong math in allocation of per device BIO Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 088/124] drm/i915: VLV2 - Fix hotplug detect bits Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 089/124] b43: fix the wrong assignment of status.freq in b43_rx() Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 090/124] rtc: max8907: weekday encoding fixes Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 091/124] vfs: Is mounted should be testing mnt_ns for NULL or error Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 092/124] Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot() Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 093/124] btrfs: restrict snapshotting to own subvolumes Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 094/124] ACPI / init: Flag use of ACPI and ACPI idioms for power supplies to regulator API Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 095/124] drm/ast: do not attempt to acquire a reservation while in an interrupt handler Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 096/124] drm/cirrus: " Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 097/124] drm/mgag200: " Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 098/124] drm: ast,cirrus,mgag200: use drm_can_sleep Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 099/124] powerpc: Make sure "cache" directory is removed when offlining cpu Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 100/124] drm/radeon/DCE4+: clear bios scratch dpms bit (v2) Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 101/124] mm/page-writeback.c: fix dirty_balance_reserve subtraction from dirtyable memory Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 102/124] mm/page-writeback.c: do not count anon pages as " Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 103/124] mm: numa: initialise numa balancing after jump label initialisation Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 104/124] target/iscsi: Fix network portal creation race Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 105/124] mm/mempolicy.c: fix mempolicy printing in numa_maps Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 106/124] mm, oom: base root bonus on current usage Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 107/124] alpha: fix broken network checksum Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 108/124] hpfs: remember free space Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 109/124] drm/nouveau/bios: fix offset calculation for BMPv1 bioses Kamal Mostafa
2014-02-10 19:40 ` Kamal Mostafa [this message]
2014-02-10 19:40 ` [PATCH 3.8 111/124] bnx2x: fix DMA unmapping of TSO split BDs Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 112/124] inet_diag: fix inet_diag_dump_icsk() timewait socket state logic Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 113/124] ieee802154: Fix memory leak in ieee802154_add_iface() Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 114/124] net: avoid reference counter overflows on fib_rules in multicast forwarding Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 115/124] net,via-rhine: Fix tx_timeout handling Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 116/124] tcp: metrics: Avoid duplicate entries with the same destination-IP Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 117/124] bpf: do not use reciprocal divide Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 118/124] s390/bpf,jit: fix 32 bit divisions, use unsigned divide instructions Kamal Mostafa
2014-02-10 19:40 ` [PATCH 3.8 119/124] fib_frontend: fix possible NULL pointer dereference Kamal Mostafa
2014-02-10 19:41 ` [PATCH 3.8 120/124] net: Fix memory leak if TPROXY used with TCP early demux Kamal Mostafa
2014-02-10 19:41 ` [PATCH 3.8 121/124] xen-netfront: fix resource leak in netfront Kamal Mostafa
2014-02-10 19:41 ` [PATCH 3.8 122/124] sit: fix double free of fb_tunnel_dev on exit Kamal Mostafa
2014-02-10 19:41 ` [PATCH 3.8 123/124] Revert "ip6tnl: fix use after free of fb_tnl_dev" Kamal Mostafa
2014-02-10 19:41 ` [PATCH 3.8 124/124] ip6tnl: fix double free of fb_tnl_dev on exit Kamal Mostafa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392061264-28124-111-git-send-email-kamal@canonical.com \
    --to=kamal@canonical.com \
    --cc=aris@redhat.com \
    --cc=bp@suse.de \
    --cc=kernel-team@lists.ubuntu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox