From: "Krzysztof Wilczyński" <kw@linux.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Gianfranco Dutka <gianfranco.dutka@arista.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI/sysfs: NULL res_attr slot after kfree as defence against double-remove
Date: Thu, 21 May 2026 21:01:21 +0900 [thread overview]
Message-ID: <20260521115906.GC647881@rocinante> (raw)
In-Reply-To: <376c679c-8637-d19a-48d1-165d8f2fc2f0@linux.intel.com>
> To me it looks more like pci_remove_resource_files() is expected to be
> entered only once.
>
> If this change is accepted, the 2nd entry is "silently" allowed whereas
> better course of action would feel to catch that in
> pci_remove_resource_files() with:
>
> if (WARN_ON_ONCE(something))
> return;
>
> That way, developers may become aware the code has some lifetime issue.
>
> (I'm not strictly against your change but I think it would be much better
> to have sane lifetimes and catch offenders.)
The upcoming sysfs changes would remove pci_remove_resource_files()
completely, so there would not be anything needed to be done here,
hopefully.
Thank you!
Krzysztof
next prev parent reply other threads:[~2026-05-21 12:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 21:13 Gianfranco Dutka
2026-05-20 22:45 ` Gianfranco Dutka
2026-05-21 11:54 ` Krzysztof Wilczyński
2026-05-21 10:22 ` Ilpo Järvinen
2026-05-21 12:01 ` Krzysztof Wilczyński [this message]
2026-05-21 12:04 ` Ilpo Järvinen
2026-05-21 11:59 ` Krzysztof Wilczyński
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=20260521115906.GC647881@rocinante \
--to=kw@linux.com \
--cc=bhelgaas@google.com \
--cc=gianfranco.dutka@arista.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@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
all inboxes | Powered by JetHome®