mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: zhangjiao2 <zhangjiao2@cmss.chinamobile.com>
Cc: James.Bottomley@HansenPartnership.com,
	linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] parisc: fix race in iosapic_unmask_irq() missing spinlock
Date: Fri, 4 Dec 2026 20:14:35 +0100	[thread overview]
Message-ID: <5b4ed72a-f8ce-4100-b1b2-6f65dacef432@gmx.de> (raw)
In-Reply-To: <20261204095722.1909-1-zhangjiao2@cmss.chinamobile.com>

On 12/4/26 10:57, zhangjiao2 wrote:
> From: zhang jiao <zhangjiao2@cmss.chinamobile.com>
> 
> iosapic_unmask_irq() performs an IRDT entry write via
> iosapic_set_irt_data() + iosapic_wr_irt_entry() without holding
> iosapic_lock, while both iosapic_mask_irq() and
> iosapic_set_affinity_irq() correctly hold the lock during similar
> read-modify-write operations on the same hardware register.
> 
> This creates a race condition where iosapic_unmask_irq() can interleave
> its two 32-bit writes to the IRDT entry with writes from a concurrent
> set_affinity call, producing a corrupted hardware entry.
> 
> Add the missing spin_lock_irqsave/spin_unlock_irqrestore pair around
> the IRDT write, matching the pattern used by the mask and set_affinity
> callbacks.
> 
> Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
> ---
>   drivers/parisc/iosapic.c | 3 +++
>   1 file changed, 3 insertions(+)
Thanks for the patches, zhang jiao!
I've applied all 4 patches.

Thanks!
Helge

      reply	other threads:[~2026-12-04 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  9:57 zhangjiao2
2026-12-04 19:14 ` Helge Deller [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=5b4ed72a-f8ce-4100-b1b2-6f65dacef432@gmx.de \
    --to=deller@gmx.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=zhangjiao2@cmss.chinamobile.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®