Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1004114pxj; Thu, 27 May 2021 17:35:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzc+QJJWhodlwUNwTrlDUptBh94w4FeffB4KznavvDiwuM65OPPozv/zZhArZOmEZ0MTU+4 X-Received: by 2002:a17:906:35d2:: with SMTP id p18mr4529671ejb.55.1622162157632; Thu, 27 May 2021 17:35:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622162157; cv=none; d=google.com; s=arc-20160816; b=0ORIjydcdJHrNdWWHFYn3zn8WOJPHhA1UMoQXCLQNg+XUYeAaI5Vy1YD2RybZMbWaH EOxjEAHcKY79bVqO6bQX4CSCuVUfvO5u5zajXZJRlWRFwrFmd1zzM0tLCVvyTWAE+K1N NzciXklg9QIF8VzBcavAcA+/RvehBampp1flUzLZjoFKdb9Hq/Q5ClFw/F6xYX9aLJqx 0omf2nSwlblEWu/GIR45+ycdkgFCRYLP/gJLL5K/nEIMLoqv/6mwFqO6JZ1ZX9sbwygb COHKdjDBHp//O9lxu1V3edNyo4kXUiA1ETKsfjBkRHeJ0YIVW0wWX6DbIGjjKRa5giHK RJRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=1rZOXd0EZeil3NqusnTHY9IAVMIum6AdEDrL3eg4RlE=; b=VFxACTl7RQtGN0I8Ss6Uf+a4lIyqLQKyris9nNGRyU8OwXmWyI2NbL/YqP2Ic0WULP L1U1HEjnnOSNZP5dF9mxFJlL/r8cnbWlgzUPbEYu+0rLq2tvZszPMrslv3Q/G/Wvxd3E gCIN2c0CrPwMPYmozCA5qgFAghA8tO4ztBWyYW3FelFcVeyReY5o5bJ21KQLNSq11At7 o428lIfPxMkMmUdhXfmyxlqj0dmBm5E1ha4U4yC3MNKuoS2JY7mqcxrZkhiCdo1aw5Cn v9fN7RsMkGkklV4WHsWSakthds2xs8bS0eo2CJIrFRIWL32FZuBE3lqafW4XLrfRFFbG k79w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="eNXa/m/u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si3449158ejn.440.2021.05.27.17.35.33; Thu, 27 May 2021 17:35:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="eNXa/m/u"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235262AbhE1AAO (ORCPT + 99 others); Thu, 27 May 2021 20:00:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:46232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235756AbhE1AAE (ORCPT ); Thu, 27 May 2021 20:00:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B7FB460233; Thu, 27 May 2021 23:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622159911; bh=LReRf0mXlMHM2Ka7rklNEdQGl/501pPEF+NpmvBZqYU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=eNXa/m/uSA7ovrxDeAzCRvUR3coWOr84LPHuK7rlUtoyTxuQtSC7Ff2iqznjWpTPH GIgkwIDOgJZF2SfV8s9jG+wusmsIZwZ6NtDZ12Lk92NG8wDOjW9Af+BS0kBh7u1PvQ o4oL14ApRwxKzZfMrdrllJ5KxMuX+b/1249cSnBNCNxniRWazIlkpudWCu0U3o/7pl JdiHK/hver9Swk2sh5j7wjM8aY9SZN+dwKOahlq9QJNaeul8ZNBGZE6ChMX8ctr18/ x9TBF5TB/E++bt4pg3BDKJZtFxYV1pS8kXjtalowXe+ZDvMf+8sSQvet8Ls7Eo8fxX ym2isvlMvFVlg== Date: Thu, 27 May 2021 18:58:29 -0500 From: Bjorn Helgaas To: Niklas Schnelle Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: Print a debug message on PCI device release Message-ID: <20210527235829.GA1447806@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210311132312.2882425-1-schnelle@linux.ibm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 11, 2021 at 02:23:12PM +0100, Niklas Schnelle wrote: > Commit 62795041418d ("PCI: enhance physical slot debug information") > added a debug print on releasing the PCI slot and another message on > destroying it. There is however no debug print on releasing the PCI > device structure itself and even with closely looking at the kernel log > during hotplug testing, I overlooked several missing pci_dev_put() calls > for way too long. So let's add a debug print in pci_release_dev() making > it much easier to spot when the PCI device structure is not released > when it is supposed to. > > Signed-off-by: Niklas Schnelle Applied to pci/enumeration for v5.14, thanks! > --- > drivers/pci/probe.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 953f15abc850..3e3669a00a2f 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -2226,6 +2226,7 @@ static void pci_release_dev(struct device *dev) > pci_bus_put(pci_dev->bus); > kfree(pci_dev->driver_override); > bitmap_free(pci_dev->dma_alias_mask); > + dev_dbg(dev, "device released\n"); > kfree(pci_dev); > } > > -- > 2.25.1 >