LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: pcie-uniphier: race condition in masking/unmasking interrupts
Date: Thu, 19 Aug 2021 19:01:39 +0900 [thread overview]
Message-ID: <1328d293-7c42-b29b-9cce-507cf25de97a@socionext.com> (raw)
In-Reply-To: <20210818113820.fzjeouy6tohbzuad@pali>
Hi Pali,
On 2021/08/18 20:38, Pali Rohár wrote:
> Hello!
>
> Marc pointed during review of pci-aardvark patches one issue which I see
> that is available also in the current pcie-uniphier.c driver.
>
> When masking or unmasking interrupts there is read-modify-write sequence
> for PCL_RCV_INTX_MASK_SHIFT register without any locking:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/dwc/pcie-uniphier.c?h=v5.13#n171
>
> So when trying to mask/unmask two interrupts at the same time there is
> race condition as updating that PCL_RCV_INTX_MASK_SHIFT register is not
> atomic.
>
> Could you look at it?
Thank you for pointing out.
I'll update the mask/unmask/ack operations to avoid race condition.
Thank you,
---
Best Regards
Kunihiko Hayashi
prev parent reply other threads:[~2021-08-19 10:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-18 11:38 Pali Rohár
2021-08-19 10:01 ` Kunihiko Hayashi [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=1328d293-7c42-b29b-9cce-507cf25de97a@socionext.com \
--to=hayashi.kunihiko@socionext.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=maz@kernel.org \
--cc=pali@kernel.org \
--subject='Re: pcie-uniphier: race condition in masking/unmasking interrupts' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).