lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 29 Feb 2016 13:05:40 +0800
From:	kernel test robot <ying.huang@...ux.intel.com>
TO:	Brian Bloniarz <brian.bloniarz@...il.com>
CC:	0day robot <fengguang.wu@...el.com>
Subject: [lkp] [n_tty] dd9a6fee68: INFO: possible circular locking
 dependency detected ]

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: [<ffffffff810b205c>] flush_work+0x5/0x23d
[   17.692006] 
[   17.692006] but task is already holding lock:
[   17.693433]  (&tty->termios_rwsem){++++..}, at: [<ffffffff81600f90>] 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]        [<ffffffff810e508f>] lock_acquire+0x147/0x1e2
[   17.701621]        [<ffffffff81c85f97>] down_read+0x48/0x90
[   17.702696]        [<ffffffff81600486>] n_tty_receive_buf_common+0x46/0x8c0
[   17.703900]        [<ffffffff81600d14>] n_tty_receive_buf2+0x14/0x16
[   17.705046]        [<ffffffff816038e3>] flush_to_ldisc+0xcb/0x125
[   17.706167]        [<ffffffff810b3a03>] process_one_work+0x2b8/0x5b2
[   17.707339]        [<ffffffff810b48d5>] worker_thread+0x28b/0x37d
[   17.708454]        [<ffffffff810b9776>] kthread+0xfb/0x103
[   17.709511]        [<ffffffff81c8849f>] ret_from_fork+0x3f/0x70
[   17.710614] 
-> #1 (&buf->lock){+.+...}:
[   17.712070]        [<ffffffff810e508f>] lock_acquire+0x147/0x1e2
[   17.713185]        [<ffffffff81c83fde>] mutex_lock_nested+0x79/0x35f
[   17.714328]        [<ffffffff81603863>] flush_to_ldisc+0x4b/0x125
[   17.715443]        [<ffffffff810b3a03>] process_one_work+0x2b8/0x5b2
[   17.716587]        [<ffffffff810b48d5>] worker_thread+0x28b/0x37d
[   17.717700]        [<ffffffff810b9776>] kthread+0xfb/0x103
[   17.718752]        [<ffffffff81c8849f>] ret_from_fork+0x3f/0x70
[   17.719855] 
-> #0 ((&buf->work)){+.+...}:
[   17.721333]        [<ffffffff810e423d>] __lock_acquire+0x12dd/0x1932
[   17.722489]        [<ffffffff810e508f>] lock_acquire+0x147/0x1e2
[   17.723598]        [<ffffffff810b2091>] flush_work+0x3a/0x23d
[   17.724683]        [<ffffffff816011c8>] n_tty_read+0x308/0x882
[   17.725771]        [<ffffffff815fb87b>] tty_read+0x8b/0xcd
[   17.726830]        [<ffffffff811e0a70>] __vfs_read+0x26/0xb9
[   17.727910]        [<ffffffff811e1668>] vfs_read+0xa0/0x12e
[   17.728974]        [<ffffffff811e241e>] SyS_read+0x51/0x92
[   17.730032]        [<ffffffff81c88132>] 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: [<ffffffff81c8734d>] ldsem_down_read+0x37/0x3c
[   17.747838]  #1:  (&ldata->atomic_read_lock){+.+...}, at: [<ffffffff81600fbb>] n_tty_read+0xfb/0x882
[   17.749898]  #2:  (&tty->termios_rwsem){++++..}, at: [<ffffffff81600f90>] 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]  [<ffffffff8153530b>] dump_stack+0x85/0xbe
[   17.763685]  [<ffffffff810e1a0d>] print_circular_bug+0x287/0x295
[   17.764741]  [<ffffffff810e423d>] __lock_acquire+0x12dd/0x1932
[   17.765780]  [<ffffffff810b205c>] ? flush_work+0x5/0x23d
[   17.766780]  [<ffffffff810e2420>] ? check_irq_usage+0x99/0xaa
[   17.767808]  [<ffffffff810e508f>] lock_acquire+0x147/0x1e2
[   17.768812]  [<ffffffff810e508f>] ? lock_acquire+0x147/0x1e2
[   17.769835]  [<ffffffff810b205c>] ? flush_work+0x5/0x23d
[   17.770819]  [<ffffffff810b2091>] flush_work+0x3a/0x23d
[   17.771792]  [<ffffffff810b205c>] ? flush_work+0x5/0x23d
[   17.772781]  [<ffffffff810e2ad7>] ? mark_held_locks+0x5e/0x74
[   17.773816]  [<ffffffff81c877f4>] ? _raw_spin_unlock_irqrestore+0x47/0x5d
[   17.774951]  [<ffffffff810e2c6a>] ? trace_hardirqs_on_caller+0x17d/0x199
[   17.776080]  [<ffffffff810e2c93>] ? trace_hardirqs_on+0xd/0xf
[   17.777116]  [<ffffffff816011c8>] n_tty_read+0x308/0x882
[   17.778099]  [<ffffffff810d9af7>] ? abort_exclusive_wait+0x9a/0x9a
[   17.779171]  [<ffffffff815fb87b>] tty_read+0x8b/0xcd
[   17.780126]  [<ffffffff811e0a70>] __vfs_read+0x26/0xb9
[   17.781098]  [<ffffffff810de7a1>] ? up_read+0x1f/0x35
[   17.782085]  [<ffffffff8108b9d1>] ? __do_page_fault+0x3aa/0x424
[   17.783187]  [<ffffffff811e1668>] vfs_read+0xa0/0x12e
[   17.784147]  [<ffffffff811e241e>] SyS_read+0x51/0x92
[   17.785100]  [<ffffffff81c88132>] entry_SYSCALL_64_fastpath+0x12/0x72
Kernel tests: Boot OK!





Thanks,
Kernel Test Robot

View attachment "config-4.5.0-rc6-00001-gdd9a6fe" of type "text/plain" (108713 bytes)

Download attachment "dmesg.xz" of type "application/x-xz" (14576 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ