FYI, we noticed the below changes on https://github.com/0day-ci/linux Brian-Bloniarz/Re-n_tty-Check-the-other-end-of-pty-pair-before-returning-EAGAIN-on-a-read/20160229-070452 commit dd9a6fee6830f16f602b1aa2e85d6307acd04945 ("n_tty: Check the other end of pty pair before returning EAGAIN on a read()") +----------------------------------------------------+----------+------------+ | | v4.5-rc6 | dd9a6fee68 | +----------------------------------------------------+----------+------------+ | boot_successes | 128 | 2 | | boot_failures | 9 | 6 | | invoked_oom-killer:gfp_mask=0x | 9 | 1 | | Mem-Info | 9 | 2 | | Out_of_memory:Kill_process | 9 | 1 | | backtrace:vfs_write | 1 | | | backtrace:SyS_write | 1 | | | backtrace:do_execveat_common | 1 | | | backtrace:compat_SyS_execve | 1 | | | backtrace:vfs_read | 1 | 4 | | backtrace:SyS_read | 1 | 4 | | backtrace:compat_process_vm_rw | 1 | | | backtrace:compat_SyS_process_vm_readv | 1 | | | backtrace:_do_fork | 1 | | | backtrace:SyS_clone | 1 | | | page_allocation_failure:order:#,mode | 0 | 1 | | warn_alloc_failed+0x | 0 | 1 | | backtrace:kswapd | 0 | 1 | | INFO:possible_circular_locking_dependency_detected | 0 | 4 | | backtrace:flush_to_ldisc | 0 | 4 | +----------------------------------------------------+----------+------------+ [ 17.523349] mount (2393) used greatest stack depth: 12392 bytes left [ 17.684314] [ 17.684972] ====================================================== [ 17.686059] [ INFO: possible circular locking dependency detected ] [ 17.687174] 4.5.0-rc6-00001-gdd9a6fe #64 Not tainted [ 17.688127] ------------------------------------------------------- [ 17.689216] bootlogd/2434 is trying to acquire lock: [ 17.690167] ((&buf->work)){+.+...}, at: [] flush_work+0x5/0x23d [ 17.692006] [ 17.692006] but task is already holding lock: [ 17.693433] (&tty->termios_rwsem){++++..}, at: [] n_tty_read+0xd0/0x882 [ 17.695346] [ 17.695346] which lock already depends on the new lock. [ 17.695346] [ 17.697370] [ 17.697370] the existing dependency chain (in reverse order) is: [ 17.698961] -> #2 (&tty->termios_rwsem){++++..}: [ 17.700507] [] lock_acquire+0x147/0x1e2 [ 17.701621] [] down_read+0x48/0x90 [ 17.702696] [] n_tty_receive_buf_common+0x46/0x8c0 [ 17.703900] [] n_tty_receive_buf2+0x14/0x16 [ 17.705046] [] flush_to_ldisc+0xcb/0x125 [ 17.706167] [] process_one_work+0x2b8/0x5b2 [ 17.707339] [] worker_thread+0x28b/0x37d [ 17.708454] [] kthread+0xfb/0x103 [ 17.709511] [] ret_from_fork+0x3f/0x70 [ 17.710614] -> #1 (&buf->lock){+.+...}: [ 17.712070] [] lock_acquire+0x147/0x1e2 [ 17.713185] [] mutex_lock_nested+0x79/0x35f [ 17.714328] [] flush_to_ldisc+0x4b/0x125 [ 17.715443] [] process_one_work+0x2b8/0x5b2 [ 17.716587] [] worker_thread+0x28b/0x37d [ 17.717700] [] kthread+0xfb/0x103 [ 17.718752] [] ret_from_fork+0x3f/0x70 [ 17.719855] -> #0 ((&buf->work)){+.+...}: [ 17.721333] [] __lock_acquire+0x12dd/0x1932 [ 17.722489] [] lock_acquire+0x147/0x1e2 [ 17.723598] [] flush_work+0x3a/0x23d [ 17.724683] [] n_tty_read+0x308/0x882 [ 17.725771] [] tty_read+0x8b/0xcd [ 17.726830] [] __vfs_read+0x26/0xb9 [ 17.727910] [] vfs_read+0xa0/0x12e [ 17.728974] [] SyS_read+0x51/0x92 [ 17.730032] [] entry_SYSCALL_64_fastpath+0x12/0x72 [ 17.731237] [ 17.731237] other info that might help us debug this: [ 17.731237] [ 17.733255] Chain exists of: (&buf->work) --> &buf->lock --> &tty->termios_rwsem [ 17.735644] Possible unsafe locking scenario: [ 17.735644] [ 17.737064] CPU0 CPU1 [ 17.737969] ---- ---- [ 17.738873] lock(&tty->termios_rwsem); [ 17.739832] lock(&buf->lock); [ 17.740966] lock(&tty->termios_rwsem); [ 17.742181] lock((&buf->work)); [ 17.743081] [ 17.743081] *** DEADLOCK *** [ 17.743081] [ 17.744901] 3 locks held by bootlogd/2434: [ 17.745761] #0: (&tty->ldisc_sem){++++.+}, at: [] ldsem_down_read+0x37/0x3c [ 17.747838] #1: (&ldata->atomic_read_lock){+.+...}, at: [] n_tty_read+0xfb/0x882 [ 17.749898] #2: (&tty->termios_rwsem){++++..}, at: [] n_tty_read+0xd0/0x882 [ 17.751912] [ 17.751912] stack backtrace: [ 17.753200] CPU: 0 PID: 2434 Comm: bootlogd Not tainted 4.5.0-rc6-00001-gdd9a6fe #64 [ 17.754825] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 [ 17.756559] 0000000000000000 ffff88000c27fa90 ffffffff8153530b ffffffff82f923c0 [ 17.758372] ffffffff82f906b0 ffff88000c27fad0 ffffffff810e1a0d ffff88000b6b8000 [ 17.760189] ffff88000b6b88e0 ffff88000b6b88a8 0000000000000003 0000000000000003 [ 17.762011] Call Trace: [ 17.762709] [] dump_stack+0x85/0xbe [ 17.763685] [] print_circular_bug+0x287/0x295 [ 17.764741] [] __lock_acquire+0x12dd/0x1932 [ 17.765780] [] ? flush_work+0x5/0x23d [ 17.766780] [] ? check_irq_usage+0x99/0xaa [ 17.767808] [] lock_acquire+0x147/0x1e2 [ 17.768812] [] ? lock_acquire+0x147/0x1e2 [ 17.769835] [] ? flush_work+0x5/0x23d [ 17.770819] [] flush_work+0x3a/0x23d [ 17.771792] [] ? flush_work+0x5/0x23d [ 17.772781] [] ? mark_held_locks+0x5e/0x74 [ 17.773816] [] ? _raw_spin_unlock_irqrestore+0x47/0x5d [ 17.774951] [] ? trace_hardirqs_on_caller+0x17d/0x199 [ 17.776080] [] ? trace_hardirqs_on+0xd/0xf [ 17.777116] [] n_tty_read+0x308/0x882 [ 17.778099] [] ? abort_exclusive_wait+0x9a/0x9a [ 17.779171] [] tty_read+0x8b/0xcd [ 17.780126] [] __vfs_read+0x26/0xb9 [ 17.781098] [] ? up_read+0x1f/0x35 [ 17.782085] [] ? __do_page_fault+0x3aa/0x424 [ 17.783187] [] vfs_read+0xa0/0x12e [ 17.784147] [] SyS_read+0x51/0x92 [ 17.785100] [] entry_SYSCALL_64_fastpath+0x12/0x72 Kernel tests: Boot OK! Thanks, Kernel Test Robot