audit: type=1400 audit(1573508183.002:896): avc: denied { create } for pid=19214 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 ================================= [ INFO: inconsistent lock state ] 4.4.174+ #4 Not tainted --------------------------------- inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage. kswapd0/28 [HC0[0]:SC0[0]:HE1:SE1] takes: (&sb->s_type->i_mutex_key#10){+.+.?.}, at: [] shmem_fallocate+0x13b/0x9c0 mm/shmem.c:2078 {RECLAIM_FS-ON-W} state was registered at: [] mark_held_locks+0xb1/0x100 kernel/locking/lockdep.c:2536 [] __lockdep_trace_alloc kernel/locking/lockdep.c:2758 [inline] [] lockdep_trace_alloc+0x18c/0x2b0 kernel/locking/lockdep.c:2773 [] __alloc_pages_nodemask+0x13a/0x14b0 mm/page_alloc.c:3266 [] __alloc_pages include/linux/gfp.h:415 [inline] [] __alloc_pages_node include/linux/gfp.h:428 [inline] [] alloc_pages_node include/linux/gfp.h:442 [inline] [] shmem_alloc_page mm/shmem.c:953 [inline] [] shmem_getpage_gfp+0x6a3/0x1120 mm/shmem.c:1191 [] shmem_getpage mm/shmem.c:130 [inline] [] shmem_write_begin+0xeb/0x190 mm/shmem.c:1509 [] generic_perform_write+0x281/0x540 mm/filemap.c:2591 [] __generic_file_write_iter+0x350/0x540 mm/filemap.c:2716 [] generic_file_write_iter+0x3aa/0x740 mm/filemap.c:2744 [] new_sync_write fs/read_write.c:480 [inline] [] __vfs_write+0x2e8/0x3d0 fs/read_write.c:493 [] vfs_write+0x182/0x4e0 fs/read_write.c:540 [] SYSC_write fs/read_write.c:587 [inline] [] SyS_write+0xdc/0x1c0 fs/read_write.c:579 [] entry_SYSCALL_64_fastpath+0x1e/0x9a irq event stamp: 156677 hardirqs last enabled at (156677): [] __mutex_trylock_slowpath kernel/locking/mutex.c:885 [inline] hardirqs last enabled at (156677): [] mutex_trylock+0x28d/0x500 kernel/locking/mutex.c:908 hardirqs last disabled at (156676): [] __mutex_trylock_slowpath kernel/locking/mutex.c:873 [inline] hardirqs last disabled at (156676): [] mutex_trylock+0xaf/0x500 kernel/locking/mutex.c:908 softirqs last enabled at (155248): [] __do_softirq+0x4da/0xa3f kernel/softirq.c:299 softirqs last disabled at (155245): [] invoke_softirq kernel/softirq.c:350 [inline] softirqs last disabled at (155245): [] irq_exit+0x10a/0x150 kernel/softirq.c:391 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sb->s_type->i_mutex_key#10); lock(&sb->s_type->i_mutex_key#10); *** DEADLOCK *** 2 locks held by kswapd0/28: #0: (shrinker_rwsem){++++..}, at: [] shrink_slab.part.0+0xb2/0xb30 mm/vmscan.c:431 #1: (ashmem_mutex){+.+.+.}, at: [] ashmem_shrink_scan+0x56/0x4c0 drivers/staging/android/ashmem.c:442 stack backtrace: CPU: 1 PID: 28 Comm: kswapd0 Not tainted 4.4.174+ #4 0000000000000000 3b57279cadc077b4 ffff8800bba6f290 ffffffff81aad1a1 00000000000000f0 ffff8800bba60000 ffffffff83abf7d0 ffffffff84057a80 ffff8800bba60938 ffff8800bba6f308 ffffffff813ad456 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_usage_bug.cold+0x454/0x592 kernel/locking/lockdep.c:2267 [] valid_state kernel/locking/lockdep.c:2280 [inline] [] mark_lock_irq kernel/locking/lockdep.c:2478 [inline] [] mark_lock+0x6fd/0x1440 kernel/locking/lockdep.c:2933 [] mark_irqflags kernel/locking/lockdep.c:2834 [inline] [] __lock_acquire+0xa27/0x4f50 kernel/locking/lockdep.c:3169 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] shmem_fallocate+0x13b/0x9c0 mm/shmem.c:2078 [] ashmem_shrink_scan drivers/staging/android/ashmem.c:449 [inline] [] ashmem_shrink_scan+0x1c3/0x4c0 drivers/staging/android/ashmem.c:433 [] do_shrink_slab mm/vmscan.c:357 [inline] [] shrink_slab.part.0+0x402/0xb30 mm/vmscan.c:455 [] shrink_slab mm/vmscan.c:425 [inline] [] shrink_zone+0x4bc/0x610 mm/vmscan.c:2448 [] kswapd_shrink_zone mm/vmscan.c:3123 [inline] [] balance_pgdat mm/vmscan.c:3298 [inline] [] kswapd+0xaaf/0x1c60 mm/vmscan.c:3506 [] kthread+0x273/0x310 kernel/kthread.c:211 [] ret_from_fork+0x55/0x80 arch/x86/entry/entry_64.S:537 lowmemorykiller: Killing 'syz-executor.1' (18936) (tgid 18936), adj 1000, to free 52516kB on behalf of 'kswapd0' (28) because cache 53920kB is below limit 65536kB for oom_score_adj 12 Free memory is -920kB above reserved lowmemorykiller: Killing 'syz-executor.2' (10822) (tgid 10822), adj 1000, to free 52512kB on behalf of 'kswapd0' (28) because cache 65120kB is below limit 65536kB for oom_score_adj 12 Free memory is 1360kB above reserved lowmemorykiller: Killing 'syz-executor.2' (13062) (tgid 13062), adj 1000, to free 52512kB on behalf of 'kswapd0' (28) because cache 65120kB is below limit 65536kB for oom_score_adj 12 Free memory is 16920kB above reserved lowmemorykiller: Killing 'syz-executor.2' (13754) (tgid 13754), adj 1000, to free 52512kB on behalf of 'kswapd0' (28) because cache 65124kB is below limit 65536kB for oom_score_adj 12 Free memory is 23128kB above reserved lowmemorykiller: Killing 'syz-executor.2' (14927) (tgid 14927), adj 1000, to free 52512kB on behalf of 'kswapd0' (28) because cache 65124kB is below limit 65536kB for oom_score_adj 12 Free memory is 38504kB above reserved lowmemorykiller: Killing 'syz-executor.2' (16608) (tgid 16608), adj 1000, to free 52512kB on behalf of 'kswapd0' (28) because cache 65124kB is below limit 65536kB for oom_score_adj 12 Free memory is 52532kB above reserved audit_printk_skb: 24 callbacks suppressed audit: type=1400 audit(1573508185.802:905): avc: denied { create } for pid=19331 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508186.042:906): avc: denied { create } for pid=19344 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508186.172:907): avc: denied { create } for pid=19355 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508186.322:908): avc: denied { create } for pid=19362 comm="syz-executor.2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 lowmemorykiller: Killing 'syz-executor.2' (16707) (tgid 16707), adj 1000, to free 52512kB on behalf of 'kswapd0' (28) because cache 65128kB is below limit 65536kB for oom_score_adj 12 Free memory is 1348kB above reserved lowmemorykiller: Killing 'syz-executor.4' (11483) (tgid 11483), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65132kB is below limit 65536kB for oom_score_adj 12 Free memory is 10960kB above reserved lowmemorykiller: Killing 'syz-executor.4' (11671) (tgid 11671), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65132kB is below limit 65536kB for oom_score_adj 12 Free memory is 25840kB above reserved lowmemorykiller: Killing 'syz-executor.4' (12203) (tgid 12203), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65132kB is below limit 65536kB for oom_score_adj 12 Free memory is 42224kB above reserved lowmemorykiller: Killing 'syz-executor.4' (12295) (tgid 12295), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65132kB is below limit 65536kB for oom_score_adj 12 Free memory is 58204kB above reserved audit: type=1400 audit(1573508186.812:909): avc: denied { create } for pid=19384 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508186.902:910): avc: denied { create } for pid=19398 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508187.032:911): avc: denied { create } for pid=19408 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508187.152:912): avc: denied { create } for pid=19417 comm="syz-executor.2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508187.452:913): avc: denied { create } for pid=19438 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508187.682:914): avc: denied { create } for pid=19449 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 lowmemorykiller: Killing 'syz-executor.4' (12336) (tgid 12336), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65140kB is below limit 65536kB for oom_score_adj 12 Free memory is 1460kB above reserved lowmemorykiller: Killing 'syz-executor.4' (12688) (tgid 12688), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65140kB is below limit 65536kB for oom_score_adj 12 Free memory is 17580kB above reserved lowmemorykiller: Killing 'syz-executor.4' (12794) (tgid 12794), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65140kB is below limit 65536kB for oom_score_adj 12 Free memory is 27220kB above reserved lowmemorykiller: Killing 'syz-executor.4' (12842) (tgid 12842), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65144kB is below limit 65536kB for oom_score_adj 12 Free memory is 41480kB above reserved lowmemorykiller: Killing 'syz-executor.4' (13458) (tgid 13458), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65148kB is below limit 65536kB for oom_score_adj 12 Free memory is 57352kB above reserved lowmemorykiller: Killing 'syz-executor.4' (13621) (tgid 13621), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65148kB is below limit 65536kB for oom_score_adj 12 Free memory is 1484kB above reserved lowmemorykiller: Killing 'syz-executor.2' (14071) (tgid 14071), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65148kB is below limit 65536kB for oom_score_adj 12 Free memory is 17476kB above reserved lowmemorykiller: Killing 'syz-executor.4' (14620) (tgid 14620), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65148kB is below limit 65536kB for oom_score_adj 12 Free memory is 31984kB above reserved lowmemorykiller: Killing 'syz-executor.4' (14656) (tgid 14656), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65148kB is below limit 65536kB for oom_score_adj 12 Free memory is 45408kB above reserved lowmemorykiller: Killing 'syz-executor.4' (16753) (tgid 16753), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65148kB is below limit 65536kB for oom_score_adj 12 Free memory is 55008kB above reserved lowmemorykiller: Killing 'syz-executor.1' (16919) (tgid 16919), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65156kB is below limit 65536kB for oom_score_adj 12 Free memory is 1296kB above reserved lowmemorykiller: Killing 'syz-executor.2' (19290) (tgid 19290), adj 1000, to free 52508kB on behalf of 'kswapd0' (28) because cache 65156kB is below limit 65536kB for oom_score_adj 12 Free memory is 12828kB above reserved lowmemorykiller: Killing 'syz-executor.5' (10847) (tgid 10847), adj 1000, to free 52504kB on behalf of 'kswapd0' (28) because cache 65156kB is below limit 65536kB for oom_score_adj 12 Free memory is 19252kB above reserved lowmemorykiller: Killing 'syz-executor.5' (10862) (tgid 10862), adj 1000, to free 52504kB on behalf of 'kswapd0' (28) because cache 65160kB is below limit 65536kB for oom_score_adj 12 Free memory is 35552kB above reserved lowmemorykiller: Killing 'syz-executor.4' (11440) (tgid 11440), adj 1000, to free 52504kB on behalf of 'kswapd0' (28) because cache 65160kB is below limit 65536kB for oom_score_adj 12 Free memory is 52120kB above reserved audit_printk_skb: 48 callbacks suppressed audit: type=1400 audit(1573508191.572:931): avc: denied { create } for pid=19695 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508191.872:932): avc: denied { create } for pid=19713 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 audit: type=1400 audit(1573508192.382:933): avc: denied { create } for pid=19752 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0 lowmemorykiller: Killing 'syz-executor.4' (11712) (tgid 11712), adj 1000, to free 52504kB on behalf of 'kswapd0' (28) because cache 65164kB is below limit 65536kB for oom_score_adj 12 Free memory is 1416kB above reserved lowmemorykiller: Killing 'syz-executor.4' (11749) (tgid 11749), adj 1000, to free 52504kB on behalf of 'kswapd0' (28) because cache 65164kB is below limit 65536kB for oom_score_adj 12 Free memory is 17536kB above reserved lowmemorykiller: Killing 'syz-executor.4' (14122) (tgid 14122), adj 1000, to free 52504kB on behalf of 'kswapd0' (28) because cache 65164kB is below limit 65536kB for oom_score_adj 12 Free memory is 33068kB above reserved lowmemorykiller: Killing 'syz-executor.4' (15415) (tgid 15415), adj 1000, to free 52504kB on behalf of 'kswapd0' (28) because cache 65164kB is below limit 65536kB for oom_score_adj 12 Free memory is 48816kB above reserved audit: type=1400 audit(1573508192.722:934): avc: denied { create } for pid=19763 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=0