All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Rob Herring <robh@kernel.org>, Marc Zyngier <maz@kernel.org>,
	linux-pci <linux-pci@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: pci-ftpci100: race condition in masking/unmasking interrupts
Date: Tue, 7 Sep 2021 13:22:37 +0200	[thread overview]
Message-ID: <CACRpkdYe-Y-1YstovrJd7b8iNCDeX312mB4gLGcG1y6dE6di=A@mail.gmail.com> (raw)
In-Reply-To: <20210818114743.kksb7tydqjkww67h@pali>

On Wed, Aug 18, 2021 at 1:47 PM Pali Rohár <pali@kernel.org> wrote:

> I do not see any entry in MAINTAINERS file for pci-ftpci100.c driver, so
> I'm not sure to whom should I address this issue...

It's me.

> During pci-aardvark review, Marc pointed one issue which is currently
> available also in pci-ftpci100.c driver.
>
> When masking or unmasking interrupts there is read-modify-write sequence
> for FARADAY_PCI_CTRL2 register without any locking and is not atomic:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/controller/pci-ftpci100.c?h=v5.13#n270
>
> So there is race condition when masking/unmasking more interrupts at the
> same time.

I thought those operations were called in atomic context.
How did you fix it?

Yours,
Linus Walleij

  reply	other threads:[~2021-09-07 11:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 11:47 pci-ftpci100: race condition in masking/unmasking interrupts Pali Rohár
2021-09-07 11:22 ` Linus Walleij [this message]
2021-09-07 12:20   ` Pali Rohár
2021-09-07 16:53   ` Marc Zyngier

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='CACRpkdYe-Y-1YstovrJd7b8iNCDeX312mB4gLGcG1y6dE6di=A@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=maz@kernel.org \
    --cc=pali@kernel.org \
    --cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.