syzbot


INFO: task hung in ucma_close
Status: fixed on 2020/11/20 16:27
Reported-by: syzbot+1ea809e97d12761d54a6@syzkaller.appspotmail.com
Fix commit: ef13017d65b0 RDMA/ucma: ucma_context reference leak in error path
First crash: 993d, last: 580d

Fix bisection: fixed by (bisect log) :
commit ef13017d65b003e35f6dbf3236b5e0d82c65a7a1
Author: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Date: Thu Sep 24 09:24:49 2020 +0000

  RDMA/ucma: ucma_context reference leak in error path

similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in ucma_close 1 1404d 1404d 0/22 auto-closed as invalid on 2019/02/22 10:09

Sample crash report:
audit: type=1400 audit(1569144600.413:36): avc:  denied  { map } for  pid=6925 comm="syz-executor989" path="/root/syz-executor989696888" dev="sda1" ino=1426 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
INFO: task syz-executor989:6925 blocked for more than 140 seconds.
      Not tainted 4.14.146 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor989 D28144  6925   6923 0x80000002
Call Trace:
 context_switch kernel/sched/core.c:2807 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3383
 schedule+0x92/0x1c0 kernel/sched/core.c:3427
 schedule_timeout+0x93b/0xe10 kernel/time/timer.c:1721
 do_wait_for_common kernel/sched/completion.c:91 [inline]
 __wait_for_common kernel/sched/completion.c:112 [inline]
 wait_for_common kernel/sched/completion.c:123 [inline]
 wait_for_completion+0x27c/0x420 kernel/sched/completion.c:144
 ucma_close+0xf0/0x310 drivers/infiniband/core/ucma.c:1749
 __fput+0x275/0x7a0 fs/file_table.c:210
 ____fput+0x16/0x20 fs/file_table.c:244
 task_work_run+0x114/0x190 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x7df/0x2c10 kernel/exit.c:874
 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+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x43eee8
RSP: 002b:00007ffd3bcf1078 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043eee8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004be6e8 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000401ba0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d0180 R14: 0000000000000000 R15: 0000000000000000

Showing all locks held in the system:
1 lock held by khungtaskd/1012:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff81486418>] debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4541
2 locks held by getty/6903:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c0d63>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f806>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6904:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c0d63>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f806>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6905:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c0d63>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f806>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6906:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c0d63>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f806>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6907:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c0d63>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f806>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6908:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c0d63>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f806>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6909:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861c0d63>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff8310f806>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156

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

NMI backtrace for cpu 0
CPU: 0 PID: 1012 Comm: khungtaskd Not tainted 4.14.146 #0
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/0x197 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+0x319/0x430 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at pc 0xffffffff861c184e

Crashes (421):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2019/09/22 09:35 linux-4.14.y f6e27dbb1afa d96e88f3 .config log report syz C
ci2-linux-4-14 2019/09/08 05:49 linux-4.14.y 414510bc00a5 a60cb4cd .config log report syz C
ci2-linux-4-14 2020/10/21 03:23 linux-4.14.y cbfa1702aaf6 ff4a3345 .config log report info
ci2-linux-4-14 2020/10/21 00:45 linux-4.14.y cbfa1702aaf6 ff4a3345 .config log report info
ci2-linux-4-14 2020/10/20 14:03 linux-4.14.y cbfa1702aaf6 ff4a3345 .config log report info
ci2-linux-4-14 2020/10/19 06:23 linux-4.14.y cbfa1702aaf6 fea47c01 .config log report info
ci2-linux-4-14 2020/10/19 01:17 linux-4.14.y cbfa1702aaf6 fea47c01 .config log report info
ci2-linux-4-14 2020/10/17 17:30 linux-4.14.y cbfa1702aaf6 fea47c01 .config log report info
ci2-linux-4-14 2020/10/17 15:24 linux-4.14.y cbfa1702aaf6 fea47c01 .config log report info
ci2-linux-4-14 2020/10/16 21:26 linux-4.14.y cbfa1702aaf6 6e262c73 .config log report info
ci2-linux-4-14 2020/10/16 14:20 linux-4.14.y cbfa1702aaf6 6e262c73 .config log report info
ci2-linux-4-14 2020/10/16 04:28 linux-4.14.y cbfa1702aaf6 6e262c73 .config log report info
ci2-linux-4-14 2020/10/14 17:59 linux-4.14.y cbfa1702aaf6 fc7735a2 .config log report info
ci2-linux-4-14 2020/10/13 06:32 linux-4.14.y cbfa1702aaf6 d32b0bbf .config log report info
ci2-linux-4-14 2020/10/12 20:02 linux-4.14.y cbfa1702aaf6 d32b0bbf .config log report info
ci2-linux-4-14 2020/10/09 02:55 linux-4.14.y cbfa1702aaf6 92390980 .config log report info
ci2-linux-4-14 2020/10/08 21:49 linux-4.14.y cbfa1702aaf6 92390980 .config log report info
ci2-linux-4-14 2020/10/08 04:09 linux-4.14.y cbfa1702aaf6 1880b4a9 .config log report info
ci2-linux-4-14 2020/10/06 22:22 linux-4.14.y cbfa1702aaf6 1880b4a9 .config log report info
ci2-linux-4-14 2020/10/06 04:56 linux-4.14.y cbfa1702aaf6 1880b4a9 .config log report info
ci2-linux-4-14 2020/10/04 19:35 linux-4.14.y cbfa1702aaf6 5ef9c291 .config log report info
ci2-linux-4-14 2020/10/04 17:15 linux-4.14.y cbfa1702aaf6 5ef9c291 .config log report info
ci2-linux-4-14 2020/10/04 04:00 linux-4.14.y cbfa1702aaf6 1a3f9408 .config log report info
ci2-linux-4-14 2020/09/28 00:31 linux-4.14.y cbfa1702aaf6 5dd8aee8 .config log report info
ci2-linux-4-14 2020/09/25 07:37 linux-4.14.y cbfa1702aaf6 54289b08 .config log report info
ci2-linux-4-14 2020/09/22 22:24 linux-4.14.y cbfa1702aaf6 3e8f6c27 .config log report info
ci2-linux-4-14 2020/09/22 04:51 linux-4.14.y cbfa1702aaf6 9e1fa68e .config log report info
ci2-linux-4-14 2020/09/12 16:19 linux-4.14.y cbfa1702aaf6 21d289c2 .config log report
ci2-linux-4-14 2020/09/12 08:18 linux-4.14.y 458a534cac0c 79fb24e2 .config log report
ci2-linux-4-14 2020/09/12 06:50 linux-4.14.y 458a534cac0c 79fb24e2 .config log report
ci2-linux-4-14 2020/09/11 21:01 linux-4.14.y 458a534cac0c adfb8b4e .config log report
ci2-linux-4-14 2020/09/10 00:59 linux-4.14.y 458a534cac0c ac7ca78e .config log report
ci2-linux-4-14 2020/09/09 11:33 linux-4.14.y 2f166cdcf8a9 0ea7a887 .config log report
ci2-linux-4-14 2020/09/03 01:04 linux-4.14.y d7e78d08fa77 abf9ba4f .config log report
ci2-linux-4-14 2020/08/31 23:39 linux-4.14.y d7e78d08fa77 d5a3ae1f .config log report
ci2-linux-4-14 2020/08/31 06:59 linux-4.14.y d7e78d08fa77 d5a3ae1f .config log report
ci2-linux-4-14 2020/08/30 08:11 linux-4.14.y d7e78d08fa77 d5a3ae1f .config log report
ci2-linux-4-14 2020/08/29 10:02 linux-4.14.y d7e78d08fa77 d5a3ae1f .config log report
ci2-linux-4-14 2020/08/28 04:54 linux-4.14.y d7e78d08fa77 816e0689 .config log report
ci2-linux-4-14 2020/08/28 03:01 linux-4.14.y d7e78d08fa77 816e0689 .config log report
ci2-linux-4-14 2020/08/24 20:39 linux-4.14.y 6a24ca2506d6 67b599d1 .config log report
ci2-linux-4-14 2020/08/23 08:57 linux-4.14.y 6a24ca2506d6 1da71ab0 .config log report
ci2-linux-4-14 2020/08/23 03:57 linux-4.14.y 6a24ca2506d6 1da71ab0 .config log report
ci2-linux-4-14 2019/09/04 13:47 linux-4.14.y 01fd1694b93c d994512d .config log report