syzbot


WARNING: locking bug in lock_downgrade

Status: fixed on 2019/03/22 05:00
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+53383ae265fb161ef488@syzkaller.appspotmail.com
Fix commit: 513e1073d52e locking/lockdep: Add debug_locks check in __lock_downgrade() locking/lockdep: Add debug_locks check in __lock_downgrade()
First crash: 1972d, last: 1914d
Discussions (22)
Title Replies (including bot) Last reply
[PATCH 4.14 000/185] 4.14.147-stable review 191 (191) 2019/10/05 00:10
[PATCH 4.9 000/129] 4.9.195-stable review 135 (135) 2019/10/04 22:56
[PATCH 4.4 00/99] 4.4.195-stable review 105 (105) 2019/10/04 22:55
[PATCH 4.19 00/63] 4.19.76-stable review 83 (83) 2019/10/02 13:16
[BACKPORT 4.19.y 0/3] Candidates from Spreadtrum 4.14 product kernel 5 (5) 2019/09/28 20:02
[BACKPORT 4.14.y v3 0/3] Candidates from Spreadtrum 4.14 product kernel 6 (6) 2019/09/26 02:04
[BACKPORT 4.14.y v2 0/6] Candidates from Spreadtrum 4.14 product kernel 14 (14) 2019/09/20 08:06
[BACKPORT 4.14.y 0/8] Candidates from Spreadtrum 4.14 product kernel 16 (16) 2019/09/05 01:47
[PATCH 3.18 000/104] 3.18.139-stable review 112 (112) 2019/04/25 19:36
[PATCH AUTOSEL 5.0 001/262] CIFS: fix POSIX lock leak and invalid ptr deref 284 (284) 2019/04/04 13:22
[PATCH AUTOSEL 4.9 01/87] CIFS: fix POSIX lock leak and invalid ptr deref 90 (90) 2019/04/03 16:19
[PATCH 4.4 000/131] 4.4.178-stable review 144 (144) 2019/04/03 13:40
[PATCH 4.9 00/30] 4.9.166-stable review 38 (38) 2019/04/01 11:46
[PATCH AUTOSEL 3.18 01/41] i2c: sis630: correct format strings 41 (41) 2019/03/27 18:25
[PATCH AUTOSEL 4.4 01/63] CIFS: fix POSIX lock leak and invalid ptr deref 63 (63) 2019/03/27 18:23
[PATCH AUTOSEL 4.14 001/123] CIFS: fix POSIX lock leak and invalid ptr deref 123 (123) 2019/03/27 18:16
[PATCH AUTOSEL 4.19 001/192] CIFS: fix POSIX lock leak and invalid ptr deref 192 (192) 2019/03/27 18:10
[PATCH 5.0 00/52] 5.0.5-stable review 61 (61) 2019/03/27 05:06
[PATCH 4.19 00/45] 4.19.32-stable review 51 (51) 2019/03/27 04:04
[PATCH 4.14 00/41] 4.14.109-stable review 47 (47) 2019/03/26 23:15
[PATCH] locking/lockdep: Add debug_locks check in __lock_downgrade() 8 (8) 2019/02/04 08:56
WARNING: locking bug in lock_downgrade 5 (6) 2019/01/10 02:45

Sample crash report:
====================================
------------[ cut here ]------------
downgrading a read lock
WARNING: CPU: 1 PID: 11345 at kernel/locking/lockdep.c:3556 __lock_downgrade kernel/locking/lockdep.c:3556 [inline]
WARNING: CPU: 1 PID: 11345 at kernel/locking/lockdep.c:3556 lock_downgrade+0x4d7/0x900 kernel/locking/lockdep.c:3819
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 11345 Comm: modprobe Not tainted 4.20.0-rc5+ #361
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+0x244/0x39d lib/dump_stack.c:113
 panic+0x2ad/0x55c kernel/panic.c:188
 __warn.cold.8+0x20/0x45 kernel/panic.c:540
 report_bug+0x254/0x2d0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:271
 do_invalid_op+0x36/0x40 arch/x86/kernel/traps.c:290
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:969
RIP: 0010:__lock_downgrade kernel/locking/lockdep.c:3556 [inline]
RIP: 0010:lock_downgrade+0x4d7/0x900 kernel/locking/lockdep.c:3819
Code: 00 00 fc ff df 41 c6 44 05 00 f8 e9 1b ff ff ff 48 c7 c7 a0 6d 2b 88 4c 89 9d 58 ff ff ff 48 89 85 60 ff ff ff e8 69 1f e7 ff <0f> 0b 48 8b 85 60 ff ff ff 4c 8d 4d d8 4c 89 e9 48 ba 00 00 00 00
RSP: 0018:ffff8881cd307b70 EFLAGS: 00010086
RAX: 0000000000000000 RBX: 1ffff11039a60f74 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8165fbe5 RDI: 0000000000000006
RBP: ffff8881cd307c28 R08: ffff8881ba99c280 R09: fffffbfff12b2314
R10: fffffbfff12b2314 R11: ffffffff895918a3 R12: ffffffff8b0f87e0
R13: ffff8881cd307bc0 R14: 0000000000000001 R15: ffff8881ba99c280
 downgrade_write+0x76/0x270 kernel/locking/rwsem.c:147
 __do_munmap+0xcd8/0xf80 mm/mmap.c:2812
 __vm_munmap+0x138/0x1f0 mm/mmap.c:2837
 __do_sys_munmap mm/mmap.c:2862 [inline]
 __se_sys_munmap mm/mmap.c:2859 [inline]
 __x64_sys_munmap+0x65/0x80 mm/mmap.c:2859
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f6f7920bd37
Code: f0 ff ff 73 01 c3 48 8b 0d fe c0 2a 00 31 d2 48 29 c2 64 89 11 48 83 c8 ff eb ea 90 90 90 90 90 90 90 90 b8 0b 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d1 c0 2a 00 31 d2 48 29 c2 64
RSP: 002b:00007ffc5369d8a8 EFLAGS: 00000206 ORIG_RAX: 000000000000000b
RAX: ffffffffffffffda RBX: 000055bf649d6260 RCX: 00007f6f7920bd37
RDX: 0000000000000000 RSI: 0000000000001000 RDI: 00007f6f798f0000
RBP: 0000000000000000 R08: 00007f6f798eb700 R09: 00007f6f79256090
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 000055bf649de210 R14: 000055bf649d6210 R15: 00007ffc5369db30
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (30):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/12/03 19:07 upstream 2595646791c3 819002b0 .config console log report ci-upstream-kasan-gce-root
2018/11/30 17:50 upstream 94f371cb7394 ade12e91 .config console log report ci-upstream-kasan-gce
2018/11/28 08:11 upstream ef78e5ec9214 4b6d14f2 .config console log report ci-upstream-kasan-gce
2018/11/27 10:29 upstream 6f8b52ba442c ac912200 .config console log report ci-upstream-kasan-gce-smack-root
2018/11/25 14:59 upstream e195ca6cb6f2 3d3ec907 .config console log report ci-upstream-kasan-gce-smack-root
2018/12/04 13:56 upstream 0072a0c14d5b 6ad0ae61 .config console log report ci-upstream-kasan-gce-386
2018/11/27 15:41 upstream ef78e5ec9214 4b6d14f2 .config console log report ci-upstream-kasan-gce-386
2019/01/22 02:22 linux-next a790195efddd badbbeee .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/21 14:19 linux-next a790195efddd badbbeee .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/20 05:37 linux-next 9673b4aa71ca 353f32ea .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/18 19:51 linux-next 9673b4aa71ca 2103a236 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/18 16:04 linux-next 9673b4aa71ca 2103a236 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/17 20:48 linux-next a37d50ca3b83 769e75ed .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/16 21:20 linux-next cbeb3db684f7 d538790b .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/15 23:20 linux-next 5aa6589e17bd 79cb1a7c .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/15 18:52 linux-next 5aa6589e17bd 79cb1a7c .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/15 16:42 linux-next 5aa6589e17bd 79cb1a7c .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/14 12:07 linux-next 8ce4d582f564 95485883 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/13 12:06 linux-next b808822a75a3 c3f3344c .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/12 12:39 linux-next b808822a75a3 c3f3344c .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/11 17:58 linux-next b808822a75a3 c3f3344c .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/11 16:43 linux-next b808822a75a3 c3f3344c .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/10 17:24 linux-next 6cab33afc3dd db9b6579 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/10 08:04 linux-next 6cab33afc3dd 45c0c1b1 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/09 10:56 linux-next d6e77253170d 45c0c1b1 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/09 10:32 linux-next d6e77253170d 45c0c1b1 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/08 03:02 linux-next a85b6b4f6416 69d69aa9 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/07 16:39 linux-next a85b6b4f6416 69d69aa9 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/07 09:46 linux-next a85b6b4f6416 ee332608 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/07 08:09 linux-next a85b6b4f6416 ee332608 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.