mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Niklas Schnelle <schnelle@linux.ibm.com>
To: "Benjamin Block" <bblock@linux.ibm.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Vasily Gorbik	 <gor@linux.ibm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Farhan Ali	 <alifm@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	linux-s390	 <linux-s390@vger.kernel.org>,
	Andreas Krebbel <krebbel@linux.ibm.com>,
	Julian Ruess <julianr@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Christian Borntraeger	 <borntraeger@linux.ibm.com>,
	Gerd Bayer <gbayer@linux.ibm.com>,
	linux-pci	 <linux-pci@vger.kernel.org>,
	Tobias Schumacher <ts@linux.ibm.com>,
	linux-kernel	 <linux-kernel@vger.kernel.org>,
	Ionut Nechita <ionut.nechita@windriver.com>,
	Ionut Nechita <ionut_n2001@yahoo.com>
Subject: Re: [PATCH 4/4] s390/pci: Use lock guard for pci_rescan_remove_lock
Date: Mon, 09 Mar 2026 16:49:55 +0100	[thread overview]
Message-ID: <9eaeb039418468fc591631b39609058634d4096b.camel@linux.ibm.com> (raw)
In-Reply-To: <20260309105415.GB46248@p1gen4-pw042f0m.fritz.box>

On Mon, 2026-03-09 at 11:54 +0100, Benjamin Block wrote:
> On Mon, Mar 09, 2026 at 09:38:45AM +0200, Ilpo Järvinen wrote:
> > On Fri, 6 Mar 2026, Benjamin Block wrote:
> > > -		pci_lock_rescan_remove();
> > > -		zpci_device_reserved(zdev);
> > > -		pci_unlock_rescan_remove();
> > > +		scoped_guard(pci_rescan_remove)
> > > +			zpci_device_reserved(zdev);
> > 
> > Order in this series is weird. Why not introduce *guard() support before 
> > the fix (reorder patches 2 and 3) and then use guard direct here so you 
> > don't have to immediately change the code again to "convert" it to use 
> > *guard() in patch 4?
> 
> The main intention here was to make it easier on me (and others) to retrofit
> this in stable and/or distribution Kernels. I know this isn't a main concern
> for the upstream master, but it would make my life a bit easier :)
> 
> Although, ofc., it isn't required, so in doubt, I can change it. Given that
> the Maintainers are actually OK with the use of guards, in any case.

I do like the guards but thinking about it, I also do have a slight
preference for adding the guard support first and using it directly.
I'm not entirely convinced this makes it harder to backport either.
From a quick check it looks like all relevant distros have the macro
and we do try to keep the code close to upstream so would just end up
backporting the lock guard conversion too maybe immediately maybe
later.

Thanks,
Niklas

      reply	other threads:[~2026-03-09 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 16:49 [PATCH 0/4] PCI: s390/pci: Fix deadlocks on s390 when releasing zPCI-bus or -device objects Benjamin Block
2026-03-06 16:49 ` [PATCH 1/4] PCI: Move declaration of pci_rescan_remove_lock into public pci.h Benjamin Block
2026-03-06 17:31   ` Keith Busch
2026-03-06 18:01     ` Benjamin Block
2026-03-06 16:49 ` [PATCH 2/4] s390/pci: Fix circular/recursive deadlocks in PCI-bus and -device release Benjamin Block
2026-03-06 16:49 ` [PATCH 3/4] PCI: Provide lock guard for pci_rescan_remove_lock Benjamin Block
2026-03-06 16:49 ` [PATCH 4/4] s390/pci: Use " Benjamin Block
2026-03-09  7:38   ` Ilpo Järvinen
2026-03-09 10:54     ` Benjamin Block
2026-03-09 15:49       ` Niklas Schnelle [this message]

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=9eaeb039418468fc591631b39609058634d4096b.camel@linux.ibm.com \
    --to=schnelle@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=alifm@linux.ibm.com \
    --cc=bblock@linux.ibm.com \
    --cc=bhelgaas@google.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gbayer@linux.ibm.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=ionut.nechita@windriver.com \
    --cc=ionut_n2001@yahoo.com \
    --cc=julianr@linux.ibm.com \
    --cc=krebbel@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=ts@linux.ibm.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

all inboxes | Powered by JetHome®