syzbot


WARNING: bad unlock balance in ucma_destroy_id

Status: upstream: reported C repro on 2019/07/01 17:24
Reported-by: syzbot+22956fa835c831577177@syzkaller.appspotmail.com
First crash: 2000d, last: 726d
Fix bisection the fix commit could be any of (bisect log):
  98db2bf27b9e Linux 4.14.171
  56dfe6252c68 Linux 4.14.188
  
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 WARNING: bad unlock balance in ucma_destroy_id C error 7 726d 2004d 0/1 upstream: reported C repro on 2019/06/27 11:05
upstream WARNING: bad unlock balance in ucma_destroy_id syz done 44 1753d 2307d 15/28 fixed on 2020/05/10 10:42
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2020/07/16 17:33 35m bisect fix linux-4.14.y OK (2) job log
2020/06/16 16:47 27m bisect fix linux-4.14.y OK (0) job log log
2020/05/17 15:56 30m bisect fix linux-4.14.y OK (0) job log log
2020/04/17 15:26 28m bisect fix linux-4.14.y OK (0) job log log
2020/03/18 14:57 28m bisect fix linux-4.14.y OK (0) job log log
2020/01/28 23:18 26m bisect fix linux-4.14.y OK (0) job log log
2019/12/29 22:46 26m bisect fix linux-4.14.y OK (0) job log log

Sample crash report:
=====================================
WARNING: bad unlock balance detected!
4.14.302-syzkaller #0 Not tainted
-------------------------------------
syz-executor297/8138 is trying to release lock (&file->mut) at:
[<ffffffff8552920b>] ucma_destroy_id+0x1eb/0x420 drivers/infiniband/core/ucma.c:606
but there are no more locks to release!

other info that might help us debug this:
1 lock held by syz-executor297/8138:
 #0:  (&file->mut){+.+.}, at: [<ffffffff855291ac>] ucma_destroy_id+0x18c/0x420 drivers/infiniband/core/ucma.c:604

stack backtrace:
CPU: 1 PID: 8138 Comm: syz-executor297 Not tainted 4.14.302-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_unlock_imbalance_bug include/trace/events/lock.h:58 [inline]
 __lock_release kernel/locking/lockdep.c:3769 [inline]
 lock_release.cold+0x70/0xbf kernel/locking/lockdep.c:4017
 __mutex_unlock_slowpath+0x75/0x770 kernel/locking/mutex.c:1018
 ucma_destroy_id+0x1eb/0x420 drivers/infiniband/core/ucma.c:606
 ucma_write+0x206/0x2c0 drivers/infiniband/core/ucma.c:1672
 __vfs_write+0xe4/0x630 fs/read_write.c:480
 vfs_write+0x17f/0x4d0 fs/read_write.c:544
 SYSC_write fs/read_write.c:590 [inline]
 SyS_write+0xf2/0x210 fs/read_write.c:582
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f82791eda39
RSP: 002b:00007f827917e308 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f8279275418 RCX: 00007f82791eda39
RDX: 0000000000000018 RSI: 0000000020000280 RDI: 0000000000000003
RBP: 00007f8279275410 R08: 00007f827917e700 R09: 0000000000000000
R10: 00007f827917e700 R11: 0000000000000246 R12: 00007f827927541c
R13: 00007f8279243074 R14: 006d635f616d6472 R15: 0000000000022000

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/26 15:05 linux-4.14.y c4215ee4771b 9da18ae8 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-4-14 WARNING: bad unlock balance in ucma_destroy_id
2022/12/18 15:56 linux-4.14.y c4215ee4771b 05494336 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-4-14 WARNING: bad unlock balance in ucma_destroy_id
2022/09/09 04:43 linux-4.14.y 65640c873dcf f3027468 .config console log report syz C ci2-linux-4-14 WARNING: bad unlock balance in ucma_destroy_id
2021/01/19 12:34 linux-4.14.y 2762b48e9611 63631df1 .config console log report syz ci2-linux-4-14 WARNING: bad unlock balance in ucma_destroy_id
2020/02/17 14:57 linux-4.14.y 98db2bf27b9e 72bfa6f2 .config console log report syz ci2-linux-4-14
2019/11/29 22:32 linux-4.14.y 43598c571e7e 4f7e1d0f .config console log report syz ci2-linux-4-14
2019/07/01 16:23 linux-4.14.y f4cc0ed9b2c7 907bf746 .config console log report syz ci2-linux-4-14
2022/12/18 15:40 linux-4.14.y c4215ee4771b 05494336 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-4-14 WARNING: bad unlock balance in ucma_destroy_id
2022/09/09 04:23 linux-4.14.y 65640c873dcf f3027468 .config console log report info ci2-linux-4-14 WARNING: bad unlock balance in ucma_destroy_id
2021/01/19 11:12 linux-4.14.y 2762b48e9611 63631df1 .config console log report info ci2-linux-4-14 WARNING: bad unlock balance in ucma_destroy_id
2020/02/17 12:37 linux-4.14.y 98db2bf27b9e 72bfa6f2 .config console log report ci2-linux-4-14
2019/11/29 20:52 linux-4.14.y 43598c571e7e 4f7e1d0f .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.