[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <acfef6bc-08eb-4ab6-b6d4-9ad03c714517@kernel.org>
Date: Mon, 3 Jun 2024 09:10:26 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
gregkh@...uxfoundation.org
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
Al Cooper <alcooperx@...il.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Kumaravel Thiagarajan <kumaravel.thiagarajan@...rochip.com>,
Tharun Kumar P <tharunkumar.pasumarthi@...rochip.com>,
Russell King <linux@...linux.org.uk>,
Vineet Gupta <vgupta@...nel.org>,
Richard Genoud <richard.genoud@...il.com>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
Alexander Shiyan <shc_work@...l.ru>,
Baruch Siach <baruch@...s.co.il>,
"Maciej W. Rozycki" <macro@...am.me.uk>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Neil Armstrong <neil.armstrong@...ar.smtp.subspace.kernel.org>
Subject: Re: [PATCH] serial: drop debugging WARN_ON_ONCE() from uart_write()
On 28. 05. 24, 17:05, Tetsuo Handa wrote:
> syzbot is reporting lockdep warning upon
>
> int disc = 7;
> ioctl(open("/dev/ttyS3", O_RDONLY), TIOCSETD, &disc);
>
> sequence. Do like what commit 5f1149d2f4bf ("serial: drop debugging
> WARN_ON_ONCE() from uart_put_char()") does.
>
> Reported-by: syzbot+f78380e4eae53c64125c@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=f78380e4eae53c64125c
> Signed-off-by: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Ugh, definitely:
Acked-by: Jiri Slaby <jirislaby@...nel.org>
> ---
> Example is https://syzkaller.appspot.com/text?tag=CrashReport&x=100271ec980000 .
> But not using this example, for this link will disappear eventually.
>
> By the way, do we want to also guard uart_port_lock'ed section using
> printk_deferred_enter()/printk_deferred_exit(), for trying to use e.g.
> WARN_ON() inside such section will result in the same lockdep warning?
At this point, I don't know the answer.
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -622,7 +622,7 @@ static ssize_t uart_write(struct tty_struct *tty, const u8 *buf, size_t count)
> return -EL3HLT;
>
> port = uart_port_lock(state, flags);
> - if (WARN_ON_ONCE(!state->port.xmit_buf)) {
> + if (!state->port.xmit_buf) {
> uart_port_unlock(port, flags);
> return 0;
> }
--
js
suse labs
Powered by blists - more mailing lists