kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in:
CPU: 0 PID: 4523 Comm: syz-executor3 Not tainted 4.16.0+ #2
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__delayacct_blkio_end+0x4f/0xc0 kernel/delayacct.c:82
RSP: 0018:ffff8801db006888 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffff8801d8350238
RDX: 0000000000000007 RSI: ffffffff81783391 RDI: 0000000000000038
RBP: ffff8801db0068a0 R08: ffffed003b6046c3 R09: 0000000000000000
R10: ffff8801db006930 R11: ffff8801db023613 R12: ffff8801a22ba680
R13: ffff8801d8350200 R14: ffff8801d835023c R15: 0000000000000002
FS: 0000000000e51940(0000) GS:ffff8801db000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001052978 CR3: 00000001a2149000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
delayacct_blkio_end include/linux/delayacct.h:128 [inline]
try_to_wake_up+0xa89/0x1190 kernel/sched/core.c:2034
default_wake_function+0x30/0x50 kernel/sched/core.c:3743
autoremove_wake_function+0x7a/0x350 kernel/sched/wait.c:373
wake_page_function+0x15f/0x1c0 mm/filemap.c:1010
__wake_up_common+0x189/0x730 kernel/sched/wait.c:90
__wake_up_locked_key_bookmark+0x16/0x20 kernel/sched/wait.c:165
wake_up_page_bit+0x297/0x580 mm/filemap.c:1030
wake_up_page mm/filemap.c:1071 [inline]
end_page_writeback+0x24c/0x320 mm/filemap.c:1233
ext4_finish_bio+0x593/0x940 fs/ext4/page-io.c:118
ext4_end_bio+0x18f/0x6d0 fs/ext4/page-io.c:342
bio_endio+0x4b8/0x920 block/bio.c:1775
req_bio_endio block/blk-core.c:280 [inline]
blk_update_request+0x3a3/0xcb0 block/blk-core.c:3076
scsi_end_request+0xd3/0x870 drivers/scsi/scsi_lib.c:672
scsi_io_completion+0xca9/0x1d10 drivers/scsi/scsi_lib.c:891
scsi_finish_command+0x542/0x8d0 drivers/scsi/scsi.c:248
scsi_softirq_done+0x3d9/0x4b0 drivers/scsi/scsi_lib.c:1676
__blk_mq_complete_request+0x4c8/0x9f0 block/blk-mq.c:551
blk_mq_complete_request+0x2a5/0x370 block/blk-mq.c:636
scsi_mq_done+0xe2/0x430 drivers/scsi/scsi_lib.c:1987
virtscsi_complete_cmd+0x573/0x740 drivers/scsi/virtio_scsi.c:207
virtscsi_vq_done+0xc3/0x170 drivers/scsi/virtio_scsi.c:223
virtscsi_req_done+0xa7/0xd0 drivers/scsi/virtio_scsi.c:238
vring_interrupt+0x128/0x170 drivers/virtio/virtio_ring.c:950
__handle_irq_event_percpu+0x1c0/0xad0 kernel/irq/handle.c:149
handle_irq_event_percpu+0x98/0x1c0 kernel/irq/handle.c:189
handle_irq_event+0xa7/0x135 kernel/irq/handle.c:206
handle_edge_irq+0x20f/0x870 kernel/irq/chip.c:791
generic_handle_irq_desc include/linux/irqdesc.h:159 [inline]
handle_irq+0x18c/0x2e7 arch/x86/kernel/irq_64.c:77
do_IRQ+0x78/0x190 arch/x86/kernel/irq.c:245
common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:641
RIP: 0010:check_memory_region+0x1c/0x1b0 mm/kasan/kasan.c:266
RSP: 0018:ffff8801a22c6ef8 EFLAGS: 00000202 ORIG_RAX: ffffffffffffffda
RAX: ffff7fffffffffff RBX: ffffed0034458dfd RCX: ffffffff815c2f61
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffff88a126c0
RBP: ffff8801a22c6f00 R08: fffffbfff11424d9 R09: fffffbfff11424d8
R10: fffffbfff11424d8 R11: ffffffff88a126c3 R12: ffffffff88a126c0
R13: ffff8801a22c7268 R14: 0000000000000001 R15: dffffc0000000000
kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272
atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
virt_spin_lock arch/x86/include/asm/qspinlock.h:68 [inline]
native_queued_spin_lock_slowpath+0x151/0xde0 kernel/locking/qspinlock.c:305
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:674 [inline]
queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:30 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:90 [inline]
do_raw_spin_lock+0x1a7/0x200 kernel/locking/spinlock_debug.c:113
__raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline]
_raw_spin_lock+0x32/0x40 kernel/locking/spinlock.c:144
spin_lock include/linux/spinlock.h:310 [inline]
find_inode_nowait+0x6c/0x190 fs/inode.c:1367
ext4_update_other_inodes_time fs/ext4/inode.c:5095 [inline]
ext4_do_update_inode fs/ext4/inode.c:5221 [inline]
ext4_mark_iloc_dirty+0x23e4/0x2e90 fs/ext4/inode.c:5741
ext4_orphan_del+0x8c4/0xed0 fs/ext4/namei.c:2897
ext4_evict_inode+0xba6/0x1aa0 fs/ext4/inode.c:319
evict+0x4a6/0x960 fs/inode.c:557
iput_final fs/inode.c:1519 [inline]
iput+0x62d/0xa80 fs/inode.c:1545
do_unlinkat+0x71f/0xa10 fs/namei.c:4039
SYSC_unlink fs/namei.c:4080 [inline]
SyS_unlink+0x26/0x30 fs/namei.c:4078
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x455067
RSP: 002b:00007ffe13638468 EFLAGS: 00000202 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000455067
RDX: 0000000000e529bb RSI: 00007ffe13638500 RDI: 00007ffe13638500
RBP: 00007ffe1363a210 R08: 0000000000000000 R09: 0000000000000010
R10: 000000000000000a R11: 0000000000000202 R12: 0000000000e52940
R13: 0000000000000000 R14: 000000000000074d R15: 000000000005a723
Code: fa 48 c1 ea 03 80 3c 02 00 0f 85 80 00 00 00 48 8b 9b 30 12 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d 7b 38 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 04 3c 03 7e 51 44 8b 63 38 31 ff 41 83 e4
RIP: __delayacct_blkio_end+0x4f/0xc0 kernel/delayacct.c:82 RSP: ffff8801db006888
======================================================
WARNING: possible circular locking dependency detected
4.16.0+ #2 Not tainted
------------------------------------------------------
syz-executor3/4523 is trying to acquire lock:
00000000b426ef13 ((console_sem).lock){-...}, at: down_trylock+0x13/0x70 kernel/locking/semaphore.c:136
but task is already holding lock:
00000000604707be (&p->pi_lock){-.-.}, at: try_to_wake_up+0xca/0x1190 kernel/sched/core.c:1963
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&p->pi_lock){-.-.}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152
try_to_wake_up+0xca/0x1190 kernel/sched/core.c:1963
wake_up_process+0x10/0x20 kernel/sched/core.c:2126
__up.isra.1+0x1b8/0x290 kernel/locking/semaphore.c:262
up+0x12f/0x1b0 kernel/locking/semaphore.c:187
__up_console_sem+0xbe/0x1b0 kernel/printk/printk.c:242
console_unlock+0x7d6/0x1100 kernel/printk/printk.c:2417
do_con_write+0x12b2/0x2280 drivers/tty/vt/vt.c:2437
con_write+0x25/0xc0 drivers/tty/vt/vt.c:2786
process_output_block drivers/tty/n_tty.c:579 [inline]
n_tty_write+0x6b9/0x1180 drivers/tty/n_tty.c:2308
do_tty_write drivers/tty/tty_io.c:958 [inline]
tty_write+0x3f1/0x880 drivers/tty/tty_io.c:1042
__vfs_write+0x10b/0x880 fs/read_write.c:485
vfs_write+0x1f8/0x560 fs/read_write.c:549
ksys_write+0xf9/0x250 fs/read_write.c:598
SYSC_write fs/read_write.c:610 [inline]
SyS_write+0x24/0x30 fs/read_write.c:607
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
-> #0 ((console_sem).lock){-...}:
lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152
down_trylock+0x13/0x70 kernel/locking/semaphore.c:136
__down_trylock_console_sem+0xae/0x200 kernel/printk/printk.c:225
console_trylock+0x15/0xa0 kernel/printk/printk.c:2229
console_trylock_spinning kernel/printk/printk.c:1643 [inline]
vprintk_emit+0x694/0xdd0 kernel/printk/printk.c:1906
vprintk_default+0x28/0x30 kernel/printk/printk.c:1947
vprintk_func+0x7a/0xe7 kernel/printk/printk_safe.c:379
printk+0x9e/0xba kernel/printk/printk.c:1980
kasan_die_handler.cold.22+0x11/0x30 arch/x86/mm/kasan_init_64.c:253
notifier_call_chain+0x178/0x380 kernel/notifier.c:93
__atomic_notifier_call_chain kernel/notifier.c:183 [inline]
atomic_notifier_call_chain+0x98/0x190 kernel/notifier.c:193
notify_die+0x1a3/0x2b0 kernel/notifier.c:549
do_general_protection+0x248/0x2f0 arch/x86/kernel/traps.c:558
general_protection+0x25/0x50 arch/x86/entry/entry_64.S:1158
__delayacct_blkio_end+0x4f/0xc0 kernel/delayacct.c:82
delayacct_blkio_end include/linux/delayacct.h:128 [inline]
try_to_wake_up+0xa89/0x1190 kernel/sched/core.c:2034
default_wake_function+0x30/0x50 kernel/sched/core.c:3743
autoremove_wake_function+0x7a/0x350 kernel/sched/wait.c:373
wake_page_function+0x15f/0x1c0 mm/filemap.c:1010
__wake_up_common+0x189/0x730 kernel/sched/wait.c:90
__wake_up_locked_key_bookmark+0x16/0x20 kernel/sched/wait.c:165
wake_up_page_bit+0x297/0x580 mm/filemap.c:1030
wake_up_page mm/filemap.c:1071 [inline]
end_page_writeback+0x24c/0x320 mm/filemap.c:1233
ext4_finish_bio+0x593/0x940 fs/ext4/page-io.c:118
ext4_end_bio+0x18f/0x6d0 fs/ext4/page-io.c:342
bio_endio+0x4b8/0x920 block/bio.c:1775
req_bio_endio block/blk-core.c:280 [inline]
blk_update_request+0x3a3/0xcb0 block/blk-core.c:3076
scsi_end_request+0xd3/0x870 drivers/scsi/scsi_lib.c:672
scsi_io_completion+0xca9/0x1d10 drivers/scsi/scsi_lib.c:891
scsi_finish_command+0x542/0x8d0 drivers/scsi/scsi.c:248
scsi_softirq_done+0x3d9/0x4b0 drivers/scsi/scsi_lib.c:1676
__blk_mq_complete_request+0x4c8/0x9f0 block/blk-mq.c:551
blk_mq_complete_request+0x2a5/0x370 block/blk-mq.c:636
scsi_mq_done+0xe2/0x430 drivers/scsi/scsi_lib.c:1987
virtscsi_complete_cmd+0x573/0x740 drivers/scsi/virtio_scsi.c:207
virtscsi_vq_done+0xc3/0x170 drivers/scsi/virtio_scsi.c:223
virtscsi_req_done+0xa7/0xd0 drivers/scsi/virtio_scsi.c:238
vring_interrupt+0x128/0x170 drivers/virtio/virtio_ring.c:950
__handle_irq_event_percpu+0x1c0/0xad0 kernel/irq/handle.c:149
handle_irq_event_percpu+0x98/0x1c0 kernel/irq/handle.c:189
handle_irq_event+0xa7/0x135 kernel/irq/handle.c:206
handle_edge_irq+0x20f/0x870 kernel/irq/chip.c:791
generic_handle_irq_desc include/linux/irqdesc.h:159 [inline]
handle_irq+0x18c/0x2e7 arch/x86/kernel/irq_64.c:77
do_IRQ+0x78/0x190 arch/x86/kernel/irq.c:245
ret_from_intr+0x0/0x1e
check_memory_region+0x1c/0x1b0 mm/kasan/kasan.c:266
kasan_check_read+0x11/0x20 mm/kasan/kasan.c:272
atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
virt_spin_lock arch/x86/include/asm/qspinlock.h:68 [inline]
native_queued_spin_lock_slowpath+0x151/0xde0 kernel/locking/qspinlock.c:305
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:674 [inline]
queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:30 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:90 [inline]
do_raw_spin_lock+0x1a7/0x200 kernel/locking/spinlock_debug.c:113
__raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline]
_raw_spin_lock+0x32/0x40 kernel/locking/spinlock.c:144
spin_lock include/linux/spinlock.h:310 [inline]
find_inode_nowait+0x6c/0x190 fs/inode.c:1367
ext4_update_other_inodes_time fs/ext4/inode.c:5095 [inline]
ext4_do_update_inode fs/ext4/inode.c:5221 [inline]
ext4_mark_iloc_dirty+0x23e4/0x2e90 fs/ext4/inode.c:5741
ext4_orphan_del+0x8c4/0xed0 fs/ext4/namei.c:2897
ext4_evict_inode+0xba6/0x1aa0 fs/ext4/inode.c:319
evict+0x4a6/0x960 fs/inode.c:557
iput_final fs/inode.c:1519 [inline]
iput+0x62d/0xa80 fs/inode.c:1545
do_unlinkat+0x71f/0xa10 fs/namei.c:4039
SYSC_unlink fs/namei.c:4080 [inline]
SyS_unlink+0x26/0x30 fs/namei.c:4078
do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&p->pi_lock);
lock((console_sem).lock);
lock(&p->pi_lock);
lock((console_sem).lock);
*** DEADLOCK ***
9 locks held by syz-executor3/4523:
#0: 000000006bef7a1e (sb_writers#4){.+.+}, at: sb_start_write include/linux/fs.h:1550 [inline]
#0: 000000006bef7a1e (sb_writers#4){.+.+}, at: mnt_want_write+0x3f/0xc0 fs/namespace.c:386
#1: 000000003c8f991d (sb_internal){.+.+}, at: sb_start_intwrite include/linux/fs.h:1597 [inline]
#1: 000000003c8f991d (sb_internal){.+.+}, at: ext4_evict_inode+0x720/0x1aa0 fs/ext4/inode.c:250
#2: 000000009ab2ac04 (jbd2_handle){++++}, at: start_this_handle+0x581/0x1250 fs/jbd2/transaction.c:385
#3: 000000003a327225 (inode_hash_lock){+.+.}, at: spin_lock include/linux/spinlock.h:310 [inline]
#3: 000000003a327225 (inode_hash_lock){+.+.}, at: find_inode_nowait+0x6c/0x190 fs/inode.c:1367
#4: 00000000dadc8d30 (&(&virtscsi_vq->vq_lock)->rlock){-.-.}, at: virtscsi_vq_done+0x9d/0x170 drivers/scsi/virtio_scsi.c:219
#5: 00000000930fd931 (rcu_read_lock){....}, at: hctx_lock+0x7a/0x1d0 block/blk-mq.c:570
#6: 00000000bf64dfdd (&page_wait_table[i]){-.-.}, at: wake_up_page_bit+0x27d/0x580 mm/filemap.c:1029
#7: 00000000604707be (&p->pi_lock){-.-.}, at: try_to_wake_up+0xca/0x1190 kernel/sched/core.c:1963
#8: 00000000930fd931 (rcu_read_lock){....}, at: atomic_notifier_call_chain+0x0/0x190 include/linux/compiler.h:188
stack backtrace:
CPU: 0 PID: 4523 Comm: syz-executor3 Not tainted 4.16.0+ #2
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+0x1b9/0x294 lib/dump_stack.c:113
print_circular_bug.isra.36.cold.54+0x1bd/0x27d kernel/locking/lockdep.c:1223
check_prev_add kernel/locking/lockdep.c:1863 [inline]
check_prevs_add kernel/locking/lockdep.c:1976 [inline]
validate_chain kernel/locking/lockdep.c:2417 [inline]
__lock_acquire+0x343e/0x5140 kernel/locking/lockdep.c:3431
lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x96/0xc0 kernel/locking/spinlock.c:152
down_trylock+0x13/0x70 kernel/locking/semaphore.c:136
__down_trylock_console_sem+0xae/0x200 kernel/printk/printk.c:225
console_trylock+0x15/0xa0 kernel/printk/printk.c:2229
console_trylock_spinning kernel/printk/printk.c:1643 [inline]
vprintk_emit+0x694/0xdd0 kernel/printk/printk.c:1906
vprintk_default+0x28/0x30 kernel/printk/printk.c:1947
vprintk_func+0x7a/0xe7 kernel/printk/printk_safe.c:379
printk+0x9e/0xba kernel/printk/printk.c:1980
kasan_die_handler.cold.22+0x11/0x30 arch/x86/mm/kasan_init_64.c:253
notifier_call_chain+0x178/0x380 kernel/notifier.c:93
__atomic_notifier_call_chain kernel/notifier.c:183 [inline]
atomic_notifier_call_chain+0x98/0x190 kernel/notifier.c:193
notify_die+0x1a3/0x2b0 kernel/notifier.c:549
do_general_protection+0x248/0x2f0 arch/x86/kernel/traps.c:558
general_protection+0x25/0x50 arch/x86/entry/entry_64.S:1158
RIP: 0010:__delayacct_blkio_end+0x4f/0xc0 kernel/delayacct.c:82
RSP: 0018:ffff8801db006888 EFLAGS: 00010002
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffff8801d8350238
RDX: 0000000000000007 RSI: ffffffff81783391 RDI: 0000000000000038
RBP: ffff8801db0068a0 R08: ffffed003b6046c3 R09: 0000000000000000
R10: ffff8801db006930 R11: ffff8801db023613 R12: ffff8801a22ba680
R13: ffff8801d8350200 R14: ffff8801d835023c R15: 0000000000000002
delayacct_blkio_end include/linux/delayacct.h:128 [inline]
try_to_wake_up+0xa89/0x1190 kernel/sched/core.c:2034
default_wake_function+0x30/0x50 kernel/sched/core.c:3743
autoremove_wake_function+0x7a/0x350 kernel/sched/wait.c:373
wake_page_function+0x15f/0x1c0 mm/filemap.c:1010
__wake_up_common+0x189/0x730 kernel/sched/wait.c:90
__wake_up_locked_key_bookmark+0x16/0x20 kernel/sched/wait.c:165
wake_up_page_bit+0x297/0x580 mm/filemap.c:1030
? ext4_evict
Lost 193 message(s)!
---[ end trace 5811b5060fa0ac57 ]---