loop5: rw=1, want=114, limit=112 buffer_io_error: 6 callbacks suppressed Buffer I/O error on dev loop5, logical block 113, lost async page write ====================================================== WARNING: possible circular locking dependency detected 4.19.0-rc2+ #1 Not tainted ------------------------------------------------------ attempt to access beyond end of device syz-executor5/31509 is trying to acquire lock: 00000000432ecee3 (sb_internal){.+.+}, at: sb_start_intwrite include/linux/fs.h:1613 [inline] 00000000432ecee3 (sb_internal){.+.+}, at: ext4_evict_inode+0x588/0x19b0 fs/ext4/inode.c:250 but task is already holding lock: 00000000d9db5c55 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.98+0x0/0x30 mm/page_alloc.c:463 loop5: rw=1, want=115, limit=112 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (fs_reclaim){+.+.}: __fs_reclaim_acquire mm/page_alloc.c:3728 [inline] fs_reclaim_acquire.part.98+0x24/0x30 mm/page_alloc.c:3739 fs_reclaim_acquire+0x14/0x20 mm/page_alloc.c:3740 slab_pre_alloc_hook mm/slab.h:418 [inline] slab_alloc mm/slab.c:3378 [inline] kmem_cache_alloc_trace+0x2d/0x730 mm/slab.c:3618 Buffer I/O error on dev loop5, logical block 114, lost async page write kmalloc include/linux/slab.h:513 [inline] kzalloc include/linux/slab.h:707 [inline] smk_fetch.part.24+0x5a/0xf0 security/smack/smack_lsm.c:273 smk_fetch security/smack/smack_lsm.c:3548 [inline] smack_d_instantiate+0x946/0xea0 security/smack/smack_lsm.c:3502 security_d_instantiate+0x5c/0xf0 security/security.c:1287 d_instantiate+0x5e/0xa0 fs/dcache.c:1870 attempt to access beyond end of device shmem_mknod+0x189/0x1f0 mm/shmem.c:2812 vfs_mknod+0x447/0x800 fs/namei.c:3719 handle_create+0x1ff/0x7c0 drivers/base/devtmpfs.c:211 handle drivers/base/devtmpfs.c:374 [inline] devtmpfsd+0x27f/0x4c0 drivers/base/devtmpfs.c:400 kthread+0x35a/0x420 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413 loop5: rw=1, want=116, limit=112 -> #2 (&isp->smk_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0x171/0x1700 kernel/locking/mutex.c:1073 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1088 smack_d_instantiate+0x130/0xea0 security/smack/smack_lsm.c:3369 security_d_instantiate+0x5c/0xf0 security/security.c:1287 d_instantiate_new+0x7e/0x160 fs/dcache.c:1889 ext4_add_nondir+0x81/0x90 fs/ext4/namei.c:2415 ext4_symlink+0x761/0x1170 fs/ext4/namei.c:3162 Buffer I/O error on dev loop5, logical block 115, lost async page write vfs_symlink+0x37a/0x5d0 fs/namei.c:4127 do_symlinkat+0x242/0x2d0 fs/namei.c:4154 __do_sys_symlink fs/namei.c:4173 [inline] __se_sys_symlink fs/namei.c:4171 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4171 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 attempt to access beyond end of device entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #1 (jbd2_handle){++++}: start_this_handle+0x5c0/0x1260 fs/jbd2/transaction.c:385 jbd2__journal_start+0x3c9/0x9f0 fs/jbd2/transaction.c:439 __ext4_journal_start_sb+0x18d/0x590 fs/ext4/ext4_jbd2.c:81 ext4_sample_last_mounted fs/ext4/file.c:414 [inline] ext4_file_open+0x552/0x7b0 fs/ext4/file.c:439 loop5: rw=1, want=117, limit=112 do_dentry_open+0x499/0x1250 fs/open.c:771 vfs_open+0xa0/0xd0 fs/open.c:880 do_last fs/namei.c:3418 [inline] path_openat+0x130f/0x5340 fs/namei.c:3534 do_filp_open+0x255/0x380 fs/namei.c:3564 Buffer I/O error on dev loop5, logical block 116, lost async page write do_open_execat+0x221/0x8e0 fs/exec.c:853 __do_execve_file.isra.35+0x1707/0x2460 fs/exec.c:1755 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 attempt to access beyond end of device entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (sb_internal){.+.+}: lock_acquire+0x1e4/0x4f0 kernel/locking/lockdep.c:3901 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x1e9/0x300 fs/super.c:1387 sb_start_intwrite include/linux/fs.h:1613 [inline] ext4_evict_inode+0x588/0x19b0 fs/ext4/inode.c:250 evict+0x4ae/0x990 fs/inode.c:558 iput_final fs/inode.c:1547 [inline] iput+0x5fa/0xa00 fs/inode.c:1573 loop5: rw=1, want=130, limit=112 inode_lru_isolate+0x386/0x580 fs/inode.c:754 __list_lru_walk_one+0x28a/0x8b0 mm/list_lru.c:234 list_lru_walk_one+0xa5/0xe0 mm/list_lru.c:278 list_lru_shrink_walk include/linux/list_lru.h:194 [inline] prune_icache_sb+0x124/0x1c0 fs/inode.c:779 Buffer I/O error on dev loop5, logical block 129, lost async page write super_cache_scan+0x2bf/0x480 fs/super.c:104 do_shrink_slab+0x4ba/0xbb0 mm/vmscan.c:536 shrink_slab_memcg mm/vmscan.c:601 [inline] shrink_slab+0x6fe/0x8c0 mm/vmscan.c:674 shrink_node+0x429/0x16a0 mm/vmscan.c:2735 shrink_zones mm/vmscan.c:2964 [inline] do_try_to_free_pages+0x3e7/0x1290 mm/vmscan.c:3026 try_to_free_pages+0x4b2/0xa60 mm/vmscan.c:3241 __perform_reclaim mm/page_alloc.c:3769 [inline] __alloc_pages_direct_reclaim mm/page_alloc.c:3790 [inline] __alloc_pages_slowpath+0x95a/0x2cb0 mm/page_alloc.c:4191 __alloc_pages_nodemask+0xa1b/0xd10 mm/page_alloc.c:4390 alloc_pages_current+0x10c/0x210 mm/mempolicy.c:2093 alloc_pages include/linux/gfp.h:509 [inline] __page_cache_alloc+0x398/0x5e0 mm/filemap.c:946 pagecache_get_page+0x3a1/0xe40 mm/filemap.c:1577 grab_cache_page_write_begin+0x75/0xa0 mm/filemap.c:3089 block_write_begin+0xae/0x370 fs/buffer.c:2071 cont_write_begin+0x567/0x860 fs/buffer.c:2428 fat_write_begin+0x8d/0x120 fs/fat/inode.c:229 pagecache_write_begin+0x88/0xc0 mm/filemap.c:2983 cont_expand_zero fs/buffer.c:2355 [inline] cont_write_begin+0x22b/0x860 fs/buffer.c:2418 fat_write_begin+0x8d/0x120 fs/fat/inode.c:229 pagecache_write_begin+0x88/0xc0 mm/filemap.c:2983 generic_cont_expand_simple+0x134/0x1f0 fs/buffer.c:2319 fat_cont_expand+0x71/0x2b0 fs/fat/file.c:226 fat_setattr+0xa37/0xc90 fs/fat/file.c:505 notify_change+0xbde/0x1110 fs/attr.c:334 do_truncate+0x1ac/0x2b0 fs/open.c:63 vfs_truncate+0x60e/0x840 fs/open.c:109 do_sys_truncate+0x156/0x190 fs/open.c:132 __do_sys_truncate fs/open.c:144 [inline] __se_sys_truncate fs/open.c:142 [inline] __x64_sys_truncate+0x54/0x80 fs/open.c:142 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: sb_internal --> &isp->smk_lock --> fs_reclaim Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&isp->smk_lock); lock(fs_reclaim); lock(sb_internal); *** DEADLOCK *** 5 locks held by syz-executor5/31509: #0: 0000000022c11dcb (sb_writers#18){.+.+}, at: sb_start_write include/linux/fs.h:1566 [inline] #0: 0000000022c11dcb (sb_writers#18){.+.+}, at: mnt_want_write+0x3f/0xc0 fs/namespace.c:360 #1: 00000000a08c8c36 (&sb->s_type->i_mutex_key#25){++++}, at: inode_lock include/linux/fs.h:738 [inline] #1: 00000000a08c8c36 (&sb->s_type->i_mutex_key#25){++++}, at: do_truncate+0x19f/0x2b0 fs/open.c:61 #2: 00000000d9db5c55 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.98+0x0/0x30 mm/page_alloc.c:463 #3: 00000000156721da (shrinker_rwsem){++++}, at: shrink_slab_memcg mm/vmscan.c:578 [inline] #3: 00000000156721da (shrinker_rwsem){++++}, at: shrink_slab+0x1d1/0x8c0 mm/vmscan.c:674 #4: 00000000177c757b (&type->s_umount_key#28){++++}, at: trylock_super+0x22/0x110 fs/super.c:412 stack backtrace: CPU: 0 PID: 31509 Comm: syz-executor5 Not tainted 4.19.0-rc2+ #1 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+0x1c9/0x2b4 lib/dump_stack.c:113 print_circular_bug.isra.34.cold.55+0x1bd/0x27d kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1862 [inline] check_prevs_add kernel/locking/lockdep.c:1975 [inline] validate_chain kernel/locking/lockdep.c:2416 [inline] __lock_acquire+0x3449/0x5020 kernel/locking/lockdep.c:3412 lock_acquire+0x1e4/0x4f0 kernel/locking/lockdep.c:3901 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x1e9/0x300 fs/super.c:1387 sb_start_intwrite include/linux/fs.h:1613 [inline] ext4_evict_inode+0x588/0x19b0 fs/ext4/inode.c:250 evict+0x4ae/0x990 fs/inode.c:558 iput_final fs/inode.c:1547 [inline] iput+0x5fa/0xa00 fs/inode.c:1573 inode_lru_isolate+0x386/0x580 fs/inode.c:754 __list_lru_walk_one+0x28a/0x8b0 mm/list_lru.c:234 list_lru_walk_one+0xa5/0xe0 mm/list_lru.c:278 list_lru_shrink_walk include/linux/list_lru.h:194 [inline] prune_icache_sb+0x124/0x1c0 fs/inode.c:779 super_cache_scan+0x2bf/0x480 fs/super.c:104 do_shrink_slab+0x4ba/0xbb0 mm/vmscan.c:536 shrink_slab_memcg mm/vmscan.c:601 [inline] shrink_slab+0x6fe/0x8c0 mm/vmscan.c:674 shrink_node+0x429/0x16a0 mm/vmscan.c:2735 shrink_zones mm/vmscan.c:2964 [inline] do_try_to_free_pages+0x3e7/0x1290 mm/vmscan.c:3026 try_to_free_pages+0x4b2/0xa60 mm/vmscan.c:3241 __perform_reclaim mm/page_alloc.c:3769 [inline] __alloc_pages_direct_reclaim mm/page_alloc.c:3790 [inline] __alloc_pages_slowpath+0x95a/0x2cb0 mm/page_alloc.c:4191 __alloc_pages_nodemask+0xa1b/0xd10 mm/page_alloc.c:4390 alloc_pages_current+0x10c/0x210 mm/mempolicy.c:2093 alloc_pages include/linux/gfp.h:509 [inline] __page_cache_alloc+0x398/0x5e0 mm/filemap.c:946 pagecache_get_page+0x3a1/0xe40 mm/filemap.c:1577 grab_cache_page_write_begin+0x75/0xa0 mm/filemap.c:3089 block_write_begin+0xae/0x370 fs/buffer.c:2071 cont_write_begin+0x567/0x860 fs/buffer.c:2428 fat_write_begin+0x8d/0x120 fs/fat/inode.c:229 pagecache_write_begin+0x88/0xc0 mm/filemap.c:2983 cont_expand_zero fs/buffer.c:2355 [inline] cont_write_begin+0x22b/0x860 fs/buffer.c:2418 fat_write_begin+0x8d/0x120 fs/fat/inode.c:229 pagecache_write_begin+0x88/0xc0 mm/filemap.c:2983 generic_cont_expand_simple+0x134/0x1f0 fs/buffer.c:2319 fat_cont_expand+0x71/0x2b0 fs/fat/file.c:226 fat_setattr+0xa37/0xc90 fs/fat/file.c:505 notify_change+0xbde/0x1110 fs/attr.c:334 do_truncate+0x1ac/0x2b0 fs/open.c:63 vfs_truncate+0x60e/0x840 fs/open.c:109 do_sys_truncate+0x156/0x190 fs/open.c:132 __do_sys_truncate fs/open.c:144 [inline] __se_sys_truncate fs/open.c:142 [inline] __x64_sys_truncate+0x54/0x80 fs/open.c:142 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457099 Code: fd b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 cb b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fdb80436c78 EFLAGS: 00000246 ORIG_RAX: 000000000000004c RAX: ffffffffffffffda RBX: 00007fdb804376d4 RCX: 0000000000457099 RDX: 0000000000000000 RSI: 0000000000100007 RDI: 00000000200008c0 RBP: 00000000009301e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004d7848 R14: 00000000004c37cc R15: 0000000000000002 attempt to access beyond end of device loop5: rw=1, want=131, limit=112 Buffer I/O error on dev loop5, logical block 130, lost async page write attempt to access beyond end of device loop5: rw=1, want=132, limit=112 Buffer I/O error on dev loop5, logical block 131, lost async page write attempt to access beyond end of device loop5: rw=1, want=142, limit=112 Buffer I/O error on dev loop5, logical block 141, lost async page write attempt to access beyond end of device loop5: rw=1, want=133, limit=112 Buffer I/O error on dev loop5, logical block 132, lost async page write attempt to access beyond end of device loop5: rw=1, want=143, limit=112 Buffer I/O error on dev loop5, logical block 142, lost async page write attempt to access beyond end of device loop5: rw=1, want=1181, limit=112 attempt to access beyond end of device loop5: rw=1, want=1293, limit=112 attempt to access beyond end of device loop5: rw=1, want=144, limit=112 attempt to access beyond end of device loop5: rw=1, want=1389, limit=112 attempt to access beyond end of device loop5: rw=1, want=145, limit=112 attempt to access beyond end of device loop5: rw=1, want=1509, limit=112 openvswitch: netlink: Message has 16 unknown bytes. attempt to access beyond end of device loop5: rw=1, want=146, limit=112 attempt to access beyond end of device loop5: rw=1, want=1677, limit=112 openvswitch: netlink: Message has 16 unknown bytes. attempt to access beyond end of device loop5: rw=1, want=147, limit=112 attempt to access beyond end of device loop5: rw=1, want=2045, limit=112 attempt to access beyond end of device loop5: rw=1, want=148, limit=112 attempt to access beyond end of device loop5: rw=1, want=149, limit=112 attempt to access beyond end of device loop5: rw=1, want=2173, limit=112 FAT-fs (loop5): error, invalid access to FAT (entry 0x0000641a) FAT-fs (loop5): Filesystem has been set read-only FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) FAT-fs (loop6): Filesystem has been set read-only FAT-fs (loop6): error, fat_free_clusters: deleting FAT entry beyond EOF FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) openvswitch: netlink: Key type 2575 is out of range max 29 openvswitch: netlink: Key type 2575 is out of range max 29 openvswitch: netlink: Key type 2575 is out of range max 29 openvswitch: netlink: Key type 2575 is out of range max 29 FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) FAT-fs (loop6): Filesystem has been set read-only FAT-fs (loop6): error, fat_free_clusters: deleting FAT entry beyond EOF FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) openvswitch: netlink: Key type 2575 is out of range max 29 openvswitch: netlink: Key type 2575 is out of range max 29 FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) FAT-fs (loop6): Filesystem has been set read-only FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) FAT-fs (loop6): error, invalid access to FAT (entry 0x000008a2) netlink: 168 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 168 bytes leftover after parsing attributes in process `syz-executor1'.