[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240416071904.21440-1-jirislaby@kernel.org>
Date: Tue, 16 Apr 2024 09:19:04 +0200
From: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
To: gregkh@...uxfoundation.org
Cc: linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org,
"Jiri Slaby (SUSE)" <jirislaby@...nel.org>,
Pengfei Xu <pengfei.xu@...el.com>
Subject: [PATCH] serial: drop debugging WARN_ON_ONCE() from uart_put_char()
Pengfei Xu reports, that the -next commit 1788cf6a91d9 (tty: serial:
switch from circ_buf to kfifo) tries to emit a WARNING and that leads to
lockdep errors. Obviously we cannot print anything from uart_put_char()!
This WARN_ON_ONCE() was/is a debug aid to check if the condition in
uart_put_char() can happen at all. Pengfei Xu confirmed it can. Unlike
me and kbuild bot in my queue.
Second, I completely forgot about it, so I did not remove it in the
final version, nor mentioned it in the commit log.
Drop it now as we are all good. And we even have stack traces (and a
reproducer)!
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
Reported-by: Pengfei Xu <pengfei.xu@...el.com>
---
drivers/tty/serial/serial_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 558f159ada15..bd4a72f8e821 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -573,7 +573,7 @@ static int uart_put_char(struct tty_struct *tty, u8 c)
int ret = 0;
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;
}
--
2.44.0
Powered by blists - more mailing lists