serial: drop debugging WARN_ON_ONCE() from uart_put_char()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Tue, 16 Apr 2024 07:19:04 +0000 (09:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 11:09:52 +0000 (13:09 +0200)
commit5f1149d2f4bff6269f04cceaf1038d6e80d27a62
tree2ffb3c2235ec1e3245bb9fa5a6c2746bba4c9ccd
parent35fad98ed25ab9e08c4363f0f74efd612c8eb185
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@kernel.org>
Reported-by: Pengfei Xu <pengfei.xu@intel.com>
Link: https://lore.kernel.org/r/20240416071904.21440-1-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c