Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Betty Dall <betty.dall@hp.com>
To: bhelgaas@google.com, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org
Cc: wangyijing@huawei.com, jiang.liu@huawei.com,
	Betty Dall <betty.dall@hp.com>
Subject: [PATCH] PCI AER: pci_get_domain_bus_and_slot() call missing required pci_dev_put()
Date: Mon,  3 Dec 2012 09:37:02 -0700	[thread overview]
Message-ID: <1354552622-687-1-git-send-email-betty.dall@hp.com> (raw)

The function aer_recover_queue() makes a call to pci_get_domain_bus_and_slot().
That function is documented to require that the caller decrement the
reference count by calling pci_dev_put(). This patch adds the missing
call to pci_dev_put().

Signed-off-by: Betty Dall <betty.dall@hp.com>
---
 drivers/pci/pcie/aer/aerdrv_core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c
index af4e31c..43caf53 100644
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -616,6 +616,7 @@ static void aer_recover_work_func(struct work_struct *work)
 			continue;
 		}
 		do_recovery(pdev, entry.severity);
+		pci_dev_put(pdev);
 	}
 }
 #endif
-- 
1.7.7.6


             reply	other threads:[~2012-12-03 16:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 16:37 Betty Dall [this message]
2012-12-03 17:40 ` [PATCH] PCI AER: pci_get_domain_bus_and_slot() call missing required pci_dev_put() Shuah Khan
2012-12-03 19:48   ` Alex Williamson
2012-12-03 20:00     ` Alex Williamson
2012-12-03 20:59       ` Shuah Khan
2013-01-07 18:46         ` Bjorn Helgaas
2012-12-03 20:01     ` Shuah Khan

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=1354552622-687-1-git-send-email-betty.dall@hp.com \
    --to=betty.dall@hp.com \
    --cc=bhelgaas@google.com \
    --cc=jiang.liu@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=wangyijing@huawei.com \
    /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