The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Wang Zhaolong <wangzhaolong@fnnas.com>, gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, andriy.shevchenko@linux.intel.com,
	albanhuang@tencent.com, tombinfan@tencent.com,
	jackzxcui1989@163.com, kees@kernel.org,
	osama.abdelkader@gmail.com, realwujing@gmail.com
Subject: Re: [PATCH v2] serial: 8250: fix shared IRQ startup race causing IRQ warning
Date: Wed, 8 Jul 2026 08:03:04 +0200	[thread overview]
Message-ID: <25599a7f-e9cb-4aa0-a375-d9b4ed52be5e@kernel.org> (raw)
In-Reply-To: <20260708031115.3757150-1-wangzhaolong@fnnas.com>

Ah, you are fixing the same thing as:
https://lore.kernel.org/all/20260707-bug-221579-8250-shared-irq-race-v6-1-f8c499a90bdd@gmail.com/

I did not look up who of you was first.

Note the above contains you in the commit log:
Reported-by: Wang Zhaolong <wangzhaolong@fnnas.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221579

You both CCed each other, so you know the other's submission. I don't 
understand why you both send the patch? Anyway, you guys speak to each 
other and decide who sends the (fixed) patch.

On 08. 07. 26, 5:11, Wang Zhaolong wrote:
...
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -154,10 +152,18 @@ static struct irq_info *serial_get_or_create_irq_info(const struct uart_8250_por
>   static int serial_link_irq_chain(struct uart_8250_port *up)
>   {
>   	struct irq_info *i;
>   	int ret;
>   
> +	/*
> +	 * Keep the hash lock held until the first request_irq() completes.
> +	 * The first port publishes i->head before request_irq() starts the IRQ;
> +	 * a second port sharing the IRQ must not join the chain and run the
> +	 * THRE test while the IRQ core is still bringing the line up.
> +	 */
> +	guard(mutex)(&hash_mutex);

The same as in the other patch:
hash_mutex is no longer an appropriate name for this lock.

> +
>   	i = serial_get_or_create_irq_info(up);
>   	if (IS_ERR(i))
>   		return PTR_ERR(i);
>   
>   	scoped_guard(spinlock_irq, &i->lock) {

thanks,
-- 
js
suse labs

  reply	other threads:[~2026-07-08  6:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27  9:20 [PATCH] serial: 8250: serialize shared IRQ startup Wang Zhaolong
2026-06-24  2:49 ` Wang Zhaolong
2026-07-08  3:11 ` [PATCH v2] serial: 8250: fix shared IRQ startup race causing IRQ warning Wang Zhaolong
2026-07-08  6:03   ` Jiri Slaby [this message]
2026-07-08  6:20     ` Wang Zhaolong
2026-07-10 12:14       ` Greg KH
2026-07-08  7:23   ` [PATCH v3] " Wang Zhaolong
2026-07-08  7:45     ` Jing Wu
2026-07-08  8:47     ` [PATCH v6] serial: 8250: fix use-after-free in IRQ chain handling Jing Wu

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=25599a7f-e9cb-4aa0-a375-d9b4ed52be5e@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=albanhuang@tencent.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jackzxcui1989@163.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=osama.abdelkader@gmail.com \
    --cc=realwujing@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tombinfan@tencent.com \
    --cc=wangzhaolong@fnnas.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