bisecting fixing commit since 31acccdc877486a649a86d37725a15175fcd5ed6 building syzkaller on 1bf9a662c66aa432ff2fe3bf2562578cef626c09 testing commit 31acccdc877486a649a86d37725a15175fcd5ed6 with gcc (GCC) 8.4.1 20210217 kernel signature: 4a03a92f9ffe5b5c50b3cd3ffdcd96c28cb2ea4be69f9ef81c8caf334ee0b5bd run #0: crashed: possible deadlock in console_unlock run #1: crashed: possible deadlock in console_unlock run #2: crashed: possible deadlock in tty_port_close_start run #3: crashed: possible deadlock in console_unlock run #4: crashed: possible deadlock in tty_port_close_start run #5: crashed: possible deadlock in console_unlock run #6: crashed: possible deadlock in console_unlock run #7: crashed: possible deadlock in console_unlock run #8: crashed: possible deadlock in tty_port_close_start run #9: crashed: possible deadlock in tty_port_close_start run #10: crashed: possible deadlock in console_unlock run #11: crashed: possible deadlock in console_unlock run #12: crashed: possible deadlock in console_unlock run #13: crashed: possible deadlock in tty_port_close_start run #14: crashed: possible deadlock in console_unlock run #15: crashed: possible deadlock in console_unlock run #16: crashed: possible deadlock in console_unlock run #17: crashed: possible deadlock in console_unlock run #18: crashed: possible deadlock in console_unlock run #19: crashed: possible deadlock in console_unlock testing current HEAD 9a2dc0e6c531d595bcdf2c66d0be131679bd02df testing commit 9a2dc0e6c531d595bcdf2c66d0be131679bd02df with gcc (GCC) 8.4.1 20210217 kernel signature: 36bbfa898b8e4ff6213a6fd7f7eae4fe5c005e1fae8a5d73c6359cf47c74d3f5 all runs: OK # git bisect start 9a2dc0e6c531d595bcdf2c66d0be131679bd02df 31acccdc877486a649a86d37725a15175fcd5ed6 Bisecting: 1317 revisions left to test after this (roughly 10 steps) [4fae2d6e917bcb6ea098055b494e844fcfe2f916] perf intel-pt: Fix missing CYC processing in PSB testing commit 4fae2d6e917bcb6ea098055b494e844fcfe2f916 with gcc (GCC) 8.4.1 20210217 kernel signature: c95b76326a6eb2b0d80b78dd9bb2a1e1b951f88347cc66ea061029d2bbf3688a run #0: crashed: possible deadlock in console_unlock run #1: crashed: possible deadlock in tty_port_close_start run #2: crashed: possible deadlock in console_unlock run #3: crashed: possible deadlock in console_unlock run #4: crashed: possible deadlock in console_unlock run #5: crashed: possible deadlock in console_unlock run #6: crashed: possible deadlock in console_unlock run #7: crashed: possible deadlock in console_unlock run #8: crashed: possible deadlock in console_unlock run #9: crashed: possible deadlock in console_unlock # git bisect good 4fae2d6e917bcb6ea098055b494e844fcfe2f916 Bisecting: 658 revisions left to test after this (roughly 9 steps) [e9e0c8b649d213877e84c1940b302d937e019a43] net: usb: ax88179_178a: initialize local variables before use testing commit e9e0c8b649d213877e84c1940b302d937e019a43 with gcc (GCC) 8.4.1 20210217 kernel signature: 7e7d465e3d94091adbd58695f8445131a91364aaca888f79dc0cf4d5d5292e6d run #0: crashed: possible deadlock in console_unlock run #1: crashed: possible deadlock in console_unlock run #2: crashed: possible deadlock in console_unlock run #3: crashed: possible deadlock in console_unlock run #4: crashed: possible deadlock in console_unlock run #5: crashed: possible deadlock in console_unlock run #6: crashed: possible deadlock in tty_port_close_start run #7: crashed: possible deadlock in console_unlock run #8: crashed: possible deadlock in console_unlock run #9: crashed: possible deadlock in console_unlock # git bisect good e9e0c8b649d213877e84c1940b302d937e019a43 Bisecting: 329 revisions left to test after this (roughly 8 steps) [2bb2ff46d21d6794fd298df177199a2bb3b98434] cuse: prevent clone testing commit 2bb2ff46d21d6794fd298df177199a2bb3b98434 with gcc (GCC) 8.4.1 20210217 kernel signature: c96e51e2220ce04b9726f46b0c7a7f0ce67fd1aa58195e02400d3cec7529e8df all runs: basic kernel testing failed: unregister_netdevice: waiting for DEV to become free # git bisect skip 2bb2ff46d21d6794fd298df177199a2bb3b98434 Bisecting: 329 revisions left to test after this (roughly 8 steps) [9bb628ef37f817c8ec1db1b6844d9b2a0cab4f73] net: stmmac: Set FIFO sizes for ipq806x testing commit 9bb628ef37f817c8ec1db1b6844d9b2a0cab4f73 with gcc (GCC) 8.4.1 20210217 kernel signature: 633d75462ed675993fd57d1a5764ad589caba471cad70b20e68f975ce6fef85b all runs: OK # git bisect bad 9bb628ef37f817c8ec1db1b6844d9b2a0cab4f73 Bisecting: 157 revisions left to test after this (roughly 7 steps) [0e045bb60dca1e8d3c936a1a576cc1ecfa36f110] drm/radeon: fix copy of uninitialized variable back to userspace testing commit 0e045bb60dca1e8d3c936a1a576cc1ecfa36f110 with gcc (GCC) 8.4.1 20210217 kernel signature: e7eebbebd3fb90f08d0d04e870107ac6befe706cae83603e1619a3cbb368dab9 run #0: crashed: possible deadlock in console_unlock run #1: crashed: possible deadlock in tty_port_close_start run #2: crashed: possible deadlock in console_unlock run #3: crashed: possible deadlock in console_unlock run #4: crashed: possible deadlock in console_unlock run #5: crashed: possible deadlock in console_unlock run #6: crashed: possible deadlock in console_unlock run #7: crashed: possible deadlock in console_unlock run #8: crashed: possible deadlock in console_unlock run #9: crashed: possible deadlock in tty_port_close_start # git bisect good 0e045bb60dca1e8d3c936a1a576cc1ecfa36f110 Bisecting: 78 revisions left to test after this (roughly 6 steps) [6055d45830eebf9dc5f2e7a656377da9df86884c] media: vivid: fix assignment of dev->fbuf_out_flags testing commit 6055d45830eebf9dc5f2e7a656377da9df86884c with gcc (GCC) 8.4.1 20210217 kernel signature: 94afccaa68387496e765347995f5ca730849083c111ff965a457d1f3f6c3f78a all runs: OK # git bisect bad 6055d45830eebf9dc5f2e7a656377da9df86884c Bisecting: 38 revisions left to test after this (roughly 5 steps) [183b6757bdb9db0a20e30c8f558bff027d79cc67] fotg210-udc: Don't DMA more than the buffer can take testing commit 183b6757bdb9db0a20e30c8f558bff027d79cc67 with gcc (GCC) 8.4.1 20210217 kernel signature: 039a134c67828d04be9ca40c5876529e040139ad172910d8041c26b9aabb3659 run #0: crashed: possible deadlock in console_unlock run #1: crashed: possible deadlock in console_unlock run #2: crashed: possible deadlock in console_unlock run #3: crashed: possible deadlock in console_unlock run #4: crashed: possible deadlock in console_unlock run #5: crashed: possible deadlock in console_unlock run #6: crashed: possible deadlock in console_unlock run #7: crashed: possible deadlock in console_unlock run #8: crashed: possible deadlock in console_unlock run #9: crashed: possible deadlock in tty_port_close_start # git bisect good 183b6757bdb9db0a20e30c8f558bff027d79cc67 Bisecting: 19 revisions left to test after this (roughly 4 steps) [70573120d73ecfd24eab5b63bcd44d7359a46e10] cpufreq: armada-37xx: Fix setting TBG parent for load levels testing commit 70573120d73ecfd24eab5b63bcd44d7359a46e10 with gcc (GCC) 8.4.1 20210217 kernel signature: 36f9333109260d6f29d453ced5779436a2194b2699b01110c0bf61b8f241feb8 run #0: crashed: possible deadlock in console_unlock run #1: crashed: possible deadlock in console_unlock run #2: crashed: possible deadlock in console_unlock run #3: crashed: possible deadlock in console_unlock run #4: crashed: possible deadlock in console_unlock run #5: crashed: possible deadlock in tty_port_close_start run #6: crashed: possible deadlock in console_unlock run #7: crashed: possible deadlock in console_unlock run #8: crashed: possible deadlock in console_unlock run #9: crashed: possible deadlock in console_unlock # git bisect good 70573120d73ecfd24eab5b63bcd44d7359a46e10 Bisecting: 9 revisions left to test after this (roughly 3 steps) [76d7fc0857bc4033415fcad905db13753d0febc7] tty: fix return value for unsupported ioctls testing commit 76d7fc0857bc4033415fcad905db13753d0febc7 with gcc (GCC) 8.4.1 20210217 kernel signature: 71aea5c1e470c7a254e9eb7c6be38315523a59319b1e593b865751b7ab6b9c10 run #0: crashed: possible deadlock in console_unlock run #1: crashed: possible deadlock in tty_port_close_start run #2: crashed: possible deadlock in console_unlock run #3: crashed: possible deadlock in console_unlock run #4: crashed: possible deadlock in console_unlock run #5: crashed: possible deadlock in console_unlock run #6: crashed: possible deadlock in console_unlock run #7: crashed: possible deadlock in console_unlock run #8: crashed: possible deadlock in console_unlock run #9: crashed: possible deadlock in tty_port_close_start # git bisect good 76d7fc0857bc4033415fcad905db13753d0febc7 Bisecting: 4 revisions left to test after this (roughly 2 steps) [feb4750ef9b8cb26c8ae5933479cad9f16451f6a] Drivers: hv: vmbus: Increase wait time for VMbus unload testing commit feb4750ef9b8cb26c8ae5933479cad9f16451f6a with gcc (GCC) 8.4.1 20210217 kernel signature: 74ae936eae86d246f56c58fdc27c74f4ed7536ece7aa38f79f759b6e11c6db7f run #0: crashed: possible deadlock in tty_port_close_start run #1: crashed: possible deadlock in tty_port_close_start run #2: crashed: possible deadlock in console_unlock run #3: crashed: possible deadlock in console_unlock run #4: crashed: possible deadlock in console_unlock run #5: crashed: possible deadlock in tty_port_close_start run #6: crashed: possible deadlock in console_unlock run #7: crashed: possible deadlock in console_unlock run #8: crashed: possible deadlock in tty_port_close_start run #9: crashed: possible deadlock in console_unlock # git bisect good feb4750ef9b8cb26c8ae5933479cad9f16451f6a Bisecting: 1 revision left to test after this (roughly 1 step) [1f51881e2dccac944682e08b23ec441678809443] ttyprintk: Add TTY hangup callback. testing commit 1f51881e2dccac944682e08b23ec441678809443 with gcc (GCC) 8.4.1 20210217 kernel signature: 60aa9562906dec349118dbdd65002c4eeb39acc4a0306db34698964850f1ef4e all runs: OK # git bisect bad 1f51881e2dccac944682e08b23ec441678809443 Bisecting: 0 revisions left to test after this (roughly 1 step) [290a7a1a104f94e866af9b81106743d188733f60] usb: dwc2: Fix hibernation between host and device modes. testing commit 290a7a1a104f94e866af9b81106743d188733f60 with gcc (GCC) 8.4.1 20210217 kernel signature: 684d10730473b1d0425e8eb359f7658258e85b0f7638f73b39275573def786db run #0: crashed: possible deadlock in console_unlock run #1: crashed: possible deadlock in console_unlock run #2: crashed: possible deadlock in tty_port_close_start run #3: crashed: possible deadlock in console_unlock run #4: crashed: possible deadlock in console_unlock run #5: crashed: possible deadlock in tty_port_close_start run #6: crashed: possible deadlock in console_unlock run #7: crashed: possible deadlock in console_unlock run #8: crashed: possible deadlock in tty_port_close_start run #9: crashed: possible deadlock in console_unlock # git bisect good 290a7a1a104f94e866af9b81106743d188733f60 1f51881e2dccac944682e08b23ec441678809443 is the first bad commit commit 1f51881e2dccac944682e08b23ec441678809443 Author: Tetsuo Handa Date: Thu Apr 15 09:22:22 2021 +0900 ttyprintk: Add TTY hangup callback. [ Upstream commit c0070e1e60270f6a1e09442a9ab2335f3eaeaad2 ] syzbot is reporting hung task due to flood of tty_warn(tty, "%s: tty->count = 1 port count = %d\n", __func__, port->count); message [1], for ioctl(TIOCVHANGUP) prevents tty_port_close() from decrementing port->count due to tty_hung_up_p() == true. ---------- #include #include #include #include #include int main(int argc, char *argv[]) { int i; int fd[10]; for (i = 0; i < 10; i++) fd[i] = open("/dev/ttyprintk", O_WRONLY); ioctl(fd[0], TIOCVHANGUP); for (i = 0; i < 10; i++) close(fd[i]); close(open("/dev/ttyprintk", O_WRONLY)); return 0; } ---------- When TTY hangup happens, port->count needs to be reset via "struct tty_operations"->hangup callback. [1] https://syzkaller.appspot.com/bug?id=39ea6caa479af471183997376dc7e90bc7d64a6a Reported-by: syzbot Reported-by: syzbot Tested-by: syzbot Signed-off-by: Tetsuo Handa Fixes: 24b4b67d17c308aa ("add ttyprintk driver") Link: https://lore.kernel.org/r/17e0652d-89b7-c8c0-fb53-e7566ac9add4@i-love.sakura.ne.jp Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin drivers/char/ttyprintk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) culprit signature: 60aa9562906dec349118dbdd65002c4eeb39acc4a0306db34698964850f1ef4e parent signature: 684d10730473b1d0425e8eb359f7658258e85b0f7638f73b39275573def786db revisions tested: 14, total time: 3h15m22.805067359s (build: 1h58m49.980612316s, test: 1h15m22.261441967s) first good commit: 1f51881e2dccac944682e08b23ec441678809443 ttyprintk: Add TTY hangup callback. recipients (to): ["gregkh@linuxfoundation.org" "penguin-kernel@i-love.sakura.ne.jp" "sashal@kernel.org" "syzbot+43e93968b964e369db0b@syzkaller.appspotmail.com"] recipients (cc): []