From: Heiko Carstens <hca@linux.ibm.com>
To: Pingfan Liu <kernelfans@gmail.com>
Cc: linux-s390@vger.kernel.org, Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/9] s390/irq: utilize RCU instead of irq_lock_sparse() in show_msi_interrupt()
Date: Wed, 20 Apr 2022 20:16:37 +0200 [thread overview]
Message-ID: <YmBOBRMWlk4H11sc@osiris> (raw)
In-Reply-To: <20220420140521.45361-5-kernelfans@gmail.com>
On Wed, Apr 20, 2022 at 10:05:16PM +0800, Pingfan Liu wrote:
> irq_desc can be accessed safely in RCU read section as demonstrated by
> kstat_irqs_usr(). And raw_spin_lock_irqsave() context can provide a rcu
> read section, which can be utilized to get rid of irq_lock_sparse().
>
> Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> Cc: Heiko Carstens <hca@linux.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Alexander Gordeev <agordeev@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
> Cc: Sven Schnelle <svens@linux.ibm.com>
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: linux-kernel@vger.kernel.org
> To: linux-s390@vger.kernel.org
> ---
> arch/s390/kernel/irq.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
> index 3033f616e256..6302dc7874cf 100644
> --- a/arch/s390/kernel/irq.c
> +++ b/arch/s390/kernel/irq.c
> @@ -205,12 +205,13 @@ static void show_msi_interrupt(struct seq_file *p, int irq)
> unsigned long flags;
> int cpu;
>
> - irq_lock_sparse();
> + raw_spin_lock_irqsave(&desc->lock, flags);
> desc = irq_to_desc(irq);
How is this supposed to work? desc get's initialized after its random
stack value has been used as a pointer to lock something...
next prev parent reply other threads:[~2022-04-20 18:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220420140521.45361-1-kernelfans@gmail.com>
2022-04-20 14:05 ` [PATCH 4/9] s390/irq: utilize RCU instead of irq_lock_sparse() in show_msi_interrupt() Pingfan Liu
2022-04-20 18:16 ` Heiko Carstens [this message]
2022-04-21 3:36 ` Pingfan Liu
2022-04-21 11:42 ` Heiko Carstens
2022-04-22 9:56 ` Pingfan Liu
2022-04-22 10:02 ` [PATCHv2] " Pingfan Liu
2022-04-25 11:39 ` Heiko Carstens
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=YmBOBRMWlk4H11sc@osiris \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=bigeasy@linutronix.de \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=kernelfans@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=svens@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