Re: [syzbot] [serial?] possible deadlock in uart_write (2)

From: Hillf Danton
Date: Thu May 23 2024 - 07:31:28 EST


On Wed, 22 May 2024 23:23:26 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: de7e71ef8bed mm: simplify and improve print_vma_addr() out..
> git tree: upstream
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=140480ec980000

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git de7e71ef8bed

--- x/drivers/tty/serial/serial_core.c
+++ y/drivers/tty/serial/serial_core.c
@@ -622,8 +622,9 @@ static ssize_t uart_write(struct tty_str
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);
+ WARN_ON_ONCE(1);
return 0;
}

--