[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. Starting mcstransd: [....] Starting file context maintaining daemon: restorecond[?25l[?1c7[ ok 8[?25h[?0c. [ 10.662054] random: crng init done [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.102' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 39.074363] audit: type=1400 audit(1546651278.950:5): avc: denied { associate } for pid=2052 comm="syz-executor853" name="syz0" scontext=unconfined_u:object_r:unlabeled_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=filesystem permissive=1 executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 43.358265] BUG: sleeping function called from invalid context at ./include/linux/percpu-rwsem.h:33 [ 43.367549] in_atomic(): 1, irqs_disabled(): 0, pid: 2120, name: syz-executor853 [ 43.375116] 3 locks held by syz-executor853/2120: [ 43.379942] #0: (sb_writers#4){.+.+.+}, at: [] mnt_want_write+0x3f/0xb0 [ 43.389070] #1: (&sb->s_type->i_mutex_key#9){+.+.+.}, at: [] do_truncate2+0x130/0x210 [ 43.399444] #2: (&ei->i_mmap_sem){++++.+}, at: [] ext4_setattr+0x1321/0x21b0 [ 43.408886] Preemption disabled at:[ 43.412351] [] delete_from_page_cache+0xdb/0x230 [ 43.418687] CPU: 1 PID: 2120 Comm: syz-executor853 Not tainted 4.9.148+ #3 [ 43.425676] ffff8801db7075e0 ffffffff81b456e1 0000000000000000 0000000000000101 [ 43.433685] ffff8801cc07df00 ffffffff814118bb ffff8801cc07df00 ffff8801db707618 [ 43.441698] ffffffff813f9ff8 ffff8801cc07df00 ffffffff82ad7ca0 0000000000000021 [ 43.449718] Call Trace: [ 43.452276] [ 43.454338] [] dump_stack+0xc1/0x120 [ 43.459713] [] ? delete_from_page_cache+0xdb/0x230 [ 43.467783] [] ___might_sleep.cold+0x1c1/0x1fa [ 43.473994] [] __might_sleep+0x95/0x1a0 [ 43.479741] [] ? mempool_free+0x1d0/0x1d0 [ 43.485812] [] ext4_writepages+0x170/0x2d20 [ 43.492123] [] ? remove_element.isra.0+0x1b0/0x1b0 [ 43.498682] [] ? kasan_kmalloc.part.0+0xc6/0xf0 [ 43.504980] [] ? save_stack_trace+0x16/0x20 [ 43.510935] [] ? ext4_mark_inode_dirty+0xb30/0xb30 [ 43.517502] [] ? mark_held_locks+0xb1/0x100 [ 43.523523] [] ? quarantine_put+0xd9/0x180 [ 43.529422] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 43.536709] [] ? trace_hardirqs_on+0xd/0x10 [ 43.542655] [] ? kasan_slab_free+0x11a/0x190 [ 43.548687] [] ? kasan_slab_free+0xb0/0x190 [ 43.555175] [] ? ext4_mark_inode_dirty+0xb30/0xb30 [ 43.561903] [] do_writepages+0xfc/0x1e0 [ 43.567642] [] ? page_writeback_cpu_online+0x20/0x20 [ 43.574600] [] ? scsi_io_completion+0x275/0x17e0 [ 43.580980] [] ? scsi_finish_command+0x3ad/0x520 [ 43.587358] [] ? scsi_softirq_done+0x259/0x370 [ 43.593569] [] ? blk_done_softirq+0x27e/0x3e0 [ 43.599926] [] ? __do_softirq+0x22d/0x964 [ 43.605704] [] ? irq_exit+0x119/0x160 [ 43.611129] [] ? do_IRQ+0x111/0x1d0 [ 43.616377] [] ? common_interrupt+0x9d/0x9d [ 43.622320] [] ? delete_from_page_cache+0xf3/0x230 [ 43.628879] [] ? truncate_inode_page+0x172/0x260 [ 43.635266] [] ? truncate_inode_pages_range+0x643/0xfe0 [ 43.642256] [] ? truncate_pagecache+0x69/0x90 [ 43.648378] [] ? ext4_setattr+0x134a/0x21b0 [ 43.654323] [] ? notify_change2+0xaab/0xd90 [ 43.660267] [] ? do_truncate2+0x148/0x210 [ 43.666046] [] ? path_openat+0x12ae/0x2f60 [ 43.671908] [] ? do_sys_open+0x2f0/0x610 [ 43.677666] [] __filemap_fdatawrite_range+0x1ad/0x260 [ 43.684488] [] ? replace_page_cache_page+0x600/0x600 [ 43.691224] [] ? check_preemption_disabled+0x3c/0x200 [ 43.698041] [] filemap_write_and_wait_range+0x5c/0xb0 [ 43.704855] [] __generic_file_fsync+0x9b/0x1c0 [ 43.711061] [] ext4_sync_file+0x64f/0x10a0 [ 43.716920] [] ? ext4_llseek+0x8e0/0x8e0 [ 43.722723] [] vfs_fsync_range+0x111/0x260 [ 43.728587] [] dio_complete+0x376/0x6e0 [ 43.734187] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 43.741002] [] ? ext4_update_bh_state+0xf0/0xf0 [ 43.747505] [] dio_bio_end_aio+0x124/0x390 [ 43.753403] [] ? dio_complete+0x6e0/0x6e0 [ 43.759176] [] bio_endio+0x1ad/0x200 [ 43.764517] [] blk_update_request+0x24e/0x9d0 [ 43.770655] [] scsi_end_request+0x9c/0x5c0 [ 43.776527] [] scsi_io_completion+0x275/0x17e0 [ 43.782789] [] ? scsi_unblock_requests+0x50/0x50 [ 43.789316] [] ? check_preemption_disabled+0x3c/0x200 [ 43.796138] [] ? scsi_handle_queue_ramp_up+0x32a/0x430 [ 43.803181] [] ? sd_completed_bytes+0x3f0/0x3f0 [ 43.809482] [] scsi_finish_command+0x3ad/0x520 [ 43.815688] [] scsi_softirq_done+0x259/0x370 [ 43.821719] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 43.828537] [] blk_done_softirq+0x27e/0x3e0 [ 43.834492] [] ? trigger_softirq+0x210/0x210 [ 43.840535] [] __do_softirq+0x22d/0x964 [ 43.846146] [] ? check_preemption_disabled+0x3c/0x200 [ 43.853002] [] irq_exit+0x119/0x160 [ 43.858267] [] do_IRQ+0x111/0x1d0 [ 43.863352] [] common_interrupt+0x9d/0x9d [ 43.869124] [ 43.871166] [] ? _raw_spin_unlock_irqrestore+0x5f/0x70 [ 43.878154] [] delete_from_page_cache+0xf3/0x230 [ 43.884542] [] truncate_inode_page+0x172/0x260 [ 43.890752] [] truncate_inode_pages_range+0x643/0xfe0 [ 43.897568] [] ? generic_error_remove_page+0xb0/0xb0 [ 43.904295] [] ? ext4_setattr+0x1321/0x21b0 [ 43.910244] [] truncate_pagecache+0x69/0x90 [ 43.916191] [] ext4_setattr+0x134a/0x21b0 [ 43.921966] [] ? nsecs_to_jiffies+0x30/0x30 [ 43.927916] [] ? trace_hardirqs_on_caller+0x385/0x5a0 [ 43.934801] [] ? ext4_evict_inode+0x1270/0x1270 [ 43.941108] [] notify_change2+0xaab/0xd90 [ 43.946888] [] do_truncate2+0x148/0x210 [ 43.952490] [] ? finish_open+0x180/0x180 [ 43.958183] [] ? do_dentry_open+0x702/0xc80 [ 43.964162] [] ? vfs_open+0x10d/0x230 [ 43.969606] [] path_openat+0x12ae/0x2f60 [ 43.975307] [] ? path_mountpoint+0x6d0/0x6d0 [ 43.981339] [] ? trace_hardirqs_on+0x10/0x10 [ 43.987464] [] do_filp_open+0x1a1/0x280 [ 43.993081] [] ? trace_hardirqs_on+0x10/0x10 [ 43.999117] [] ? may_open_dev+0xe0/0xe0 [ 44.004844] [] ? __alloc_fd+0x1d4/0x490 [ 44.010463] [] do_sys_open+0x2f0/0x610 [ 44.016116] [] ? filp_open+0x70/0x70 [ 44.021457] [] ? f_getown+0xb0/0xb0 [ 44.026711] [] SyS_creat+0x27/0x30 [ 44.031977] [] ? SyS_openat+0x40/0x40 [ 44.037411] [] do_syscall_64+0x1ad/0x570 [ 44.043114] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 44.050117] [ 44.051726] ========================================================= [ 44.058278] [ INFO: possible irq lock inversion dependency detected ] [ 44.064834] 4.9.148+ #3 Tainted: G W [ 44.069649] --------------------------------------------------------- [ 44.076197] syz-executor853/2120 just changed the state of lock: [ 44.082313] (&sbi->s_journal_flag_rwsem){.+.?.+}, at: [] do_writepages+0xfc/0x1e0 but this lock took another, SOFTIRQ-unsafe lock in the past: [ 44.097435] (&ei->i_data_sem){++++..} [ 44.101363] [ 44.101363] and interrupts could create inverse lock ordering between them. [ 44.101363] [ 44.111580] [ 44.111580] other info that might help us debug this: [ 44.118218] Possible interrupt unsafe locking scenario: [ 44.118218] [ 44.125115] CPU0 CPU1 [ 44.129751] ---- ---- [ 44.134387] lock(&ei->i_data_sem); [ 44.138316] local_irq_disable(); [ 44.144347] lock(&sbi->s_journal_flag_rwsem); [ 44.151828] lock(&ei->i_data_sem); [ 44.158341] [ 44.161076] lock(&sbi->s_journal_flag_rwsem); [ 44.166152] [ 44.166152] *** DEADLOCK *** [ 44.166152] [ 44.172187] 3 locks held by syz-executor853/2120: [ 44.176999] #0: (sb_writers#4){.+.+.+}, at: [] mnt_want_write+0x3f/0xb0 [ 44.186065] #1: (&sb->s_type->i_mutex_key#9){+.+.+.}, at: [] do_truncate2+0x130/0x210 [ 44.196817] #2: (&ei->i_mmap_sem){++++.+}, at: [] ext4_setattr+0x1321/0x21b0 [ 44.206200] [ 44.206200] the shortest dependencies between 2nd lock and 1st lock: [ 44.214245] -> (&ei->i_data_sem){++++..} ops: 87465 { [ 44.220149] HARDIRQ-ON-W at: [ 44.223618] __lock_acquire+0xf92/0x4350 [ 44.229474] lock_acquire+0x133/0x3d0 [ 44.235073] down_write+0x41/0xa0 [ 44.240325] ext4_release_file+0x25b/0x2e0 [ 44.246354] __fput+0x274/0x720 [ 44.251427] ____fput+0x16/0x20 [ 44.256502] task_work_run+0x108/0x180 [ 44.262186] exit_to_usermode_loop+0x13b/0x160 [ 44.268565] do_syscall_64+0x3f7/0x570 [ 44.274247] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 44.281144] HARDIRQ-ON-R at: [ 44.284612] __lock_acquire+0x507/0x4350 [ 44.290468] lock_acquire+0x133/0x3d0 [ 44.296064] down_read+0x44/0xb0 [ 44.301225] ext4_map_blocks+0x36a/0x1710 [ 44.307172] ext4_getblk+0x307/0x490 [ 44.312684] ext4_find_entry+0xa43/0x12b0 [ 44.318626] ext4_lookup+0x139/0x5e0 [ 44.324139] lookup_slow+0x24b/0x480 [ 44.329648] walk_component+0x71e/0xce0 [ 44.335418] path_lookupat.isra.0+0x18f/0x3f0 [ 44.341783] filename_lookup+0x1a1/0x3b0 [ 44.347650] user_path_at_empty+0x43/0x50 [ 44.353714] do_mount+0x124/0x2970 [ 44.359068] SyS_mount+0xab/0x120 [ 44.364323] devtmpfs_mount+0x4a/0x70 [ 44.369939] prepare_namespace+0x1ef/0x21d [ 44.375974] kernel_init_freeable+0x3a5/0x3c3 [ 44.382269] kernel_init+0x12/0x163 [ 44.387691] ret_from_fork+0x5c/0x70 [ 44.393197] SOFTIRQ-ON-W at: [ 44.396656] __lock_acquire+0x55c/0x4350 [ 44.402515] lock_acquire+0x133/0x3d0 [ 44.408121] down_write+0x41/0xa0 [ 44.413381] ext4_release_file+0x25b/0x2e0 [ 44.419421] __fput+0x274/0x720 [ 44.424498] ____fput+0x16/0x20 [ 44.429582] task_work_run+0x108/0x180 [ 44.435279] exit_to_usermode_loop+0x13b/0x160 [ 44.441666] do_syscall_64+0x3f7/0x570 [ 44.447358] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 44.454262] SOFTIRQ-ON-R at: [ 44.457738] __lock_acquire+0x55c/0x4350 [ 44.463616] lock_acquire+0x133/0x3d0 [ 44.469218] down_read+0x44/0xb0 [ 44.474387] ext4_map_blocks+0x36a/0x1710 [ 44.480338] ext4_getblk+0x307/0x490 [ 44.485854] ext4_find_entry+0xa43/0x12b0 [ 44.491800] ext4_lookup+0x139/0x5e0 [ 44.497309] lookup_slow+0x24b/0x480 [ 44.502819] walk_component+0x71e/0xce0 [ 44.508586] path_lookupat.isra.0+0x18f/0x3f0 [ 44.514878] filename_lookup+0x1a1/0x3b0 [ 44.520837] user_path_at_empty+0x43/0x50 [ 44.526782] do_mount+0x124/0x2970 [ 44.532119] SyS_mount+0xab/0x120 [ 44.537370] devtmpfs_mount+0x4a/0x70 [ 44.542968] prepare_namespace+0x1ef/0x21d [ 44.549005] kernel_init_freeable+0x3a5/0x3c3 [ 44.555302] kernel_init+0x12/0x163 [ 44.560725] ret_from_fork+0x5c/0x70 [ 44.566234] INITIAL USE at: [ 44.569604] __lock_acquire+0x5e5/0x4350 [ 44.575377] lock_acquire+0x133/0x3d0 [ 44.580887] down_read+0x44/0xb0 [ 44.585961] ext4_map_blocks+0x36a/0x1710 [ 44.591817] ext4_getblk+0x307/0x490 [ 44.597247] ext4_find_entry+0xa43/0x12b0 [ 44.603116] ext4_lookup+0x139/0x5e0 [ 44.608548] lookup_slow+0x24b/0x480 [ 44.613974] walk_component+0x71e/0xce0 [ 44.619720] path_lookupat.isra.0+0x18f/0x3f0 [ 44.625945] filename_lookup+0x1a1/0x3b0 [ 44.631714] user_path_at_empty+0x43/0x50 [ 44.637695] do_mount+0x124/0x2970 [ 44.643066] SyS_mount+0xab/0x120 [ 44.648261] devtmpfs_mount+0x4a/0x70 [ 44.653778] prepare_namespace+0x1ef/0x21d [ 44.659725] kernel_init_freeable+0x3a5/0x3c3 [ 44.665935] kernel_init+0x12/0x163 [ 44.671270] ret_from_fork+0x5c/0x70 [ 44.676692] } [ 44.678556] ... key at: [] __key.74417+0x0/0x40 [ 44.685365] ... acquired at: [ 44.688547] lock_acquire+0x133/0x3d0 [ 44.692615] down_write+0x41/0xa0 [ 44.696219] ext4_map_blocks+0x77a/0x1710 [ 44.700514] ext4_writepages+0x155e/0x2d20 [ 44.704895] do_writepages+0xfc/0x1e0 [ 44.708841] __filemap_fdatawrite_range+0x1ad/0x260 [ 44.714012] filemap_flush+0x24/0x30 [ 44.717877] ext4_alloc_da_blocks+0xd6/0x340 [ 44.722435] ext4_release_file+0x1ff/0x2e0 [ 44.726824] __fput+0x274/0x720 [ 44.730253] ____fput+0x16/0x20 [ 44.733682] task_work_run+0x108/0x180 [ 44.737724] exit_to_usermode_loop+0x13b/0x160 [ 44.742453] do_syscall_64+0x3f7/0x570 [ 44.746487] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 44.751734] [ 44.753337] -> (&sbi->s_journal_flag_rwsem){.+.?.+} ops: 315 { [ 44.759880] HARDIRQ-ON-R at: [ 44.763265] __lock_acquire+0x507/0x4350 [ 44.768991] lock_acquire+0x133/0x3d0 [ 44.774425] ext4_writepages+0x1a1/0x2d20 [ 44.780199] do_writepages+0xfc/0x1e0 [ 44.785637] __filemap_fdatawrite_range+0x1ad/0x260 [ 44.792400] SyS_fadvise64_64+0x701/0x830 [ 44.798171] SyS_fadvise64+0x2c/0x40 [ 44.803509] do_syscall_64+0x1ad/0x570 [ 44.809021] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 44.815760] IN-SOFTIRQ-R at: [ 44.819143] __lock_acquire+0xf6b/0x4350 [ 44.824826] lock_acquire+0x133/0x3d0 [ 44.830256] ext4_writepages+0x1a1/0x2d20 [ 44.836145] do_writepages+0xfc/0x1e0 [ 44.841578] __filemap_fdatawrite_range+0x1ad/0x260 [ 44.848226] filemap_write_and_wait_range+0x5c/0xb0 [ 44.854871] __generic_file_fsync+0x9b/0x1c0 [ 44.860914] ext4_sync_file+0x64f/0x10a0 [ 44.866641] vfs_fsync_range+0x111/0x260 [ 44.872333] dio_complete+0x376/0x6e0 [ 44.877760] dio_bio_end_aio+0x124/0x390 [ 44.883449] bio_endio+0x1ad/0x200 [ 44.888611] blk_update_request+0x24e/0x9d0 [ 44.894557] scsi_end_request+0x9c/0x5c0 [ 44.900242] scsi_io_completion+0x275/0x17e0 [ 44.906272] scsi_finish_command+0x3ad/0x520 [ 44.912304] scsi_softirq_done+0x259/0x370 [ 44.918162] blk_done_softirq+0x27e/0x3e0 [ 44.923937] __do_softirq+0x22d/0x964 [ 44.929367] irq_exit+0x119/0x160 [ 44.934443] do_IRQ+0x111/0x1d0 [ 44.939347] ret_from_intr+0x0/0x20 [ 44.944602] delete_from_page_cache+0xf3/0x230 [ 44.950810] truncate_inode_page+0x172/0x260 [ 44.956846] truncate_inode_pages_range+0x643/0xfe0 [ 44.963505] truncate_pagecache+0x69/0x90 [ 44.969281] ext4_setattr+0x134a/0x21b0 [ 44.974908] notify_change2+0xaab/0xd90 [ 44.980529] do_truncate2+0x148/0x210 [ 44.985968] path_openat+0x12ae/0x2f60 [ 44.991498] do_filp_open+0x1a1/0x280 [ 44.997027] do_sys_open+0x2f0/0x610 [ 45.002382] SyS_creat+0x27/0x30 [ 45.007371] do_syscall_64+0x1ad/0x570 [ 45.012881] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 45.019659] SOFTIRQ-ON-R at: [ 45.023041] __lock_acquire+0x55c/0x4350 [ 45.028729] lock_acquire+0x133/0x3d0 [ 45.034160] ext4_writepages+0x1a1/0x2d20 [ 45.039933] do_writepages+0xfc/0x1e0 [ 45.045551] __filemap_fdatawrite_range+0x1ad/0x260 [ 45.052196] SyS_fadvise64_64+0x701/0x830 [ 45.057969] SyS_fadvise64+0x2c/0x40 [ 45.063307] do_syscall_64+0x1ad/0x570 [ 45.068820] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 45.075541] RECLAIM_FS-ON-R at: [ 45.079174] mark_held_locks+0xb1/0x100 [ 45.085031] lockdep_trace_alloc+0x18c/0x2b0 [ 45.091325] kmem_cache_alloc+0x2d/0x2b0 [ 45.097267] ext4_init_io_end+0x27/0x100 [ 45.103208] ext4_writepages+0xce9/0x2d20 [ 45.109249] do_writepages+0xfc/0x1e0 [ 45.114977] __filemap_fdatawrite_range+0x1ad/0x260 [ 45.121980] filemap_flush+0x24/0x30 [ 45.127647] ext4_alloc_da_blocks+0xd6/0x340 [ 45.134052] ext4_release_file+0x1ff/0x2e0 [ 45.140189] __fput+0x274/0x720 [ 45.145349] ____fput+0x16/0x20 [ 45.150513] task_work_run+0x108/0x180 [ 45.156363] exit_to_usermode_loop+0x13b/0x160 [ 45.162831] do_syscall_64+0x3f7/0x570 [ 45.168605] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 45.175592] INITIAL USE at: [ 45.178902] __lock_acquire+0x5e5/0x4350 [ 45.184504] lock_acquire+0x133/0x3d0 [ 45.189844] ext4_writepages+0x1a1/0x2d20 [ 45.195529] do_writepages+0xfc/0x1e0 [ 45.200864] __filemap_fdatawrite_range+0x1ad/0x260 [ 45.207452] SyS_fadvise64_64+0x701/0x830 [ 45.213242] SyS_fadvise64+0x2c/0x40 [ 45.218495] do_syscall_64+0x1ad/0x570 [ 45.223920] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 45.230554] } [ 45.232331] ... key at: [] rwsem_key.75110+0x0/0x40 [ 45.239440] ... acquired at: [ 45.242529] check_usage_forwards+0x144/0x280 [ 45.247173] mark_lock+0x42d/0x12e0 [ 45.250948] __lock_acquire+0xf6b/0x4350 [ 45.255155] lock_acquire+0x133/0x3d0 [ 45.259109] ext4_writepages+0x1a1/0x2d20 [ 45.263403] do_writepages+0xfc/0x1e0 [ 45.267347] __filemap_fdatawrite_range+0x1ad/0x260 [ 45.272523] filemap_write_and_wait_range+0x5c/0xb0 [ 45.277687] __generic_file_fsync+0x9b/0x1c0 [ 45.282246] ext4_sync_file+0x64f/0x10a0 [ 45.286453] vfs_fsync_range+0x111/0x260 [ 45.290658] dio_complete+0x376/0x6e0 [ 45.294603] dio_bio_end_aio+0x124/0x390 [ 45.298813] bio_endio+0x1ad/0x200 [ 45.302500] blk_update_request+0x24e/0x9d0 [ 45.306978] scsi_end_request+0x9c/0x5c0 [ 45.311187] scsi_io_completion+0x275/0x17e0 [ 45.315837] scsi_finish_command+0x3ad/0x520 [ 45.320420] scsi_softirq_done+0x259/0x370 [ 45.324807] blk_done_softirq+0x27e/0x3e0 [ 45.329111] __do_softirq+0x22d/0x964 [ 45.333059] irq_exit+0x119/0x160 [ 45.336669] do_IRQ+0x111/0x1d0 [ 45.340119] ret_from_intr+0x0/0x20 [ 45.343910] delete_from_page_cache+0xf3/0x230 [ 45.348641] truncate_inode_page+0x172/0x260 [ 45.353200] truncate_inode_pages_range+0x643/0xfe0 [ 45.358368] truncate_pagecache+0x69/0x90 [ 45.362665] ext4_setattr+0x134a/0x21b0 [ 45.366798] notify_change2+0xaab/0xd90 [ 45.370922] do_truncate2+0x148/0x210 [ 45.374881] path_openat+0x12ae/0x2f60 [ 45.378920] do_filp_open+0x1a1/0x280 [ 45.382870] do_sys_open+0x2f0/0x610 [ 45.386731] SyS_creat+0x27/0x30 [ 45.390246] do_syscall_64+0x1ad/0x570 [ 45.394285] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 45.399534] [ 45.401140] [ 45.401140] stack backtrace: [ 45.405615] CPU: 1 PID: 2120 Comm: syz-executor853 Tainted: G W 4.9.148+ #3 [ 45.413822] ffff8801db707290 ffffffff81b456e1 0000000000000001 ffffffff84018600 [ 45.421821] ffff8801db707340 ffff8801cc07df00 ffffffff83cb3520 ffff8801db7072e0 [ 45.429862] ffffffff813ff73f 0000000100000000 ffff880100000000 ffffffff84018610 [ 45.437851] Call Trace: [ 45.440405] [ 45.442448] [] dump_stack+0xc1/0x120 [ 45.447809] [] print_irq_inversion_bug.cold+0x31a/0x35d [ 45.454798] [] check_usage_forwards+0x144/0x280 [ 45.461093] [] ? print_irq_inversion_bug+0xa0/0xa0 [ 45.467663] [] ? __save_stack_trace+0x7a/0xf0 [ 45.473781] [] ? save_stack_trace+0x16/0x20 [ 45.479725] [] ? save_trace+0xe0/0x240 [ 45.485239] [] mark_lock+0x42d/0x12e0 [ 45.490664] [] ? print_irq_inversion_bug+0xa0/0xa0 [ 45.497217] [] __lock_acquire+0xf6b/0x4350 [ 45.503086] [] ? retint_kernel+0x2d/0x2d [ 45.508785] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 45.515598] [] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 45.522153] [] ? trace_hardirqs_on+0x10/0x10 [ 45.528188] [] ? dump_stack+0x105/0x120 [ 45.533786] [] ? dump_stack+0x10f/0x120 [ 45.539382] [] lock_acquire+0x133/0x3d0 [ 45.544982] [] ? do_writepages+0xfc/0x1e0 [ 45.550753] [] ext4_writepages+0x1a1/0x2d20 [ 45.556699] [] ? do_writepages+0xfc/0x1e0 [ 45.562472] [] ? remove_element.isra.0+0x1b0/0x1b0 [ 45.569027] [] ? kasan_kmalloc.part.0+0xc6/0xf0 [ 45.575321] [] ? save_stack_trace+0x16/0x20 [ 45.581267] [] ? ext4_mark_inode_dirty+0xb30/0xb30 [ 45.587822] [] ? mark_held_locks+0xb1/0x100 [ 45.593766] [] ? quarantine_put+0xd9/0x180 [ 45.599627] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 45.606443] [] ? trace_hardirqs_on+0xd/0x10 [ 45.612388] [] ? kasan_slab_free+0x11a/0x190 [ 45.618422] [] ? kasan_slab_free+0xb0/0x190 [ 45.624367] [] ? ext4_mark_inode_dirty+0xb30/0xb30 [ 45.630920] [] do_writepages+0xfc/0x1e0 [ 45.636523] [] ? page_writeback_cpu_online+0x20/0x20 [ 45.643250] [] ? scsi_io_completion+0x275/0x17e0 [ 45.649631] [] ? scsi_finish_command+0x3ad/0x520 [ 45.656013] [] ? scsi_softirq_done+0x259/0x370 [ 45.662222] [] ? blk_done_softirq+0x27e/0x3e0 [ 45.668345] [] ? __do_softirq+0x22d/0x964 [ 45.674128] [] ? irq_exit+0x119/0x160 [ 45.679552] [] ? do_IRQ+0x111/0x1d0 [ 45.684801] [] ? common_interrupt+0x9d/0x9d [ 45.690747] [] ? delete_from_page_cache+0xf3/0x230 [ 45.697300] [] ? truncate_inode_page+0x172/0x260 [ 45.703677] [] ? truncate_inode_pages_range+0x643/0xfe0 [ 45.710666] [] ? truncate_pagecache+0x69/0x90 [ 45.716785] [] ? ext4_setattr+0x134a/0x21b0 [ 45.722738] [] ? notify_change2+0xaab/0xd90 [ 45.728693] [] ? do_truncate2+0x148/0x210 [ 45.734466] [] ? path_openat+0x12ae/0x2f60 [ 45.740326] [] ? do_sys_open+0x2f0/0x610 [ 45.746011] [] __filemap_fdatawrite_range+0x1ad/0x260 [ 45.752826] [] ? replace_page_cache_page+0x600/0x600 [ 45.759553] [] ? check_preemption_disabled+0x3c/0x200 [ 45.766372] [] filemap_write_and_wait_range+0x5c/0xb0 [ 45.773197] [] __generic_file_fsync+0x9b/0x1c0 [ 45.779411] [] ext4_sync_file+0x64f/0x10a0 [ 45.785284] [] ? ext4_llseek+0x8e0/0x8e0 [ 45.790978] [] vfs_fsync_range+0x111/0x260 [ 45.796844] [] dio_complete+0x376/0x6e0 [ 45.802448] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 45.809262] [] ? ext4_update_bh_state+0xf0/0xf0 [ 45.815572] [] dio_bio_end_aio+0x124/0x390 [ 45.821430] [] ? dio_complete+0x6e0/0x6e0 [ 45.827204] [] bio_endio+0x1ad/0x200 [ 45.832543] [] blk_update_request+0x24e/0x9d0 [ 45.838662] [] scsi_end_request+0x9c/0x5c0 [ 45.844524] [] scsi_io_completion+0x275/0x17e0 [ 45.850745] [] ? scsi_unblock_requests+0x50/0x50 [ 45.857131] [] ? check_preemption_disabled+0x3c/0x200 [ 45.863960] [] ? scsi_handle_queue_ramp_up+0x32a/0x430 [ 45.870871] [] ? sd_completed_bytes+0x3f0/0x3f0 [ 45.877173] [] scsi_finish_command+0x3ad/0x520 [ 45.883379] [] scsi_softirq_done+0x259/0x370 [ 45.889418] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 45.896234] [] blk_done_softirq+0x27e/0x3e0 [ 45.902197] [] ? trigger_softirq+0x210/0x210 [ 45.908247] [] __do_softirq+0x22d/0x964 [ 45.913845] [] ? check_preemption_disabled+0x3c/0x200 [ 45.920660] [] irq_exit+0x119/0x160 [ 45.925911] [] do_IRQ+0x111/0x1d0 [ 45.930988] [] common_interrupt+0x9d/0x9d [ 45.936753] [ 45.938793] [] ? _raw_spin_unlock_irqrestore+0x5f/0x70 [ 45.945712] [] delete_from_page_cache+0xf3/0x230 [ 45.952091] [] truncate_inode_page+0x172/0x260 [ 45.958308] [] truncate_inode_pages_range+0x643/0xfe0 [ 45.965137] [] ? generic_error_remove_page+0xb0/0xb0 [ 45.971880] [] ? ext4_setattr+0x1321/0x21b0 [ 45.977824] [] truncate_pagecache+0x69/0x90 [ 45.983771] [] ext4_setattr+0x134a/0x21b0 [ 45.989551] [] ? nsecs_to_jiffies+0x30/0x30 [ 45.995504] [] ? trace_hardirqs_on_caller+0x385/0x5a0 [ 46.002343] [] ? ext4_evict_inode+0x1270/0x1270 [ 46.008637] [] notify_change2+0xaab/0xd90 [ 46.014411] [] do_truncate2+0x148/0x210 [ 46.020007] [] ? finish_open+0x180/0x180 [ 46.025692] [] ? do_dentry_open+0x702/0xc80 [ 46.031640] [] ? vfs_open+0x10d/0x230 [ 46.037066] [] path_openat+0x12ae/0x2f60 [ 46.042766] [] ? path_mountpoint+0x6d0/0x6d0 [ 46.048800] [] ? trace_hardirqs_on+0x10/0x10 [ 46.054833] [] do_filp_open+0x1a1/0x280 [ 46.060429] [] ? trace_hardirqs_on+0x10/0x10 [ 46.066461] [] ? may_open_dev+0xe0/0xe0 [ 46.072061] [] ? __alloc_fd+0x1d4/0x490 [ 46.077678] [] do_sys_open+0x2f0/0x610 [ 46.083190] [] ? filp_open+0x70/0x70 [ 46.088544] [] ? f_getown+0xb0/0xb0 [ 46.093796] [] SyS_creat+0x27/0x30 [ 46.098957] [] ? SyS_openat+0x40/0x40 [ 46.104380] [] do_syscall_64+0x1ad/0x570 [ 46.110065] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 46.117010] BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:51 [ 46.125501] in_atomic(): 1, irqs_disabled(): 0, pid: 2120, name: syz-executor853 [ 46.133027] INFO: lockdep is turned off. [ 46.137088] Preemption disabled at:[ 46.140551] [] delete_from_page_cache+0xdb/0x230 [ 46.146900] CPU: 1 PID: 2120 Comm: syz-executor853 Tainted: G W 4.9.148+ #3 [ 46.155126] ffff8801db707a00 ffffffff81b456e1 0000000000000000 0000000000000101 [ 46.163122] ffff8801cc07df00 ffffffff814118bb ffff8801cc07df00 ffff8801db707a38 [ 46.171119] ffffffff813f9ff8 ffff8801cc07df00 ffffffff82a50dc0 0000000000000033 [ 46.179146] Call Trace: [ 46.181702] [ 46.183748] [] dump_stack+0xc1/0x120 [ 46.189142] [] ? delete_from_page_cache+0xdb/0x230 [ 46.195698] [] ___might_sleep.cold+0x1c1/0x1fa [ 46.201932] [] __might_sleep+0x95/0x1a0 [ 46.207529] [] ? filemap_fdatawait_range+0x3d/0x50 [ 46.214118] [] down_write+0x21/0xa0 [ 46.219374] [] __generic_file_fsync+0xcd/0x1c0 [ 46.225583] [] ext4_sync_file+0x64f/0x10a0 [ 46.231533] [] ? ext4_llseek+0x8e0/0x8e0 [ 46.237223] [] vfs_fsync_range+0x111/0x260 [ 46.243090] [] dio_complete+0x376/0x6e0 [ 46.248699] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 46.255515] [] ? ext4_update_bh_state+0xf0/0xf0 [ 46.261822] [] dio_bio_end_aio+0x124/0x390 [ 46.267681] [] ? dio_complete+0x6e0/0x6e0 [ 46.273452] [] bio_endio+0x1ad/0x200 [ 46.278793] [] blk_update_request+0x24e/0x9d0 [ 46.284934] [] scsi_end_request+0x9c/0x5c0 [ 46.290792] [] scsi_io_completion+0x275/0x17e0 [ 46.296997] [] ? scsi_unblock_requests+0x50/0x50 [ 46.303380] [] ? check_preemption_disabled+0x3c/0x200 [ 46.310195] [] ? scsi_handle_queue_ramp_up+0x32a/0x430 [ 46.317105] [] ? sd_completed_bytes+0x3f0/0x3f0 [ 46.323403] [] scsi_finish_command+0x3ad/0x520 [ 46.329613] [] scsi_softirq_done+0x259/0x370 [ 46.335661] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 46.342474] [] blk_done_softirq+0x27e/0x3e0 [ 46.348418] [] ? trigger_softirq+0x210/0x210 [ 46.354451] [] __do_softirq+0x22d/0x964 [ 46.360048] [] ? check_preemption_disabled+0x3c/0x200 [ 46.366863] [] irq_exit+0x119/0x160 [ 46.372122] [] do_IRQ+0x111/0x1d0 [ 46.377198] [] common_interrupt+0x9d/0x9d [ 46.382964] [ 46.385005] [] ? _raw_spin_unlock_irqrestore+0x5f/0x70 [ 46.391926] [] delete_from_page_cache+0xf3/0x230 [ 46.398308] [] truncate_inode_page+0x172/0x260 [ 46.404544] [] truncate_inode_pages_range+0x643/0xfe0 [ 46.411356] [] ? generic_error_remove_page+0xb0/0xb0 [ 46.418092] [] ? ext4_setattr+0x1321/0x21b0 [ 46.424054] [] truncate_pagecache+0x69/0x90 [ 46.430001] [] ext4_setattr+0x134a/0x21b0 [ 46.435771] [] ? nsecs_to_jiffies+0x30/0x30 [ 46.441728] [] ? trace_hardirqs_on_caller+0x385/0x5a0 [ 46.448541] [] ? ext4_evict_inode+0x1270/0x1270 [ 46.454838] [] notify_change2+0xaab/0xd90 [ 46.460616] [] do_truncate2+0x148/0x210 [ 46.466214] [] ? finish_open+0x180/0x180 [ 46.471898] [] ? do_dentry_open+0x702/0xc80 [ 46.477841] [] ? vfs_open+0x10d/0x230 [ 46.483266] [] path_openat+0x12ae/0x2f60 [ 46.488960] [] ? path_mountpoint+0x6d0/0x6d0 [ 46.494991] [] ? trace_hardirqs_on+0x10/0x10 [ 46.501020] [] do_filp_open+0x1a1/0x280 [ 46.506619] [] ? trace_hardirqs_on+0x10/0x10 [ 46.512651] [] ? may_open_dev+0xe0/0xe0 [ 46.518248] [] ? __alloc_fd+0x1d4/0x490 [ 46.523850] [] do_sys_open+0x2f0/0x610 [ 46.529364] [] ? filp_open+0x70/0x70 [ 46.534706] [] ? f_getown+0xb0/0xb0 [ 46.539961] [] SyS_creat+0x27/0x30 [ 46.545138] [] ? SyS_openat+0x40/0x40 [ 46.550587] [] do_syscall_64+0x1ad/0x570 [ 46.556274] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 46.563208] BUG: scheduling while atomic: syz-executor853/2120/0x00000102 [ 46.570118] INFO: lockdep is turned off. [ 46.574191] Modules linked in: [ 46.577493] Preemption disabled at:[ 46.580922] [] delete_from_page_cache+0xdb/0x230 [ 46.587282] Kernel panic - not syncing: scheduling while atomic [ 46.587282] [ 46.594793] CPU: 1 PID: 2120 Comm: syz-executor853 Tainted: G W 4.9.148+ #3 [ 46.603003] ffff8801db7076f0 ffffffff81b456e1 0000000000000100 ffffffff82a48d80 [ 46.611008] 00000000ffffffff 0000000000000001 ffff8801cc07df00 ffff8801db7077d0 [ 46.619016] ffffffff813f727a 0000000041b58ab3 ffffffff82e356f2 ffffffff813f70a1 [ 46.627008] Call Trace: [ 46.629562] [ 46.631621] [] dump_stack+0xc1/0x120 [ 46.637024] [] panic+0x1d9/0x3bd [ 46.642016] [] ? add_taint.cold+0x16/0x16 [ 46.647787] [] ? load_module.cold+0x3b7/0x3b7 [ 46.653908] [] ? check_preemption_disabled+0x3c/0x200 [ 46.660725] [] ? vprintk_emit+0x277/0x6f0 [ 46.666499] [] ? vprintk_emit+0x277/0x6f0 [ 46.672270] [] ? delete_from_page_cache+0xdb/0x230 [ 46.678825] [] __schedule_bug.cold+0x6d/0x91 [ 46.684862] [] __schedule+0xf5b/0x1b50 [ 46.690373] [] ? rwsem_down_write_failed+0x395/0x750 [ 46.697103] [] ? rwsem_down_write_failed+0x39e/0x750 [ 46.703851] [] schedule+0x92/0x1c0 [ 46.709017] [] rwsem_down_write_failed+0x3a3/0x750 [ 46.715571] [] ? rt_mutex_futex_unlock+0x10/0x10 [ 46.722067] [] ? dump_stack+0xfb/0x120 [ 46.727580] [] ? dump_stack+0x10f/0x120 [ 46.733182] [] call_rwsem_down_write_failed+0x17/0x30 [ 46.739997] [] down_write+0x5c/0xa0 [ 46.745252] [] ? __generic_file_fsync+0xcd/0x1c0 [ 46.751630] [] __generic_file_fsync+0xcd/0x1c0 [ 46.757840] [] ext4_sync_file+0x64f/0x10a0 [ 46.763702] [] ? ext4_llseek+0x8e0/0x8e0 [ 46.769388] [] vfs_fsync_range+0x111/0x260 [ 46.775247] [] dio_complete+0x376/0x6e0 [ 46.780844] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 46.787660] [] ? ext4_update_bh_state+0xf0/0xf0 [ 46.793953] [] dio_bio_end_aio+0x124/0x390 [ 46.799810] [] ? dio_complete+0x6e0/0x6e0 [ 46.805582] [] bio_endio+0x1ad/0x200 [ 46.810924] [] blk_update_request+0x24e/0x9d0 [ 46.817049] [] scsi_end_request+0x9c/0x5c0 [ 46.822909] [] scsi_io_completion+0x275/0x17e0 [ 46.829124] [] ? scsi_unblock_requests+0x50/0x50 [ 46.835505] [] ? check_preemption_disabled+0x3c/0x200 [ 46.842317] [] ? scsi_handle_queue_ramp_up+0x32a/0x430 [ 46.849221] [] ? sd_completed_bytes+0x3f0/0x3f0 [ 46.855519] [] scsi_finish_command+0x3ad/0x520 [ 46.861726] [] scsi_softirq_done+0x259/0x370 [ 46.867762] [] ? trace_hardirqs_on_caller+0x260/0x5a0 [ 46.874575] [] blk_done_softirq+0x27e/0x3e0 [ 46.880519] [] ? trigger_softirq+0x210/0x210 [ 46.886551] [] __do_softirq+0x22d/0x964 [ 46.892150] [] ? check_preemption_disabled+0x3c/0x200 [ 46.898964] [] irq_exit+0x119/0x160 [ 46.904217] [] do_IRQ+0x111/0x1d0 [ 46.909295] [] common_interrupt+0x9d/0x9d [ 46.915065] [ 46.917115] [] ? _raw_spin_unlock_irqrestore+0x5f/0x70 [ 46.924041] [] delete_from_page_cache+0xf3/0x230 [ 46.930426] [] truncate_inode_page+0x172/0x260 [ 46.936634] [] truncate_inode_pages_range+0x643/0xfe0 [ 46.943448] [] ? generic_error_remove_page+0xb0/0xb0 [ 46.950177] [] ? ext4_setattr+0x1321/0x21b0 [ 46.956122] [] truncate_pagecache+0x69/0x90 [ 46.962070] [] ext4_setattr+0x134a/0x21b0 [ 46.967846] [] ? nsecs_to_jiffies+0x30/0x30 [ 46.973792] [] ? trace_hardirqs_on_caller+0x385/0x5a0 [ 46.980612] [] ? ext4_evict_inode+0x1270/0x1270 [ 46.986906] [] notify_change2+0xaab/0xd90 [ 46.992688] [] do_truncate2+0x148/0x210 [ 46.998310] [] ? finish_open+0x180/0x180 [ 47.003997] [] ? do_dentry_open+0x702/0xc80 [ 47.009943] [] ? vfs_open+0x10d/0x230 [ 47.015370] [] path_openat+0x12ae/0x2f60 [ 47.021055] [] ? path_mountpoint+0x6d0/0x6d0 [ 47.027087] [] ? trace_hardirqs_on+0x10/0x10 [ 47.033131] [] do_filp_open+0x1a1/0x280 [ 47.038727] [] ? trace_hardirqs_on+0x10/0x10 [ 47.044760] [] ? may_open_dev+0xe0/0xe0 [ 47.050374] [] ? __alloc_fd+0x1d4/0x490 [ 47.055970] [] do_sys_open+0x2f0/0x610 [ 47.061483] [] ? filp_open+0x70/0x70 [ 47.066820] [] ? f_getown+0xb0/0xb0 [ 47.072077] [] SyS_creat+0x27/0x30 [ 47.077255] [] ? SyS_openat+0x40/0x40 [ 47.082679] [] do_syscall_64+0x1ad/0x570 [ 47.088373] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 47.095628] Kernel Offset: disabled [ 47.099239] Rebooting in 86400 seconds..