syzbot


WARNING: bad unlock balance in ucma_event_handler

Status: upstream: reported C repro on 2019/10/08 08:22
Reported-by: syzbot+b703fa607d1fc3f80e5b@syzkaller.appspotmail.com
First crash: 1692d, last: 540d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 WARNING: bad unlock balance in ucma_event_handler C inconclusive 3 531d 1607d 0/1 upstream: reported C repro on 2020/01/02 01:32
upstream WARNING: bad unlock balance in ucma_event_handler C done 143 1510d 2174d 15/26 fixed on 2020/05/10 10:42
Fix bisection attempts (20)
Created Duration User Patch Repo Result
2021/11/06 05:15 13m bisect fix linux-4.19.y error job log (0)
2021/09/24 01:47 27m bisect fix linux-4.19.y job log (0) log
2021/08/25 01:05 31m bisect fix linux-4.19.y job log (0) log
2021/07/26 00:33 31m bisect fix linux-4.19.y job log (0) log
2021/06/26 00:10 22m bisect fix linux-4.19.y job log (0) log
2021/05/26 23:41 28m bisect fix linux-4.19.y job log (0) log
2021/04/09 22:11 23m bisect fix linux-4.19.y job log (0) log
2021/02/25 01:48 26m bisect fix linux-4.19.y job log (0) log
2021/01/26 01:12 26m bisect fix linux-4.19.y job log (0) log
2020/12/27 00:47 24m bisect fix linux-4.19.y job log (0) log
2020/10/28 23:48 24m bisect fix linux-4.19.y job log (0) log
2020/09/28 23:22 25m bisect fix linux-4.19.y job log (0) log
2020/08/29 17:47 27m bisect fix linux-4.19.y job log (0) log
2020/07/30 16:13 28m bisect fix linux-4.19.y job log (0) log
2020/06/30 15:42 31m bisect fix linux-4.19.y job log (0) log
2020/05/31 10:46 24m bisect fix linux-4.19.y job log (0) log
2020/05/01 10:20 25m bisect fix linux-4.19.y job log (0) log
2020/04/01 06:43 25m bisect fix linux-4.19.y job log (0) log
2020/03/02 05:56 25m bisect fix linux-4.19.y job log (0) log
2020/02/01 05:15 26m bisect fix linux-4.19.y job log (0) log

Sample crash report:
=====================================
WARNING: bad unlock balance detected!
4.19.211-syzkaller #0 Not tainted
-------------------------------------
kworker/u4:3/508 is trying to release lock (&file->mut) at:
[<ffffffff85f5c4a5>] ucma_event_handler+0x745/0xf50 drivers/infiniband/core/ucma.c:396
but there are no more locks to release!

other info that might help us debug this:
4 locks held by kworker/u4:3/508:
 #0: 00000000623cacfe ((wq_completion)"ib_addr"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 000000005ce7e3b3 ((work_completion)(&(&req->work)->work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
 #2: 000000000988ad43 (&id_priv->handler_mutex){+.+.}, at: addr_handler+0xaf/0x5f0 drivers/infiniband/core/cma.c:2887
 #3: 00000000fe1c25cb (&file->mut){+.+.}, at: ucma_event_handler+0xb2/0xf50 drivers/infiniband/core/ucma.c:356

stack backtrace:
CPU: 1 PID: 508 Comm: kworker/u4:3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: ib_addr process_one_req
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_unlock_imbalance_bug kernel/locking/lockdep.c:149 [inline]
 __lock_release kernel/locking/lockdep.c:3679 [inline]
 lock_release.cold+0xe/0x4a kernel/locking/lockdep.c:3927
 __mutex_unlock_slowpath+0x89/0x610 kernel/locking/mutex.c:1203
 ucma_event_handler+0x745/0xf50 drivers/infiniband/core/ucma.c:396
 addr_handler+0x2c1/0x5f0 drivers/infiniband/core/cma.c:2920
 process_one_req+0xf1/0x620 drivers/infiniband/core/addr.c:569
 process_one_work+0x864/0x1570 kernel/workqueue.c:2153
 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/03 23:31 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2020/01/02 05:05 linux-4.19.y c7ecf3e3a71c 25a0186e .config console log report syz C ci2-linux-4-19
2022/12/03 23:08 linux-4.19.y 3f8a27f9e27b e080de16 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2021/10/07 05:15 linux-4.19.y 6db10b4d5efd 62ee0987 .config console log report info ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2021/10/06 04:39 linux-4.19.y c2276d585654 0a63fd36 .config console log report info ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2021/10/03 03:16 linux-4.19.y c2276d585654 db0f5787 .config console log report info ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2021/04/26 23:31 linux-4.19.y 2965db2e004c 8ee2dea6 .config console log report info ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2021/04/24 12:18 linux-4.19.y 2965db2e004c 17f0b706 .config console log report info ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2021/04/24 07:19 linux-4.19.y 2965db2e004c 17f0b706 .config console log report info ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2021/03/10 22:00 linux-4.19.y 2cae3e25b706 764067f3 .config console log report info ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2021/03/10 19:35 linux-4.19.y 2cae3e25b706 764067f3 .config console log report info ci2-linux-4-19 WARNING: bad unlock balance in ucma_event_handler
2020/11/27 00:07 linux-4.19.y 0c88e405c97e 5018c946 .config console log report info ci2-linux-4-19
2019/11/20 19:34 linux-4.19.y c555efaf1402 432c7650 .config console log report ci2-linux-4-19
2019/11/08 06:58 linux-4.19.y 5ee93551c703 f39aff9e .config console log report ci2-linux-4-19
2019/10/08 07:21 linux-4.19.y 58fce2064530 28ac6e64 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.