public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
From: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
To: <mark-pk.tsai@mediatek.com>
Cc: <gregkh@linuxfoundation.org>, <johan+linaro@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>, <matthias.bgg@gmail.com>,
	<maz@kernel.org>, <stable@vger.kernel.org>, <tglx@linutronix.de>
Subject: [PATCH 5.4 3/3] irqdomain: Fix mapping-creation race
Date: Tue, 11 Apr 2023 18:22:03 +0800	[thread overview]
Message-ID: <20230411102203.29646-1-mark-pk.tsai@mediatek.com> (raw)
In-Reply-To: <20230322124550.29812-1-mark-pk.tsai@mediatek.com>

> From: Johan Hovold <johan+linaro@kernel.org>
> 
> [ Upstream commit 601363cc08da25747feb87c55573dd54de91d66a ]
> 
> Parallel probing of devices that share interrupts (e.g. when a driver
> uses asynchronous probing) can currently result in two mappings for the
> same hardware interrupt to be created due to missing serialisation.
> 
> Make sure to hold the irq_domain_mutex when creating mappings so that
> looking for an existing mapping before creating a new one is done
> atomically.
> 
> Fixes: 765230b5f084 ("driver-core: add asynchronous probing support for drivers")
> Fixes: b62b2cf5759b ("irqdomain: Fix handling of type settings for existing mappings")
> Link: https://lore.kernel.org/r/YuJXMHoT4ijUxnRb@hovoldconsulting.com
> Cc: stable@vger.kernel.org      # 4.8
> Cc: Dmitry Torokhov <dtor@chromium.org>
> Cc: Jon Hunter <jonathanh@nvidia.com>
> Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
> Tested-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> Link: https://lore.kernel.org/r/20230213104302.17307-7-johan+linaro@kernel.org
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>

5.4 also need this patch.
Could someone please help to review it?

Thanks,
Mark-PK Tsai


  parent reply	other threads:[~2023-04-11 10:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 12:45 [PATCH 5.4 1/3] irqdomain: Look for existing mapping only once Mark-PK Tsai
2023-03-22 12:45 ` [PATCH 5.4 2/3] irqdomain: Refactor __irq_domain_alloc_irqs() Mark-PK Tsai
2023-04-11 14:19   ` Patch "irqdomain: Refactor __irq_domain_alloc_irqs()" has been added to the 5.4-stable tree gregkh
2023-03-22 12:45 ` [PATCH 5.4 3/3] irqdomain: Fix mapping-creation race Mark-PK Tsai
2023-04-11 14:19   ` Patch "irqdomain: Fix mapping-creation race" has been added to the 5.4-stable tree gregkh
2023-04-11 10:22 ` Mark-PK Tsai [this message]
2023-04-11 14:19 ` Patch "irqdomain: Look for existing mapping only once" " gregkh

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=20230411102203.29646-1-mark-pk.tsai@mediatek.com \
    --to=mark-pk.tsai@mediatek.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan+linaro@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=maz@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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