From patchwork Wed May 23 04:35:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 160809 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1E6C0B7008 for ; Wed, 23 May 2012 14:35:29 +1000 (EST) Received: from localhost ([::1]:60389 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX3IE-0005be-Tk for incoming@patchwork.ozlabs.org; Wed, 23 May 2012 00:35:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX3I1-0005SB-1U for qemu-devel@nongnu.org; Wed, 23 May 2012 00:35:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX3Hz-00075Z-84 for qemu-devel@nongnu.org; Wed, 23 May 2012 00:35:12 -0400 Received: from mail-yw0-f73.google.com ([209.85.213.73]:61945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX3Hy-000759-Tb for qemu-devel@nongnu.org; Wed, 23 May 2012 00:35:11 -0400 Received: by yhpp61 with SMTP id p61so987831yhp.4 for ; Tue, 22 May 2012 21:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=x0Xn4QkyLTKE5nBO/tMqGgoXERCXL48Uh5ePv2TrCEQ=; b=IzDTM7d501IMVTYuAVkZRk1VcsIIcJDce7khdNJiAbJf23P0qujpd93uqQ2ZrE2yXf CBbCrJnXHb/lkq3C44GSMAKUoMR/NtHQoJ00HEryyAh5XqB2xb31PF+Ng0QDNRvTbcpI DxE86+3xdU0vTjIBoAJ+UDJK6Z3lYpIArhx1E2sl4oR7UunaPCrvqnsoulAX9+LRqLKz dXiP1zIch+jrEXOON3Q/WY4Ij75Yc6vvB5mNOS5VlOroIA7Ey4mjcouEmE8lbhcqcREi sxKc8U6ohjgZfoHSnWrGqgyOvEN2S6gSxpL5Q1xi6FCcyVoQI3UyZx1Zw2+1UXJ9FtRh wICQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=x0Xn4QkyLTKE5nBO/tMqGgoXERCXL48Uh5ePv2TrCEQ=; b=aiYU90bktu/BxhT6T58R0j2o48UWurRXN084IeLimks09MrB3BdpmAyi1l3awH/wOO ma58rBpgOYmW5aOPmKH3hJSwyXqcmrblGa3vWbxyLlAj9hiRcXzW2eZR+jGEXsn9BIGv brzzipgLr1t0vliNMBraci0BVQJJjS1dr3F6INk53h3KHINW6TJZ9/8VT73tARVEnGVE jsBer2mwoGWyRWjcuhcjvga2mPXGmW8wo2iVovyzB6aowjH+OsoEQnYHrp6+JAwUZJ0h CfiUZf1PhEeBCKOrS26jzEF+g01iXfQUJYwjaeFgRfzb5wvx5A4XP4gV1SBEr1P8YT8A pcMQ== Received: by 10.101.175.34 with SMTP id c34mr13048466anp.13.1337747709216; Tue, 22 May 2012 21:35:09 -0700 (PDT) Received: by 10.101.175.34 with SMTP id c34mr13048424anp.13.1337747707304; Tue, 22 May 2012 21:35:07 -0700 (PDT) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id k35si19953672yhb.3.2012.05.22.21.35.06 (version=TLSv1/SSLv3 cipher=AES128-SHA); Tue, 22 May 2012 21:35:06 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (bhelgaas.mtv.corp.google.com [172.18.96.155]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id B9B381E004D; Tue, 22 May 2012 21:35:06 -0700 (PDT) Received: from bhelgaas.mtv.corp.google.com (unknown [IPv6:::1]) by bhelgaas.mtv.corp.google.com (Postfix) with ESMTP id 75A3D180171; Tue, 22 May 2012 21:35:06 -0700 (PDT) To: Amos Kong From: Bjorn Helgaas Date: Tue, 22 May 2012 22:35:06 -0600 Message-ID: <20120523043506.13449.81850.stgit@bhelgaas.mtv.corp.google.com> In-Reply-To: <20120523043347.13449.1063.stgit@bhelgaas.mtv.corp.google.com> References: <20120523043347.13449.1063.stgit@bhelgaas.mtv.corp.google.com> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkECr9XP4b6jOhws9FG/kOO1TdXRLPKckBC8PwcIVF02UyFOWsWjUlGfZXdGcwG8vNsUxBYxCL+vnqqGds9W7Zj6WbdoVYCFpCNKEzMXQRS6HFNGa8UwLVE+y0z8OC85zr7o2bMXvr1Rgff3pvZHcqBLEQoDw== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.213.73 Cc: linux-pci@vger.kernel.org, kaneshige.kenji@jp.fujitsu.com, qemu-devel@nongnu.org, jbarnes@virtuousgeek.org, liuj97@gmail.com Subject: [Qemu-devel] [PATCH v6 1/2] PCI: acpiphp: fix function 0 leak when disabling a slot X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Amos Kong Previously, we acquired two references to function 0, but only released one. [bhelgaas: split this out from "remove all functions" fix] Signed-off-by: Amos Kong Signed-off-by: Bjorn Helgaas --- drivers/pci/hotplug/acpiphp_glue.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 62d0ae4..c8f9991 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -893,6 +893,7 @@ static int disable_device(struct acpiphp_slot *slot) pdev = pci_get_slot(bus, PCI_DEVFN(slot->device, 0)); if (!pdev) goto err_exit; + pci_dev_put(pdev); list_for_each_entry(func, &slot->funcs, sibling) { if (func->bridge) {