================================ WARNING: inconsistent lock state 5.12.0-rc2-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-R} usage. syz-executor.0/4621 [HC0[0]:SC1[1]:HE0:SE0] takes: 8a5f026c (&inode->i_size_seqcount){+.+-}-{0:0}, at: end_bio_bh_io_sync+0x38/0x54 fs/buffer.c:3006 {SOFTIRQ-ON-W} state was registered at: lock_acquire.part.0+0xf0/0x41c kernel/locking/lockdep.c:5510 lock_acquire+0x6c/0x74 kernel/locking/lockdep.c:5483 do_write_seqcount_begin_nested include/linux/seqlock.h:520 [inline] do_write_seqcount_begin include/linux/seqlock.h:545 [inline] i_size_write include/linux/fs.h:863 [inline] set_capacity+0x13c/0x1f8 block/genhd.c:50 brd_alloc+0x130/0x180 drivers/block/brd.c:401 brd_init+0xcc/0x1e0 drivers/block/brd.c:500 do_one_initcall+0x8c/0x59c init/main.c:1226 do_initcall_level init/main.c:1299 [inline] do_initcalls init/main.c:1315 [inline] do_basic_setup init/main.c:1335 [inline] kernel_init_freeable+0x2cc/0x330 init/main.c:1537 kernel_init+0x10/0x120 init/main.c:1424 ret_from_fork+0x14/0x20 arch/arm/kernel/entry-common.S:158 0x0 irq event stamp: 638157 hardirqs last enabled at (638156): [<802011ec>] __do_softirq+0xf4/0x7ac kernel/softirq.c:329 hardirqs last disabled at (638157): [<8277d260>] __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:157 [inline] hardirqs last disabled at (638157): [<8277d260>] _raw_read_lock_irqsave+0x84/0x88 kernel/locking/spinlock.c:231 softirqs last enabled at (638056): [<8020167c>] __do_softirq+0x584/0x7ac kernel/softirq.c:372 softirqs last disabled at (638143): [<8024e224>] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] softirqs last disabled at (638143): [<8024e224>] invoke_softirq kernel/softirq.c:228 [inline] softirqs last disabled at (638143): [<8024e224>] __irq_exit_rcu+0x1d8/0x200 kernel/softirq.c:422 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&inode->i_size_seqcount); lock(&inode->i_size_seqcount); *** DEADLOCK *** 1 lock held by syz-executor.0/4621: #0: 8a5f0010 (&ni->size_lock){...-}-{2:2}, at: ntfs_end_buffer_async_read+0x6c/0x558 fs/ntfs/aops.c:66 stack backtrace: CPU: 1 PID: 4621 Comm: syz-executor.0 Not tainted 5.12.0-rc2-syzkaller #0 Hardware name: ARM-Versatile Express Backtrace: [<82740468>] (dump_backtrace) from [<827406dc>] (show_stack+0x18/0x1c arch/arm/kernel/traps.c:252) r7:00000080 r6:60000193 r5:00000000 r4:8422a3c4 [<827406c4>] (show_stack) from [<82751b58>] (__dump_stack lib/dump_stack.c:79 [inline]) [<827406c4>] (show_stack) from [<82751b58>] (dump_stack+0xb8/0xe8 lib/dump_stack.c:120) [<82751aa0>] (dump_stack) from [<82742918>] (print_usage_bug.part.0+0x228/0x230 kernel/locking/lockdep.c:3806) r7:89b2b768 r6:82803274 r5:848a3560 r4:89b2b0c0 [<827426f0>] (print_usage_bug.part.0) from [<802bb4b8>] (print_usage_bug kernel/locking/lockdep.c:3776 [inline]) [<827426f0>] (print_usage_bug.part.0) from [<802bb4b8>] (valid_state kernel/locking/lockdep.c:3818 [inline]) [<827426f0>] (print_usage_bug.part.0) from [<802bb4b8>] (mark_lock_irq kernel/locking/lockdep.c:4021 [inline]) [<827426f0>] (print_usage_bug.part.0) from [<802bb4b8>] (mark_lock.part.0+0xc34/0x136c kernel/locking/lockdep.c:4478) r10:84a42fe8 r9:84437748 r8:00000000 r7:844372d4 r6:00000006 r5:89b2b768 r4:00000005 [<802ba884>] (mark_lock.part.0) from [<802bca0c>] (mark_lock kernel/locking/lockdep.c:4442 [inline]) [<802ba884>] (mark_lock.part.0) from [<802bca0c>] (mark_usage kernel/locking/lockdep.c:4365 [inline]) [<802ba884>] (mark_lock.part.0) from [<802bca0c>] (__lock_acquire+0xa84/0x3318 kernel/locking/lockdep.c:4854) r10:89b2b768 r9:89b2b0c0 r8:00000001 r7:00040000 r6:00000238 r5:848a3560 r4:00000000 [<802bbf88>] (__lock_acquire) from [<802bfe90>] (lock_acquire.part.0+0xf0/0x41c kernel/locking/lockdep.c:5510) r10:00000080 r9:60000193 r8:00000000 r7:00000000 r6:83ecd680 r5:83ecd680 r4:8a8edab8 [<802bfda0>] (lock_acquire.part.0) from [<802c0228>] (lock_acquire+0x6c/0x74 kernel/locking/lockdep.c:5483) r10:8052dcb4 r9:00000000 r8:00000001 r7:00000002 r6:00000000 r5:00000000 r4:8a5f026c [<802c01bc>] (lock_acquire) from [<808b1af8>] (seqcount_lockdep_reader_access include/linux/seqlock.h:103 [inline]) [<802c01bc>] (lock_acquire) from [<808b1af8>] (i_size_read include/linux/fs.h:838 [inline]) [<802c01bc>] (lock_acquire) from [<808b1af8>] (ntfs_end_buffer_async_read+0xb4/0x558 fs/ntfs/aops.c:68) r10:8a5f0000 r9:60000193 r8:8052dcb4 r7:8a5f026c r6:df3fe2c0 r5:8a72fd80 r4:8a5f01c8 [<808b1a44>] (ntfs_end_buffer_async_read) from [<8052dcb4>] (end_bio_bh_io_sync+0x38/0x54 fs/buffer.c:3006) r10:00000800 r9:00000800 r8:0000000a r7:00000000 r6:8727c800 r5:8a72fd80 r4:8a8b9000 [<8052dc7c>] (end_bio_bh_io_sync) from [<80f0f638>] (bio_endio+0x124/0x338 block/bio.c:1436) r5:80f0f84c r4:8a8b9000 [<80f0f514>] (bio_endio) from [<80f166cc>] (req_bio_endio block/blk-core.c:265 [inline]) [<80f0f514>] (bio_endio) from [<80f166cc>] (blk_update_request+0x220/0x724 block/blk-core.c:1456) r9:00000800 r8:0000000a r7:00000000 r6:8727c800 r5:00000800 r4:8a8b9000 [<80f164ac>] (blk_update_request) from [<80f23128>] (blk_mq_end_request+0x1c/0x144 block/blk-mq.c:564) r10:00000010 r9:8a8ec000 r8:8404ec98 r7:00000000 r6:00000004 r5:8727c800 r4:8727c800 [<80f2310c>] (blk_mq_end_request) from [<811d1e2c>] (lo_complete_rq+0x98/0xd4 drivers/block/loop.c:497) r7:00000001 r6:00000004 r5:8727c800 r4:ffffffc8 [<811d1d94>] (lo_complete_rq) from [<80f21ab4>] (blk_complete_reqs+0x5c/0x68 block/blk-mq.c:576) r5:00000005 r4:ffffffc8 [<80f21a58>] (blk_complete_reqs) from [<80f21b1c>] (blk_done_softirq+0x2c/0x30 block/blk-mq.c:581) r5:00000005 r4:83ed846c [<80f21af0>] (blk_done_softirq) from [<802012fc>] (__do_softirq+0x204/0x7ac kernel/softirq.c:345) r5:00000005 r4:84004090 [<802010f8>] (__do_softirq) from [<8024e224>] (do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]) [<802010f8>] (__do_softirq) from [<8024e224>] (invoke_softirq kernel/softirq.c:228 [inline]) [<802010f8>] (__do_softirq) from [<8024e224>] (__irq_exit_rcu+0x1d8/0x200 kernel/softirq.c:422) r10:8a8edd68 r9:8a8eddd0 r8:00000001 r7:00000000 r6:83ed8498 r5:00000000 r4:83ed9d00 [<8024e04c>] (__irq_exit_rcu) from [<8024e3d8>] (irq_exit+0x10/0x3c kernel/softirq.c:446) r5:00000000 r4:83ed8498 [<8024e3c8>] (irq_exit) from [<802d8a34>] (__handle_domain_irq+0xb4/0x120 kernel/irq/irqdesc.c:692) [<802d8980>] (__handle_domain_irq) from [<810109b0>] (handle_domain_irq include/linux/irqdesc.h:176 [inline]) [<802d8980>] (__handle_domain_irq) from [<810109b0>] (gic_handle_irq+0x84/0xac drivers/irqchip/irq-gic.c:370) r10:ffffffb9 r9:40000193 r8:e000200c r7:83ed84bc r6:e0002000 r5:8a8eddd0 r4:8404f4b4 [<8101092c>] (gic_handle_irq) from [<80200abc>] (__irq_svc+0x5c/0x94 arch/arm/kernel/entry-armv.S:205) Exception stack(0x8a8eddd0 to 0x8a8ede18) ddc0: 00000001 83262ba0 00000001 20000093 dde0: 20000013 ddfdb380 ddfdb3e0 00000040 ddfdb3e0 8404f128 ffffffb9 8a8ede34 de00: 8a8eddc8 8a8ede20 82773fac 8277d030 20000013 ffffffff r9:8a8ec000 r8:ddfdb3e0 r7:8a8ede04 r6:ffffffff r5:20000013 r4:8277d030 [<8277cff0>] (_raw_spin_unlock_irqrestore) from [<803089c0>] (unlock_hrtimer_base kernel/time/hrtimer.c:897 [inline]) [<8277cff0>] (_raw_spin_unlock_irqrestore) from [<803089c0>] (hrtimer_start_range_ns+0x1b4/0x30c kernel/time/hrtimer.c:1135) r5:00000001 r4:8a8edee8 [<8030880c>] (hrtimer_start_range_ns) from [<8277c39c>] (hrtimer_start_expires include/linux/hrtimer.h:436 [inline]) [<8030880c>] (hrtimer_start_range_ns) from [<8277c39c>] (hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1799 [inline]) [<8030880c>] (hrtimer_start_range_ns) from [<8277c39c>] (do_nanosleep+0x84/0x214 kernel/time/hrtimer.c:1875) r10:00000000 r9:8277c360 r8:83020674 r7:84a85a58 r6:8a8ede80 r5:8a8ec000 r4:8a8edee8 [<8277c318>] (do_nanosleep) from [<80309514>] (hrtimer_nanosleep+0xf8/0x188 kernel/time/hrtimer.c:1931) r9:0000c350 r8:00000000 r7:0000c350 r6:00000001 r5:00000000 r4:000f4240 [<8030941c>] (hrtimer_nanosleep) from [<80313ef8>] (common_nsleep+0x5c/0x6c kernel/time/posix-timers.c:1227) r10:00000197 r9:8a8ec000 r8:80200224 r7:00000000 r6:82804484 r5:7ecde960 r4:00000000 [<80313e9c>] (common_nsleep) from [<803164f0>] (__do_sys_clock_nanosleep kernel/time/posix-timers.c:1267 [inline]) [<80313e9c>] (common_nsleep) from [<803164f0>] (sys_clock_nanosleep+0xe8/0x148 kernel/time/posix-timers.c:1245) r5:7ecde960 r4:00000000 [<80316408>] (sys_clock_nanosleep) from [<80200060>] (ret_fast_syscall+0x0/0x2c arch/arm/mm/proc-v7.S:64) Exception stack(0x8a8edfa8 to 0x8a8edff0) dfa0: 00000000 00000000 00000000 00000000 7ecde950 7ecde960 dfc0: 00000000 00000000 00000000 00000197 7ecde960 7ecde950 0133a4c0 000001f4 dfe0: 00000000 7ecde918 0006c894 0006d9c8 r7:00000197 r6:00000000 r5:00000000 r4:00000000 vxcan0: j1939_simple_recv: Received already invalidated message vxcan1: j1939_tp_rxtimer: 0x715ec11b: Timeout. Failed to send simple message.