INFO: task hung in do_exit

45 views
Skip to first unread message

syzbot

unread,
Apr 19, 2019, 4:32:11 PM4/19/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 4b0e041c Linux 4.19.35
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=142be003200000
kernel config: https://syzkaller.appspot.com/x/.config?x=bb1bcac868b1655e
dashboard link: https://syzkaller.appspot.com/bug?extid=121880e545d39e33a25c
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10611490a00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+121880...@syzkaller.appspotmail.com

INFO: task syz-executor.0:19220 blocked for more than 140 seconds.
Not tainted 4.19.35 #3
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.0 D28216 19220 7962 0x80000000
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x813/0x1d00 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:276 [inline]
rwsem_down_read_failed+0x219/0x3c0 kernel/locking/rwsem-xadd.c:293
call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:83 [inline]
down_read+0x49/0xb0 kernel/locking/rwsem.c:26
exit_mm kernel/exit.c:512 [inline]
do_exit+0x45b/0x2fa0 kernel/exit.c:863
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458c29
Code: Bad RIP value.
RSP: 002b:00007ffe1cfdc978 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 000000000000001e RCX: 0000000000458c29
RDX: 00000000004129e1 RSI: fffffffffffffff7 RDI: 0000000000000000
RBP: 0000000000000000 R08: 00000000000ff30d R09: 00007ffe1cfdc9d0
R10: 00000000000ff30d R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe1cfdc9d0 R14: 0000000000000000 R15: 00007ffe1cfdc9e0
INFO: task syz-executor.0:19222 blocked for more than 140 seconds.
Not tainted 4.19.35 #3
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.0 D28104 19222 7962 0x80000000
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x813/0x1d00 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:276 [inline]
rwsem_down_read_failed+0x219/0x3c0 kernel/locking/rwsem-xadd.c:293
call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:83 [inline]
down_read+0x49/0xb0 kernel/locking/rwsem.c:26
exit_mm kernel/exit.c:512 [inline]
do_exit+0x45b/0x2fa0 kernel/exit.c:863
do_group_exit+0x135/0x370 kernel/exit.c:979
get_signal+0x399/0x1d50 kernel/signal.c:2572
do_signal+0x95/0x1950 arch/x86/kernel/signal.c:816
exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:162
prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline]
syscall_return_slowpath arch/x86/entry/common.c:268 [inline]
do_syscall_64+0x52d/0x610 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458c29
Code: Bad RIP value.
RSP: 002b:00007feb174e8cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 000000000073bf08 RCX: 0000000000458c29
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000073bf08
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000073bf0c
R13: 00007ffe1cfdc77f R14: 00007feb174e99c0 R15: 000000000073bf0c

Showing all locks held in the system:
1 lock held by khungtaskd/1032:
#0: 00000000ef55191f (rcu_read_lock){....}, at:
debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:4438
1 lock held by rsyslogd/7797:
#0: 00000000b54da6b2 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xee/0x110
fs/file.c:767
2 locks held by getty/7918:
#0: 0000000025018d50 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000049aade4d (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7919:
#0: 00000000f903b525 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000c64ddf73 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7920:
#0: 00000000f421e999 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000c8ec4485 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7921:
#0: 000000009c802e23 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000019a0936 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7922:
#0: 00000000b6d73941 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000505a2f2c (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7923:
#0: 00000000de1ee6f2 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000062b67cb5 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7924:
#0: 00000000190febcc (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000003414bc19 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
1 lock held by syz-executor.0/19220:
#0: 000000007b8c77fb (&mm->mmap_sem){++++}, at: exit_mm kernel/exit.c:512
[inline]
#0: 000000007b8c77fb (&mm->mmap_sem){++++}, at: do_exit+0x45b/0x2fa0
kernel/exit.c:863
1 lock held by syz-executor.0/19222:
#0: 000000007b8c77fb (&mm->mmap_sem){++++}, at: exit_mm kernel/exit.c:512
[inline]
#0: 000000007b8c77fb (&mm->mmap_sem){++++}, at: do_exit+0x45b/0x2fa0
kernel/exit.c:863
1 lock held by syz-executor.0/19223:

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 1032 Comm: khungtaskd Not tainted 4.19.35 #3
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
nmi_cpu_backtrace.cold+0x63/0xa4 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1b0/0x1f8 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:202 [inline]
watchdog+0x9c6/0xec0 kernel/hung_task.c:263
kthread+0x357/0x430 kernel/kthread.c:246
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 19223 Comm: syz-executor.0 Not tainted 4.19.35 #3
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:debug_lockdep_rcu_enabled+0x2e/0xa0 kernel/rcu/update.c:253
Code: 3b 3b 89 55 48 ba 00 00 00 00 00 fc ff df 48 89 c1 83 e0 07 48 89 e5
48 c1 e9 03 83 c0 03 0f b6 14 11 38 d0 7c 04 84 d2 75 49 <8b> 15 3c d3 e2
07 85 d2 74 3b 48 c7 c0 c0 9b b0 88 48 ba 00 00 00
RSP: 0018:ffff88807bb3f8a0 EFLAGS: 00000046
RAX: 0000000000000003 RBX: ffff88808ddec400 RCX: 1ffffffff1276762
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88808ddecc7c
RBP: ffff88807bb3f8a0 R08: 0000000000000001 R09: 0000000000000000
R10: ffff88807bb3faa0 R11: 0000000000000001 R12: ffff88809898e750
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 00007feb174c8700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffff600400 CR3: 0000000099285000 CR4: 00000000001406e0
Call Trace:
trace_lock_acquire include/trace/events/lock.h:13 [inline]
lock_acquire+0x2f3/0x3f0 kernel/locking/lockdep.c:3902
__mutex_lock_common kernel/locking/mutex.c:925 [inline]
__mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072
mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087
perf_mmap+0x738/0x1730 kernel/events/core.c:5654
call_mmap include/linux/fs.h:1816 [inline]
mmap_region+0xc34/0x1760 mm/mmap.c:1762
do_mmap+0x8e2/0x1080 mm/mmap.c:1535
do_mmap_pgoff include/linux/mm.h:2306 [inline]
vm_mmap_pgoff+0x1c5/0x230 mm/util.c:357
ksys_mmap_pgoff+0x4aa/0x630 mm/mmap.c:1585
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline]
__x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x458c29
Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007feb174c7c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000000458c29
RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ffd000
RBP: 000000000073bfa0 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000001011 R11: 0000000000000246 R12: 00007feb174c86d4
R13: 00000000004c4bb0 R14: 00000000004d87f8 R15: 00000000ffffffff


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Apr 24, 2019, 10:28:06 PM4/24/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 68d7a45e Linux 4.14.113
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17047ceb200000
kernel config: https://syzkaller.appspot.com/x/.config?x=dbf1fde4d7489e1c
dashboard link: https://syzkaller.appspot.com/bug?extid=a1ff69bef50a3e8133ee
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12cd40eca00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+a1ff69...@syzkaller.appspotmail.com

IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_1: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): hsr0: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready
8021q: adding VLAN 0 to HW filter on device batadv0
INFO: task syz-executor.5:9453 blocked for more than 140 seconds.
Not tainted 4.14.113 #3
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.5 D28528 9453 7157 0x80000000
Call Trace:
context_switch kernel/sched/core.c:2807 [inline]
__schedule+0x7be/0x1cf0 kernel/sched/core.c:3383
schedule+0x92/0x1c0 kernel/sched/core.c:3427
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:276 [inline]
rwsem_down_read_failed+0x1f4/0x380 kernel/locking/rwsem-xadd.c:293
call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:66 [inline]
down_read+0x49/0xb0 kernel/locking/rwsem.c:26
exit_mm kernel/exit.c:511 [inline]
do_exit+0x3d2/0x2c10 kernel/exit.c:861
do_group_exit+0x111/0x330 kernel/exit.c:977
SYSC_exit_group kernel/exit.c:988 [inline]
SyS_exit_group+0x1d/0x20 kernel/exit.c:986
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x458d99
RSP: 002b:00007ffc3994b4b8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 000000000000001e RCX: 0000000000458d99
RDX: 0000000000412b51 RSI: fffffffffffffff7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffff R09: 00007ffc3994b510
R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffc3994b510 R14: 0000000000000000 R15: 00007ffc3994b520
INFO: task syz-executor.5:9456 blocked for more than 140 seconds.
Not tainted 4.14.113 #3
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.5 D29136 9456 7157 0x80000000
Call Trace:
context_switch kernel/sched/core.c:2807 [inline]
__schedule+0x7be/0x1cf0 kernel/sched/core.c:3383
schedule+0x92/0x1c0 kernel/sched/core.c:3427
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:276 [inline]
rwsem_down_read_failed+0x1f4/0x380 kernel/locking/rwsem-xadd.c:293
call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:66 [inline]
down_read+0x49/0xb0 kernel/locking/rwsem.c:26
exit_mm kernel/exit.c:511 [inline]
do_exit+0x3d2/0x2c10 kernel/exit.c:861
do_group_exit+0x111/0x330 kernel/exit.c:977
get_signal+0x348/0x1a80 kernel/signal.c:2407
do_signal+0x86/0x1980 arch/x86/kernel/signal.c:809
exit_to_usermode_loop+0x15c/0x220 arch/x86/entry/common.c:159
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:267 [inline]
do_syscall_64+0x4a9/0x630 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x458d99
RSP: 002b:00007f9d15fe2cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 000000000073bf08 RCX: 0000000000458d99
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000073bf08
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000073bf0c
R13: 00007ffc3994b2af R14: 00007f9d15fe39c0 R15: 000000000073bf0c

Showing all locks held in the system:
1 lock held by khungtaskd/1009:
#0: (tasklist_lock){.+.+}, at: [<ffffffff81486f98>]
debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4544
2 locks held by getty/7104:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861b0323>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310c666>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7105:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861b0323>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310c666>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7106:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861b0323>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310c666>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7107:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861b0323>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310c666>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7108:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861b0323>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310c666>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7109:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861b0323>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310c666>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/7110:
#0: (&tty->ldisc_sem){++++}, at: [<ffffffff861b0323>]
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:377
#1: (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310c666>]
n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
1 lock held by syz-executor.5/9453:
#0: (&mm->mmap_sem){++++}, at: [<ffffffff813866f2>] exit_mm
kernel/exit.c:511 [inline]
#0: (&mm->mmap_sem){++++}, at: [<ffffffff813866f2>] do_exit+0x3d2/0x2c10
kernel/exit.c:861
1 lock held by syz-executor.5/9456:
#0: (&mm->mmap_sem){++++}, at: [<ffffffff813866f2>] exit_mm
kernel/exit.c:511 [inline]
#0: (&mm->mmap_sem){++++}, at: [<ffffffff813866f2>] do_exit+0x3d2/0x2c10
kernel/exit.c:861

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 1009 Comm: khungtaskd Not tainted 4.14.113 #3
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x138/0x19c lib/dump_stack.c:53
nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x141/0x189 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
watchdog+0x5e7/0xb90 kernel/hung_task.c:274
kthread+0x31c/0x430 kernel/kthread.c:232
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 9467 Comm: syz-executor.5 Not tainted 4.14.113 #3
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff888082b56240 task.stack: ffff888086280000
RIP: 0010:lock_release+0xb/0x940 kernel/locking/lockdep.c:4003
RSP: 0018:ffff888086287b28 EFLAGS: 00000292
RAX: dffffc0000000000 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: ffffffff816d569e RSI: 0000000000000001 RDI: ffff88808b332580
RBP: ffff888086287bc8 R08: dffffc0000000000 R09: ffffffff88c9fd28
R10: ffff888086287bd8 R11: ffff888082b56240 R12: ffff888083068250
R13: 1ffff11010c50f6c R14: ffff888086287b80 R15: ffff88808b332520
FS: 00007f9d15fc2700(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff095bde140 CR3: 000000009cf06000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
mutex_unlock+0xd/0x10 kernel/locking/mutex.c:614
perf_mmap+0x64e/0x13f0 kernel/events/core.c:5424
call_mmap include/linux/fs.h:1779 [inline]
mmap_region+0x858/0x1030 mm/mmap.c:1722
do_mmap+0x5b8/0xcd0 mm/mmap.c:1500
do_mmap_pgoff include/linux/mm.h:2165 [inline]
vm_mmap_pgoff+0x17a/0x1d0 mm/util.c:333
SYSC_mmap_pgoff mm/mmap.c:1550 [inline]
SyS_mmap_pgoff+0x3ca/0x520 mm/mmap.c:1508
SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x458d99
RSP: 002b:00007f9d15fc1c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000000458d99
RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ffd000
RBP: 000000000073bfa0 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000001011 R11: 0000000000000246 R12: 00007f9d15fc26d4
R13: 00000000004c4d23 R14: 00000000004d8958 R15: 00000000ffffffff
Code: e9 ed fe ff ff 48 c7 c7 60 e4 24 89 e8 1f 4c 3e 00 e9 84 fd ff ff 66
2e 0f 1f 84 00 00 00 00 00 48 b8 00 00 00 00 00 fc ff df 55 <48> 89 e5 41
57 41 56 4c 8d 7d d8 41 55 49 89 d5 41 54 49 89 fc

syzbot

unread,
Jun 8, 2019, 3:48:07 AM6/8/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: e109a984 Linux 4.19.48
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1198f751a00000
kernel config: https://syzkaller.appspot.com/x/.config?x=2d14dd88554f26bc
dashboard link: https://syzkaller.appspot.com/bug?extid=121880e545d39e33a25c
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1036afbaa00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1243d81ea00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+121880...@syzkaller.appspotmail.com

IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_0: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): hsr_slave_1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): hsr0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): vxcan1: link is not ready
8021q: adding VLAN 0 to HW filter on device batadv0
INFO: task syz-executor093:7840 blocked for more than 140 seconds.
Not tainted 4.19.48 #20
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor093 D23552 7840 7839 0x80000000
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x80d/0x1c70 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline]
rwsem_down_read_failed+0x21b/0x3c0 kernel/locking/rwsem-xadd.c:309
call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:83 [inline]
down_read+0x49/0xb0 kernel/locking/rwsem.c:26
exit_mm kernel/exit.c:512 [inline]
do_exit+0x45b/0x2fa0 kernel/exit.c:863
do_group_exit+0x135/0x370 kernel/exit.c:979
__do_sys_exit_group kernel/exit.c:990 [inline]
__se_sys_exit_group kernel/exit.c:988 [inline]
__x64_sys_exit_group+0x44/0x50 kernel/exit.c:988
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4461a8
Code: 20 73 70 61 63 65 20 69 6e 20 46 75 6e 63 44 42 20 66 6f 72 20 6d 75
74 65 78 20 69 6e 66 6f 20 28 6d 61 78 20 25 64 20 65 6e <74> 72 69 65 73
29 20 2d 20 69 67 6e 6f 72 69 6e 67 0a 00 00 00 00
RSP: 002b:00007ffef6927668 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00000000004461a8
RDX: 0000000000000001 RSI: 000000000000003c RDI: 0000000000000001
RBP: 00000000004ce510 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 00007ffef69276d0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006e27a0 R14: 000000000000002d R15: 0000000000000007
INFO: task syz-executor093:7848 blocked for more than 140 seconds.
Not tainted 4.19.48 #20
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor093 D28800 7848 7839 0x80000000
Call Trace:
context_switch kernel/sched/core.c:2826 [inline]
__schedule+0x80d/0x1c70 kernel/sched/core.c:3474
schedule+0x92/0x1c0 kernel/sched/core.c:3518
__rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline]
rwsem_down_read_failed+0x21b/0x3c0 kernel/locking/rwsem-xadd.c:309
call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94
__down_read arch/x86/include/asm/rwsem.h:83 [inline]
down_read+0x49/0xb0 kernel/locking/rwsem.c:26
exit_mm kernel/exit.c:512 [inline]
do_exit+0x45b/0x2fa0 kernel/exit.c:863
do_group_exit+0x135/0x370 kernel/exit.c:979
get_signal+0x399/0x1d50 kernel/signal.c:2572
do_signal+0x95/0x1960 arch/x86/kernel/signal.c:821
exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:163
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x53d/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x447659
Code: 64 20 62 79 74 65 73 0a 00 66 69 6c 65 20 25 64 20 45 4f 46 0a 00 00
00 00 73 74 72 65 61 6d 20 77 61 73 20 72 65 71 75 65 73 <74> 65 64 20 77
69 74 68 20 7a 69 70 20 6d 6f 64 65 2c 20 62 75 74
RSP: 002b:00007ff8a1127db8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00000000006ddc58 RCX: 0000000000447659
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00000000006ddc58
RBP: 00000000006ddc50 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006ddc5c
R13: 00007ffef692762f R14: 00007ff8a11289c0 R15: 0000000000000005

Showing all locks held in the system:
1 lock held by khungtaskd/1032:
#0: 00000000ead221b0 (rcu_read_lock){....}, at:
debug_show_all_locks+0x5f/0x27e kernel/locking/lockdep.c:4435
3 locks held by rs:main Q:Reg/7688:
#0: 0000000036f5ae72 (&rq->lock){-.-.}, at: rq_lock
kernel/sched/sched.h:1821 [inline]
#0: 0000000036f5ae72 (&rq->lock){-.-.}, at: __schedule+0x1f8/0x1c70
kernel/sched/core.c:3412
#1: 00000000ead221b0 (rcu_read_lock){....}, at: file_start_write
include/linux/fs.h:2773 [inline]
#1: 00000000ead221b0 (rcu_read_lock){....}, at: vfs_write+0x429/0x560
fs/read_write.c:548
#2: 00000000ead221b0 (rcu_read_lock){....}, at: fast_dput fs/dcache.c:714
[inline]
#2: 00000000ead221b0 (rcu_read_lock){....}, at: dput+0x38/0x690
fs/dcache.c:833
1 lock held by rsyslogd/7690:
#0: 00000000c94eb15a (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xee/0x110
fs/file.c:767
2 locks held by getty/7812:
#0: 00000000beae4f46 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000005d3353ea (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7813:
#0: 0000000074914d06 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000a1012dad (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7814:
#0: 00000000cf9545b9 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 000000007cac3042 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7815:
#0: 000000001c53d4a6 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000054c12f8d (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7816:
#0: 00000000fb716cc5 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 0000000021227abc (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7817:
#0: 00000000149bdeec (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000a43ee8a4 (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
2 locks held by getty/7818:
#0: 00000000a1747150 (&tty->ldisc_sem){++++}, at:
ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:363
#1: 00000000a6160e7b (&ldata->atomic_read_lock){+.+.}, at:
n_tty_read+0x232/0x1b30 drivers/tty/n_tty.c:2154
1 lock held by syz-executor093/7840:
#0: 000000006b4cf8e6 (&mm->mmap_sem){++++}, at: exit_mm kernel/exit.c:512
[inline]
#0: 000000006b4cf8e6 (&mm->mmap_sem){++++}, at: do_exit+0x45b/0x2fa0
kernel/exit.c:863
2 locks held by syz-executor093/7847:
1 lock held by syz-executor093/7848:
#0: 000000006b4cf8e6 (&mm->mmap_sem){++++}, at: exit_mm kernel/exit.c:512
[inline]
#0: 000000006b4cf8e6 (&mm->mmap_sem){++++}, at: do_exit+0x45b/0x2fa0
kernel/exit.c:863

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 1032 Comm: khungtaskd Not tainted 4.19.48 #20
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
nmi_cpu_backtrace.cold+0x63/0xa4 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1b0/0x1f8 lib/nmi_backtrace.c:62
arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
watchdog+0x9df/0xee0 kernel/hung_task.c:287
kthread+0x354/0x420 kernel/kthread.c:246
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 7847 Comm: syz-executor093 Not tainted 4.19.48 #20
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:kasan_mem_to_shadow include/linux/kasan.h:28 [inline]
RIP: 0010:memory_is_poisoned_n mm/kasan/kasan.c:211 [inline]
RIP: 0010:memory_is_poisoned mm/kasan/kasan.c:241 [inline]
RIP: 0010:check_memory_region_inline mm/kasan/kasan.c:257 [inline]
RIP: 0010:check_memory_region+0x3a/0x190 mm/kasan/kasan.c:267
Code: 7f ff ff 55 0f b6 d2 48 39 c7 48 89 e5 41 55 41 54 53 0f 86 f6 00 00
00 4c 8d 5c 37 ff 49 89 f8 48 b8 00 00 00 00 00 fc ff df <4d> 89 da 49 c1
e8 03 4d 8d 24 00 49 c1 ea 03 49 01 c2 4c 89 e0 49
RSP: 0018:ffff88807dbf7678 EFLAGS: 00000016
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8151ff0b
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffffff89ef11a8
RBP: ffff88807dbf7690 R08: ffffffff89ef11a8 R09: 0000000000000000
R10: 0000000000000001 R11: ffffffff89ef11ab R12: 0000000000000000
R13: 0000000000000000 R14: ffff88808f582580 R15: ffff88808f00b9d0
FS: 00007ff8a1149700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff8a1127e78 CR3: 00000000885ae000 CR4: 00000000001406e0
Call Trace:
kasan_check_write+0x14/0x20 mm/kasan/kasan.c:278
atomic_inc include/asm-generic/atomic-instrumented.h:109 [inline]
__lock_acquire+0x23b/0x48f0 kernel/locking/lockdep.c:3303
lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3900
__mutex_lock_common kernel/locking/mutex.c:925 [inline]
__mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072
mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087
perf_mmap+0x735/0x1730 kernel/events/core.c:5655
call_mmap include/linux/fs.h:1825 [inline]
mmap_region+0xc2f/0x1760 mm/mmap.c:1763
do_mmap+0x8e2/0x1080 mm/mmap.c:1536
do_mmap_pgoff include/linux/mm.h:2319 [inline]
vm_mmap_pgoff+0x1c5/0x230 mm/util.c:357
ksys_mmap_pgoff+0x4aa/0x630 mm/mmap.c:1586
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline]
__x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x447659
Code: e8 5c 14 03 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 db 0c fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ff8a1148da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00000000006ddc48 RCX: 0000000000447659
RDX: 0000000000000000 RSI: 0000000000001000 RDI: 0000000020fff000
RBP: 00000000006ddc40 R08: 0000000000000003 R09: 0000000000000000
R10: 0002000000001011 R11: 0000000000000246 R12: 00000000006ddc4c
R13: 00007ffef692762f R14: 00007ff8a11499c0 R15: 0000000000000000

Reply all
Reply to author
Forward
0 new messages