Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Tetsuo Handa and committed by
Greg Kroah-Hartman
ae01e52d 7a2e8e30

+1 -1
+1 -1
drivers/tty/serial/serial_core.c
··· 622 622 return -EL3HLT; 623 623 624 624 port = uart_port_lock(state, flags); 625 - if (WARN_ON_ONCE(!state->port.xmit_buf)) { 625 + if (!state->port.xmit_buf) { 626 626 uart_port_unlock(port, flags); 627 627 return 0; 628 628 }