summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2024-05-29 00:05:53 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-04 14:10:43 +0200
commitae01e52da244af5d650378ada1bfd2d946dc1b45 (patch)
treef29a8673f19db4f147b61159d567e50b9c68a6f9 /drivers/tty
parent7a2e8e30ad89f498b206977396d028e10174390a (diff)
downloadlwn-ae01e52da244af5d650378ada1bfd2d946dc1b45.tar.gz
lwn-ae01e52da244af5d650378ada1bfd2d946dc1b45.zip
serial: drop debugging WARN_ON_ONCE() from uart_write()
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@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=f78380e4eae53c64125c Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/d775ae2d-a2ac-439e-8e2b-134749f60f30@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/serial_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 2c1a0254d3f4..0c4d60976663 100644
--- 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;
}