------------[ cut here ]------------
VFS: brelse: Trying to free free buffer
WARNING: CPU: 0 PID: 29404 at fs/buffer.c:1144 __brelse fs/buffer.c:1144 [inline]
WARNING: CPU: 0 PID: 29404 at fs/buffer.c:1144 __brelse+0x67/0xa0 fs/buffer.c:1138
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 29404 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
panic+0x26a/0x50e kernel/panic.c:186
__warn.cold+0x20/0x5a kernel/panic.c:541
report_bug+0x262/0x2b0 lib/bug.c:183
fixup_bug arch/x86/kernel/traps.c:178 [inline]
fixup_bug arch/x86/kernel/traps.c:173 [inline]
do_error_trap+0x1d7/0x310 arch/x86/kernel/traps.c:296
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1038
RIP: 0010:__brelse fs/buffer.c:1144 [inline]
RIP: 0010:__brelse+0x67/0xa0 fs/buffer.c:1138
Code: 7c 04 84 d2 75 4e 44 8b 63 60 31 ff 44 89 e6 e8 bf 16 b2 ff 45 85 e4 75 1c e8 45 15 b2 ff 48 c7 c7 e0 1c 75 88 e8 1e 4d 42 06 <0f> 0b 5b 5d 41 5c e9 2e 15 b2 ff e8 29 15 b2 ff be 04 00 00 00 48
RSP: 0018:ffff8880ba007f40 EFLAGS: 00010082
RAX: 0000000000000000 RBX: ffff88808b171b28 RCX: 0000000000000000
RDX: 0000000000010000 RSI: ffffffff814dff01 RDI: ffffed1017400fda
RBP: ffff88808b171b88 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: ffffffff8c66501b R12: 0000000000000000
R13: dffffc0000000000 R14: ffff8880ba0287e0 R15: 0000000000000000
brelse include/linux/buffer_head.h:297 [inline]
invalidate_bh_lru+0x90/0x140 fs/buffer.c:1385
flush_smp_call_function_queue+0x144/0x4d0 kernel/smp.c:243
smp_call_function_single_interrupt+0x98/0x440 arch/x86/kernel/smp.c:304
call_function_single_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:916
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x50/0x80 kernel/locking/spinlock.c:192
Code: c0 98 82 f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 31 48 83 3d 01 31 d8 01 00 74 25 fb 66 0f 1f 44 00 00 01 00 00 00 e8 26 1b 28 f9 65 8b 05 9f 8d e8 77 85 c0 74 02 5d
RSP: 0018:ffff88804130f890 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff04
RAX: 1ffffffff13e3053 RBX: ffff88809ad78340 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff88809ad78bc4
RBP: ffff8880ba02b0c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880ba02b0c0
R13: ffff88809d57a1c0 R14: 0000000000000000 R15: 0000000000000001
finish_lock_switch kernel/sched/core.c:2578 [inline]
finish_task_switch+0x146/0x760 kernel/sched/core.c:2678
context_switch kernel/sched/core.c:2831 [inline]
__schedule+0x88f/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
freezable_schedule include/linux/freezer.h:172 [inline]
futex_wait_queue_me+0x2fc/0x5e0 kernel/futex.c:2722
futex_wait+0x1ef/0x610 kernel/futex.c:2837
do_futex+0x268/0x1880 kernel/futex.c:3889
__do_sys_futex kernel/futex.c:3950 [inline]
__se_sys_futex+0x28f/0x3b0 kernel/futex.c:3918
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f3024fea0c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f302355c218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007f3025109f88 RCX: 00007f3024fea0c9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f3025109f88
RBP: 00007f3025109f80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3025109f8c
R13: 00007ffeb67a9eef R14: 00007f302355c300 R15: 0000000000022000
Kernel Offset: disabled
================================
WARNING: inconsistent lock state
4.19.211-syzkaller #0 Not tainted
--------------------------------
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-R} usage.
syz-executor.2/29404 [HC1[1]:SC0[0]:HE0:SE1] takes:
0000000009ecd1ae ((fb_notifier_list).rwsem){+?++}, at: __blocking_notifier_call_chain kernel/notifier.c:316 [inline]
0000000009ecd1ae ((fb_notifier_list).rwsem){+?++}, at: __blocking_notifier_call_chain kernel/notifier.c:304 [inline]
0000000009ecd1ae ((fb_notifier_list).rwsem){+?++}, at: blocking_notifier_call_chain kernel/notifier.c:328 [inline]
0000000009ecd1ae ((fb_notifier_list).rwsem){+?++}, at: blocking_notifier_call_chain+0x6f/0xa0 kernel/notifier.c:325
{HARDIRQ-ON-W} state was registered at:
down_write+0x34/0x90 kernel/locking/rwsem.c:70
blocking_notifier_chain_register+0x78/0x350 kernel/notifier.c:226
fb_console_init+0x1c/0x305 drivers/video/fbdev/core/fbcon.c:3432
fbmem_init+0x105/0x126 drivers/video/fbdev/core/fbmem.c:1932
do_one_initcall+0xf1/0x740 init/main.c:884
do_initcall_level init/main.c:952 [inline]
do_initcalls init/main.c:960 [inline]
do_basic_setup init/main.c:978 [inline]
kernel_init_freeable+0x9c5/0xab7 init/main.c:1145
kernel_init+0xd/0x1ba init/main.c:1062
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
irq event stamp: 54
hardirqs last enabled at (53): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline]
hardirqs last enabled at (53): [] _raw_spin_unlock_irq+0x24/0x80 kernel/locking/spinlock.c:192
hardirqs last disabled at (54): [] trace_hardirqs_off_thunk+0x1a/0x1c
softirqs last enabled at (0): [] copy_process.part.0+0x15b9/0x8260 kernel/fork.c:1856
softirqs last disabled at (0): [<0000000000000000>] (null)
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock((fb_notifier_list).rwsem);
lock((fb_notifier_list).rwsem);
*** DEADLOCK ***
no locks held by syz-executor.2/29404.
stack backtrace:
CPU: 0 PID: 29404 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2545
valid_state kernel/locking/lockdep.c:2558 [inline]
mark_lock_irq kernel/locking/lockdep.c:2752 [inline]
mark_lock+0xc70/0x1160 kernel/locking/lockdep.c:3132
mark_irqflags kernel/locking/lockdep.c:2998 [inline]
__lock_acquire+0x10b2/0x3ff0 kernel/locking/lockdep.c:3373
lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
down_read+0x36/0x80 kernel/locking/rwsem.c:24
__blocking_notifier_call_chain kernel/notifier.c:316 [inline]
__blocking_notifier_call_chain kernel/notifier.c:304 [inline]
blocking_notifier_call_chain kernel/notifier.c:328 [inline]
blocking_notifier_call_chain+0x6f/0xa0 kernel/notifier.c:325
fb_blank+0xb5/0x1d0 drivers/video/fbdev/core/fbmem.c:1074
fbcon_blank+0x932/0xec0 drivers/video/fbdev/core/fbcon.c:2221
do_unblank_screen+0x241/0x610 drivers/tty/vt/vt.c:4294
panic+0x313/0x50e kernel/panic.c:239
__warn.cold+0x20/0x5a kernel/panic.c:541
report_bug+0x262/0x2b0 lib/bug.c:183
fixup_bug arch/x86/kernel/traps.c:178 [inline]
fixup_bug arch/x86/kernel/traps.c:173 [inline]
do_error_trap+0x1d7/0x310 arch/x86/kernel/traps.c:296
invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1038
RIP: 0010:__brelse fs/buffer.c:1144 [inline]
RIP: 0010:__brelse+0x67/0xa0 fs/buffer.c:1138
Code: 7c 04 84 d2 75 4e 44 8b 63 60 31 ff 44 89 e6 e8 bf 16 b2 ff 45 85 e4 75 1c e8 45 15 b2 ff 48 c7 c7 e0 1c 75 88 e8 1e 4d 42 06 <0f> 0b 5b 5d 41 5c e9 2e 15 b2 ff e8 29 15 b2 ff be 04 00 00 00 48
RSP: 0018:ffff8880ba007f40 EFLAGS: 00010082
RAX: 0000000000000000 RBX: ffff88808b171b28 RCX: 0000000000000000
RDX: 0000000000010000 RSI: ffffffff814dff01 RDI: ffffed1017400fda
RBP: ffff88808b171b88 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: ffffffff8c66501b R12: 0000000000000000
R13: dffffc0000000000 R14: ffff8880ba0287e0 R15: 0000000000000000
brelse include/linux/buffer_head.h:297 [inline]
invalidate_bh_lru+0x90/0x140 fs/buffer.c:1385
flush_smp_call_function_queue+0x144/0x4d0 kernel/smp.c:243
smp_call_function_single_interrupt+0x98/0x440 arch/x86/kernel/smp.c:304
call_function_single_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:916
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x50/0x80 kernel/locking/spinlock.c:192
Code: c0 98 82 f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 31 48 83 3d 01 31 d8 01 00 74 25 fb 66 0f 1f 44 00 00 01 00 00 00 e8 26 1b 28 f9 65 8b 05 9f 8d e8 77 85 c0 74 02 5d
RSP: 0018:ffff88804130f890 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff04
RAX: 1ffffffff13e3053 RBX: ffff88809ad78340 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff88809ad78bc4
RBP: ffff8880ba02b0c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880ba02b0c0
R13: ffff88809d57a1c0 R14: 0000000000000000 R15: 0000000000000001
finish_lock_switch kernel/sched/core.c:2578 [inline]
finish_task_switch+0x146/0x760 kernel/sched/core.c:2678
context_switch kernel/sched/core.c:2831 [inline]
__schedule+0x88f/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
freezable_schedule include/linux/freezer.h:172 [inline]
futex_wait_queue_me+0x2fc/0x5e0 kernel/futex.c:2722
futex_wait+0x1ef/0x610 kernel/futex.c:2837
do_futex+0x268/0x1880 kernel/futex.c:3889
__do_sys_futex kernel/futex.c:3950 [inline]
__se_sys_futex+0x28f/0x3b0 kernel/futex.c:3918
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f3024fea0c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f302355c218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007f3025109f88 RCX: 00007f3024fea0c9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f3025109f88
RBP: 00007f3025109f80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3025109f8c
R13: 00007ffeb67a9eef R14: 00007f302355c300 R15: 0000000000022000
Rebooting in 86400 seconds..
----------------
Code disassembly (best guess), 5 bytes skipped:
0: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx
7: fc ff df
a: 48 c1 e8 03 shr $0x3,%rax
e: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1)
12: 75 31 jne 0x45
14: 48 83 3d 01 31 d8 01 cmpq $0x0,0x1d83101(%rip) # 0x1d8311d
1b: 00
1c: 74 25 je 0x43
1e: fb sti
1f: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
* 25: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2a: e8 26 1b 28 f9 callq 0xf9281b55
2f: 65 8b 05 9f 8d e8 77 mov %gs:0x77e88d9f(%rip),%eax # 0x77e88dd5
36: 85 c0 test %eax,%eax
38: 74 02 je 0x3c
3a: 5d pop %rbp