Skip to content

Commit

Permalink
serial: drop debugging WARN_ON_ONCE() from uart_write()
Browse files Browse the repository at this point in the history
syzbot is reporting lockdep warning upon

  int disc = 7;
  ioctl(open("/dev/ttyS3", O_RDONLY), TIOCSETD, &disc);

sequence. Do like what commit 5f1149d ("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>
  • Loading branch information
Tetsuo Handa authored and Greg Kroah-Hartman committed Jun 4, 2024
1 parent 7a2e8e3 commit ae01e52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ae01e52

Please sign in to comment.