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: 160807 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B1F80B7015 for ; Wed, 23 May 2012 14:35:11 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357Ab2EWEfK (ORCPT ); Wed, 23 May 2012 00:35:10 -0400 Received: from mail-gg0-f202.google.com ([209.85.161.202]:39423 "EHLO mail-gg0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156Ab2EWEfJ (ORCPT ); Wed, 23 May 2012 00:35:09 -0400 Received: by ggeh3 with SMTP id h3so829248gge.1 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=jireVXKtZah7zzYvrDP+SlIFq6A/YVJWk6+9rgl9rZw+bwA1/xBuB3iSHjeEcK/Jgb cOad0awGoRZmp9EhMl8vuRUjtBRjw1FJCuVn7YhK7iiVykmiJgchaDObfGDdTjwPiOfL Z0dQVgZMM1s3AbzKYKmDQ0yBx2TTWo720q0qdE9pJ+1Eky+06CTyR2X2weTg+ib+kYpd hDx6drudFD1XHMXJx/s3t84HGdQKBJduP6ULSsrJYT5xBid9cMRNnwWw6GzceI5RDx7g JtyDc94mMNCx9XjbMpHvG8j2VCWg7uoqKwJGdLV8aa4t3c4DL6o4kpIn5eF25xL9ASys OYHA== Received: by 10.101.175.34 with SMTP id c34mr13048474anp.13.1337747709323; 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) Subject: [PATCH v6 1/2] PCI: acpiphp: fix function 0 leak when disabling a slot To: Amos Kong From: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, liuj97@gmail.com, qemu-devel@nongnu.org, jbarnes@virtuousgeek.org, kaneshige.kenji@jp.fujitsu.com 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: ALoCoQlJT13B1y7Xyfpv+rZpoLiR71wR60kl4dAkO3GyTtGUCIhGT4zedTjaq6kfxhaKa7Bj/OA3xt9L9QuVJZtPYqKo0GsnCqTKcGhtzShfIbOch7swi03FQIho6o5tAlfWLaMOgU69JcFDkTQzyZznpuFdP0XqTA== Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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) {