syzbot


BUG: using __this_cpu_read() in preemptible code in __vmalloc_node_range (4)

Status: closed as invalid on 2018/02/17 08:58
First crash: 2253d, last: 2253d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 BUG: using __this_cpu_read() in preemptible code in __vmalloc_node_range 17 2201d 2239d 0/2 auto-closed as invalid on 2019/02/22 13:09
android-49 BUG: using __this_cpu_read() in preemptible code in __vmalloc_node_range (6) 33 2204d 2248d 0/3 auto-closed as invalid on 2019/02/22 13:39
android-49 BUG: using __this_cpu_read() in preemptible code in __vmalloc_node_range 3 2258d 2259d 0/3 closed as invalid on 2018/02/12 10:58
android-49 BUG: using __this_cpu_read() in preemptible code in __vmalloc_node_range (2) 1 2256d 2256d 0/3 closed as invalid on 2018/02/14 08:58
android-49 BUG: using __this_cpu_read() in preemptible code in __vmalloc_node_range (5) 1 2250d 2249d 0/3 closed as invalid on 2018/02/20 14:58
android-49 BUG: using __this_cpu_read() in preemptible code in __vmalloc_node_range (3) 1 2255d 2255d 0/3 closed as invalid on 2018/02/15 07:58

Sample crash report:
syz-executor0: vmalloc: allocation failure: 17179344896 bytes, mode:0x24000c2(GFP_KERNEL|__GFP_HIGHMEM)
CPU: 1 PID: 5925 Comm: syz-executor0 Not tainted 4.9.81-ga25ea24 #36
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
BUG: using __this_cpu_read() in preemptible [00000000] code: syz-executor3/5930
caller is __this_cpu_preempt_check+0x1c/0x20 lib/smp_processor_id.c:62
 ffff8801d929f828 ffffffff81d94de9 1ffff1003b253f08 ffff8801b7e9c800
 ffffffff83ab9320 0000000000000001 0000000000400000 ffff8801d929f938
 ffffffff81451d82 024000c200000003 0000000041b58ab3 ffffffff8419579d
Call Trace:
 [<ffffffff81d94de9>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d94de9>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff81451d82>] warn_alloc+0x212/0x240 mm/page_alloc.c:3056
 [<ffffffff814ffd55>] __vmalloc_node_range+0x3f5/0x5f0 mm/vmalloc.c:1722
 [<ffffffff8150001b>] __vmalloc_node mm/vmalloc.c:1744 [inline]
 [<ffffffff8150001b>] __vmalloc_node_flags mm/vmalloc.c:1758 [inline]
 [<ffffffff8150001b>] vmalloc+0x5b/0x70 mm/vmalloc.c:1773
 [<ffffffff831412e1>] xt_alloc_entry_offsets+0x41/0x60 net/netfilter/x_tables.c:722
 [<ffffffff835203aa>] translate_table+0x21a/0x1e80 net/ipv6/netfilter/ip6_tables.c:730
 [<ffffffff810002b8>] ? 0xffffffff810002b8
 [<ffffffff8352428e>] do_replace net/ipv6/netfilter/ip6_tables.c:1182 [inline]
 [<ffffffff8352428e>] do_ip6t_set_ctl+0x2be/0x470 net/ipv6/netfilter/ip6_tables.c:1708
 [<ffffffff830a1e57>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline]
 [<ffffffff830a1e57>] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:114
 [<ffffffff8347ba25>] ipv6_setsockopt+0x115/0x150 net/ipv6/ipv6_sockglue.c:912
 [<ffffffff83231c72>] tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2755
 [<ffffffff82ede295>] sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2706
 [<ffffffff82edb250>] SYSC_setsockopt net/socket.c:1772 [inline]
 [<ffffffff82edb250>] SyS_setsockopt+0x160/0x250 net/socket.c:1751
 [<ffffffff81006505>] do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282
 [<ffffffff838b3e7d>] entry_SYSCALL_64_after_swapgs+0x47/0xc5
CPU: 0 PID: 5930 Comm: syz-executor3 Not tainted 4.9.81-ga25ea24 #36
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff8801b7daf678 ffffffff81d94de9 0000000000000000 ffffffff83c18e00
 ffffffff83f45ae0 ffff8801babd4800 0000000000000003 ffff8801b7daf6b8[   37.063181] Mem-Info:
active_anon:56388 inactive_anon:44 isolated_anon:0
 active_file:3497 inactive_file:8293 isolated_file:0
 unevictable:0 dirty:143 writeback:0 unstable:0
 slab_reclaimable:5515 slab_unreclaimable:60216
 mapped:24058 shmem:51 pagetables:681 bounce:0
 free:1472816 free_pcp:471 free_cma:0
Node 0 active_anon:225552kB inactive_anon:176kB active_file:13988kB inactive_file:33172kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:96232kB dirty:572kB writeback:0kB shmem:204kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 69632kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? no
DMA free:15908kB min:160kB low:200kB high:240kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
 0 2908 6410 6410DMA32 free:2979952kB min:30592kB low:38240kB high:45888kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129292kB managed:2980720kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:768kB local_pcp:720kB free_cma:0kB
 0 0 3501 3501Normal free:2895404kB min:36824kB low:46028kB high:55232kB active_anon:225552kB inactive_anon:176kB active_file:13988kB inactive_file:33172kB unevictable:0kB writepending:572kB present:4718592kB managed:3585212kB mlocked:0kB slab_reclaimable:22060kB slab_unreclaimable:240864kB kernel_stack:5696kB pagetables:2724kB bounce:0kB free_pcp:1116kB local_pcp:660kB free_cma:0kB
 0 0 0 0DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15908kB
Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
11840 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
1965969 pages RAM
0 pages HighMem/MovableOnly
320509 pages reserved
syz-executor0: 
vmalloc: allocation failure: 17179344896 bytes, mode:0x24000c2(GFP_KERNEL|__GFP_HIGHMEM)
 ffffffff81dfc3e4 ffff8801b7daf6d0 ffffffff83f45ae0 dffffc0000000000
Call Trace:
 [<ffffffff81d94de9>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d94de9>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff81dfc3e4>] check_preemption_disabled+0x1d4/0x200 lib/smp_processor_id.c:46
 [<ffffffff81dfc44c>] __this_cpu_preempt_check+0x1c/0x20 lib/smp_processor_id.c:62
 [<ffffffff833fd308>] ipcomp_alloc_tfms net/xfrm/xfrm_ipcomp.c:286 [inline]
 [<ffffffff833fd308>] ipcomp_init_state+0x188/0x930 net/xfrm/xfrm_ipcomp.c:363
 [<ffffffff83369710>] ipcomp4_init_state+0xb0/0x7d0 net/ipv4/ipcomp.c:137
 [<ffffffff833db9e7>] __xfrm_init_state+0x3e7/0xb30 net/xfrm/xfrm_state.c:2096
 [<ffffffff833dc14a>] xfrm_init_state+0x1a/0x20 net/xfrm/xfrm_state.c:2122
 [<ffffffff83576599>] pfkey_msg2xfrm_state net/key/af_key.c:1289 [inline]
 [<ffffffff83576599>] pfkey_add+0x1fb9/0x3470 net/key/af_key.c:1506
 [<ffffffff8356e08b>] pfkey_process+0x68b/0x750 net/key/af_key.c:2834
 [<ffffffff8356f8e9>] pfkey_sendmsg+0x3a9/0x760 net/key/af_key.c:3678
 [<ffffffff82ed7baa>] sock_sendmsg_nosec net/socket.c:635 [inline]
 [<ffffffff82ed7baa>] sock_sendmsg+0xca/0x110 net/socket.c:645
 [<ffffffff82ed97c1>] ___sys_sendmsg+0x6d1/0x7e0 net/socket.c:1969
 [<ffffffff82edb7f6>] __sys_sendmsg+0xd6/0x190 net/socket.c:2003
 [<ffffffff82edb8dd>] SYSC_sendmsg net/socket.c:2014 [inline]
 [<ffffffff82edb8dd>] SyS_sendmsg+0x2d/0x50 net/socket.c:2010
 [<ffffffff81006505>] do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282
 [<ffffffff838b3e7d>] entry_SYSCALL_64_after_swapgs+0x47/0xc5
CPU: 1 PID: 5938 Comm: syz-executor0 Not tainted 4.9.81-ga25ea24 #36
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff8801c169f828 ffffffff81d94de9 1ffff100382d3f08 ffff8801c15a1800
 ffffffff83ab9320 0000000000000001 0000000000400000 ffff8801c169f938
 ffffffff81451d82 024000c200000003 0000000041b58ab3 ffffffff8419579d
Call Trace:
 [<ffffffff81d94de9>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d94de9>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff81451d82>] warn_alloc+0x212/0x240 mm/page_alloc.c:3056
 [<ffffffff814ffd55>] __vmalloc_node_range+0x3f5/0x5f0 mm/vmalloc.c:1722
 [<ffffffff8150001b>] __vmalloc_node mm/vmalloc.c:1744 [inline]
 [<ffffffff8150001b>] __vmalloc_node_flags mm/vmalloc.c:1758 [inline]
 [<ffffffff8150001b>] vmalloc+0x5b/0x70 mm/vmalloc.c:1773
 [<ffffffff831412e1>] xt_alloc_entry_offsets+0x41/0x60 net/netfilter/x_tables.c:722
 [<ffffffff835203aa>] translate_table+0x21a/0x1e80 net/ipv6/netfilter/ip6_tables.c:730
 [<ffffffff810002b8>] ? 0xffffffff810002b8
 [<ffffffff8352428e>] do_replace net/ipv6/netfilter/ip6_tables.c:1182 [inline]
 [<ffffffff8352428e>] do_ip6t_set_ctl+0x2be/0x470 net/ipv6/netfilter/ip6_tables.c:1708
 [<ffffffff830a1e57>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline]
 [<ffffffff830a1e57>] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:114
 [<ffffffff8347ba25>] ipv6_setsockopt+0x115/0x150 net/ipv6/ipv6_sockglue.c:912
 [<ffffffff83231c72>] tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2755
 [<ffffffff82ede295>] sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2706
 [<ffffffff82edb250>] SYSC_setsockopt net/socket.c:1772 [inline]
 [<ffffffff82edb250>] SyS_setsockopt+0x160/0x250 net/socket.c:1751
 [<ffffffff81006505>] do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282
 [<ffffffff838b3e7d>] entry_SYSCALL_64_after_swapgs+0x47/0xc5
Mem-Info:
active_anon:51207 inactive_anon:44 isolated_anon:0
 active_file:3497 inactive_file:8298 isolated_file:0
 unevictable:0 dirty:157 writeback:0 unstable:0
 slab_reclaimable:5527 slab_unreclaimable:60247
 mapped:24046 shmem:51 pagetables:622 bounce:0
 free:1478021 free_pcp:525 free_cma:0
Node 0 active_anon:204828kB inactive_anon:176kB active_file:13988kB inactive_file:33192kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:96184kB dirty:628kB writeback:0kB shmem:204kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 75776kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? no
DMA free:15908kB min:160kB low:200kB high:240kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
lowmem_reserve[]: 0 2908 6410 6410
DMA32 free:2979952kB min:30592kB low:38240kB high:45888kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129292kB managed:2980720kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:768kB local_pcp:720kB free_cma:0kB
lowmem_reserve[]: 0 0 3501 3501
Normal free:2918036kB min:36824kB low:46028kB high:55232kB active_anon:204828kB inactive_anon:176kB active_file:13988kB inactive_file:33192kB unevictable:0kB writepending:632kB present:4718592kB managed:3585212kB mlocked:0kB slab_reclaimable:22028kB slab_unreclaimable:239724kB kernel_stack:5440kB pagetables:2488kB bounce:0kB free_pcp:1396kB local_pcp:728kB free_cma:0kB
lowmem_reserve[]: 0 0 0 0
DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15908kB
DMA32: 2*4kB (M) 3*8kB (M) 1*16kB (M) 2*32kB (M) 2*64kB (M) 3*128kB (M) 2*256kB (M) 4*512kB (M) 1*1024kB (M) 1*2048kB (M) 726*4096kB (M) = 2979952kB
Normal: 1565*4kB (UME) 174*8kB (UM) 59*16kB (UME) 74*32kB (UME) 16*64kB (UME) 26*128kB (UME) 5*256kB (ME) 5*512kB (UME) 27*1024kB (UME) 4*2048kB (ME) 699*4096kB (M) = 2918100kB
Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
11855 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 0kB
Total swap = 0kB
1965969 pages RAM
0 pages HighMem/MovableOnly
320509 pages reserved
audit: type=1400 audit(1518839911.276:25): avc:  denied  { setgid } for  pid=5945 comm="syz-executor3" capability=6  scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1
audit: type=1400 audit(1518839911.306:26): avc:  denied  { create } for  pid=5943 comm="syz-executor5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_crypto_socket permissive=1
binder: 5982:5986 transaction failed 29189/-22, size 0-0 line 3004
binder: undelivered TRANSACTION_ERROR: 29189
sock: process `syz-executor0' is using obsolete setsockopt SO_BSDCOMPAT
binder: 6118:6119 ioctl c0306201 20007fd0 returned -11
audit: type=1400 audit(1518839912.006:27): avc:  denied  { call } for  pid=6118 comm="syz-executor5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=binder permissive=1
binder: BINDER_SET_CONTEXT_MGR already set
binder: 6118:6134 ioctl 40046207 0 returned -16
binder: 6118:6119 ioctl c0306201 20007fd0 returned -11
binder_alloc: 6118: binder_alloc_buf, no vma
binder: 6118:6134 transaction failed 29189/-3, size 0-0 line 3127
binder: undelivered TRANSACTION_ERROR: 29189
binder: release 6118:6119 transaction 11 out, still active
binder: undelivered TRANSACTION_COMPLETE
binder: send failed reply for transaction 11, target dead
device gre0 entered promiscuous mode
audit: type=1400 audit(1518839912.366:28): avc:  denied  { setattr } for  pid=6201 comm="syz-executor1" name="NETLINK" dev="sockfs" ino=15464 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1
random: crng init done
binder: 6294:6298 ERROR: BC_REGISTER_LOOPER called without request
binder: 6294:6312 BC_REQUEST_DEATH_NOTIFICATION invalid ref 4
binder: 6294:6312 got reply transaction with no transaction stack
binder: 6294:6312 transaction failed 29201/-71, size 24-8 line 2920
binder: BINDER_SET_CONTEXT_MGR already set
binder: 6294:6312 ioctl 40046207 0 returned -16
binder: 6294:6298 ERROR: BC_REGISTER_LOOPER called without request
binder: 6294:6318 BC_REQUEST_DEATH_NOTIFICATION invalid ref 4
binder: 6294:6298 got reply transaction with no transaction stack
binder: 6294:6298 transaction failed 29201/-71, size 24-8 line 2920
binder: undelivered TRANSACTION_ERROR: 29201
binder: undelivered TRANSACTION_ERROR: 29201
device eql entered promiscuous mode
audit: type=1400 audit(1518839913.086:29): avc:  denied  { read } for  pid=6366 comm="syz-executor7" path="socket:[15356]" dev="sockfs" ino=15356 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=1
SELinux: unrecognized netlink message: protocol=0 nlmsg_type=63310 sclass=netlink_route_socket pig=6478 comm=syz-executor1
binder: 6496:6505 ioctl c0306201 20000fd0 returned -14
binder: BINDER_SET_CONTEXT_MGR already set
binder: 6496:6515 ioctl 40046207 0 returned -16
audit: type=1400 audit(1518839913.666:30): avc:  denied  { getopt } for  pid=6495 comm="syz-executor0" 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=1
audit: type=1400 audit(1518839913.666:31): avc:  denied  { ioctl } for  pid=6495 comm="syz-executor0" path="socket:[16475]" dev="sockfs" ino=16475 ioctlcmd=0x8903 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=1
binder: 6631:6646 got transaction to invalid handle
binder: 6631:6646 transaction failed 29201/-22, size 0-0 line 3004
binder: BINDER_SET_CONTEXT_MGR already set
binder: 6631:6653 ioctl 40046207 0 returned -16
binder: 6631:6653 got transaction to invalid handle
binder: 6631:6653 transaction failed 29201/-22, size 0-0 line 3004

======================================================
[ INFO: possible circular locking dependency detected ]
4.9.81-ga25ea24 #36 Not tainted
-------------------------------------------------------
syz-executor1/6749 is trying to acquire lock:
 (&sb->s_type->i_mutex_key#10){++++++}, at: [<ffffffff8148462f>] inode_lock include/linux/fs.h:746 [inline]
 (&sb->s_type->i_mutex_key#10){++++++}, at: [<ffffffff8148462f>] shmem_file_llseek+0xef/0x240 mm/shmem.c:2403
but task is already holding lock:
 (ashmem_mutex){+.+.+.}, at: [<ffffffff82d497a6>] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:343
which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

       lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756
       __mutex_lock_common kernel/locking/mutex.c:521 [inline]
       mutex_lock_nested+0xbb/0x870 kernel/locking/mutex.c:621
       ashmem_mmap+0x53/0x400 drivers/staging/android/ashmem.c:379
       mmap_region+0x7dd/0xfd0 mm/mmap.c:1694
       do_mmap+0x57b/0xbe0 mm/mmap.c:1473
       do_mmap_pgoff include/linux/mm.h:2019 [inline]
       vm_mmap_pgoff+0x16b/0x1b0 mm/util.c:305
       SYSC_mmap_pgoff mm/mmap.c:1523 [inline]
       SyS_mmap_pgoff+0x33f/0x560 mm/mmap.c:1481
       SYSC_mmap arch/x86/kernel/sys_x86_64.c:95 [inline]
       SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:86
       do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282
       entry_SYSCALL_64_after_swapgs+0x47/0xc5

       lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756
       __might_fault+0x14a/0x1d0 mm/memory.c:3994
       copy_to_user arch/x86/include/asm/uaccess.h:727 [inline]
       filldir+0x1aa/0x340 fs/readdir.c:195
       dir_emit_dot include/linux/fs.h:3203 [inline]
       dir_emit_dots include/linux/fs.h:3214 [inline]
       dcache_readdir+0x12d/0x5e0 fs/libfs.c:191
       iterate_dir+0x4a6/0x5d0 fs/readdir.c:50
       SYSC_getdents fs/readdir.c:230 [inline]
       SyS_getdents+0x14a/0x2a0 fs/readdir.c:211
       do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282
       entry_SYSCALL_64_after_swapgs+0x47/0xc5

       check_prev_add kernel/locking/lockdep.c:1828 [inline]
       check_prevs_add kernel/locking/lockdep.c:1938 [inline]
       validate_chain kernel/locking/lockdep.c:2265 [inline]
       __lock_acquire+0x2bf9/0x3640 kernel/locking/lockdep.c:3345
       lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756
       down_write+0x41/0xa0 kernel/locking/rwsem.c:52
       inode_lock include/linux/fs.h:746 [inline]
       shmem_file_llseek+0xef/0x240 mm/shmem.c:2403
       vfs_llseek+0xa2/0xd0 fs/read_write.c:301
       ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:355
       vfs_llseek fs/read_write.c:301 [inline]
       SYSC_lseek fs/read_write.c:314 [inline]
       SyS_lseek+0xeb/0x170 fs/read_write.c:305
       do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282
       entry_SYSCALL_64_after_swapgs+0x47/0xc5

other info that might help us debug this:

Chain exists of:
 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(ashmem_mutex);
                               lock(&mm->mmap_sem);
                               lock(ashmem_mutex);
  lock(&sb->s_type->i_mutex_key#10);

 *** DEADLOCK ***

1 lock held by syz-executor1/6749:
 #0:  (ashmem_mutex){+.+.+.}, at: [<ffffffff82d497a6>] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:343

stack backtrace:
CPU: 1 PID: 6749 Comm: syz-executor1 Not tainted 4.9.81-ga25ea24 #36
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff8801c68e7b38 ffffffff81d94de9 ffffffff853a3db0 ffffffff853ad080
 ffffffff853c3640 ffff8801d74688d8 ffff8801d7468000 ffff8801c68e7b80
 ffffffff81238741 ffff8801d74688d8 00000000d74688b0 ffff8801d74688d8
Call Trace:
 [<ffffffff81d94de9>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d94de9>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff81238741>] print_circular_bug+0x271/0x310 kernel/locking/lockdep.c:1202
 [<ffffffff8123eb79>] check_prev_add kernel/locking/lockdep.c:1828 [inline]
 [<ffffffff8123eb79>] check_prevs_add kernel/locking/lockdep.c:1938 [inline]
 [<ffffffff8123eb79>] validate_chain kernel/locking/lockdep.c:2265 [inline]
 [<ffffffff8123eb79>] __lock_acquire+0x2bf9/0x3640 kernel/locking/lockdep.c:3345
 [<ffffffff8123fffe>] lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756
 [<ffffffff838ad6b1>] down_write+0x41/0xa0 kernel/locking/rwsem.c:52
 [<ffffffff8148462f>] inode_lock include/linux/fs.h:746 [inline]
 [<ffffffff8148462f>] shmem_file_llseek+0xef/0x240 mm/shmem.c:2403
 [<ffffffff8156bc22>] vfs_llseek+0xa2/0xd0 fs/read_write.c:301
 [<ffffffff82d49837>] ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:355
 [<ffffffff8156f68b>] vfs_llseek fs/read_write.c:301 [inline]
 [<ffffffff8156f68b>] SYSC_lseek fs/read_write.c:314 [inline]
 [<ffffffff8156f68b>] SyS_lseek+0xeb/0x170 fs/read_write.c:305
 [<ffffffff81006505>] do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282
 [<ffffffff838b3e7d>] entry_SYSCALL_64_after_swapgs+0x47/0xc5
SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6797 comm=syz-executor2
SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6797 comm=syz-executor2
Option '                      ' to dns_resolver key: bad/missing value
Option '                      ' to dns_resolver key: bad/missing value
audit: type=1400 audit(1518839915.686:32): avc:  denied  { transfer } for  pid=6846 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=binder permissive=1
netlink: 17 bytes leftover after parsing attributes in process `syz-executor6'.
netlink: 17 bytes leftover after parsing attributes in process `syz-executor6'.
binder: 6846:6860 DecRefs 0 refcount change on invalid ref 0 ret -22
binder: BINDER_SET_CONTEXT_MGR already set
binder: 6846:6860 ioctl 40046207 0 returned -16
binder_alloc: 6846: binder_alloc_buf, no vma
binder: 6846:6850 transaction failed 29189/-3, size 40-8 line 3127
binder: undelivered TRANSACTION_ERROR: 29189
binder: release 6846:6850 transaction 25 out, still active
binder: unexpected work type, 4, not freed
binder: undelivered TRANSACTION_COMPLETE
binder: send failed reply for transaction 25, target dead
binder: 6943:6948 BC_FREE_BUFFER uffffffffffffffff no match
IPVS: Creating netns size=2536 id=9
binder: 6943:6948 BC_DEAD_BINDER_DONE 0000000000000002 not found
binder: 6943:6948 BC_ACQUIRE_DONE uffffffffffffffff no match
binder: release 6943:6956 transaction 30 out, still active
binder: unexpected work type, 4, not freed
binder: undelivered TRANSACTION_COMPLETE
binder: 6943:6956 DecRefs 0 refcount change on invalid ref 0 ret -22
binder: 6943:6948 unknown command 0
binder_alloc: binder_alloc_mmap_handler: 6943 20000000-20002000 already mapped failed -16
binder: 6943:6948 ioctl c0306201 2011f000 returned -22
binder: 6943:6956 got transaction to invalid handle
binder: 6943:6956 transaction failed 29201/-22, size 104-24 line 3004
binder: BINDER_SET_CONTEXT_MGR already set
binder: 6943:6956 ioctl 40046207 0 returned -16
binder: undelivered TRANSACTION_ERROR: 29201
binder: 6943:6956 DecRefs 0 refcount change on invalid ref 0 ret -22
binder: send failed reply for transaction 30, target dead
pktgen: kernel_thread() failed for cpu 0
pktgen: Cannot create thread for cpu 0 (-4)
pktgen: kernel_thread() failed for cpu 1
pktgen: Cannot create thread for cpu 1 (-4)
pktgen: Initialization failed for all threads
IPVS: Creating netns size=2536 id=10
audit: type=1400 audit(1518839916.886:33): avc:  denied  { accept } for  pid=7014 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1
device lo entered promiscuous mode
device lo left promiscuous mode
device lo entered promiscuous mode
PF_BRIDGE: RTM_SETLINK with unknown ifindex
PF_BRIDGE: RTM_SETLINK with unknown ifindex
pktgen: kernel_thread() failed for cpu 0
pktgen: Cannot create thread for cpu 0 (-4)
pktgen: kernel_thread() failed for cpu 1
pktgen: Cannot create thread for cpu 1 (-4)
pktgen: Initialization failed for all threads
pktgen: kernel_thread() failed for cpu 0
pktgen: Cannot create thread for cpu 0 (-4)
pktgen: kernel_thread() failed for cpu 1
pktgen: Cannot create thread for cpu 1 (-4)
pktgen: Initialization failed for all threads
IPVS: Creating netns size=2536 id=11
IPVS: Creating netns size=2536 id=12
binder: 7273:7279 got transaction to invalid handle
audit: type=1400 audit(1518839918.246:34): avc:  denied  { setopt } for  pid=7268 comm="syz-executor7" 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=1
binder: 7273:7279 transaction failed 29201/-22, size 40-8 line 3004
binder: 7273:7279 got transaction to invalid handle
binder: 7273:7279 transaction failed 29201/-22, size 40-8 line 3004
binder: BINDER_SET_CONTEXT_MGR already set
binder: 7273:7290 ioctl 40046207 0 returned -16
binder_alloc: 7273: binder_alloc_buf, no vma
binder: 7273:7290 transaction failed 29189/-3, size 0-0 line 3127
binder: undelivered TRANSACTION_ERROR: 29201
binder: undelivered TRANSACTION_ERROR: 29189
binder: undelivered TRANSACTION_ERROR: 29201
audit: type=1400 audit(1518839918.346:35): avc:  denied  { ioctl } for  pid=7317 comm="syz-executor4" path="socket:[17613]" dev="sockfs" ino=17613 ioctlcmd=0x541c scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1
updating oom_score_adj for 7410 (syz-executor1) from 0 to 0 because it shares mm with 7403 (syz-executor1). Report if this is unexpected.
audit: type=1400 audit(1518839918.766:36): avc:  denied  { create } for  pid=7452 comm="syz-executor4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_iscsi_socket permissive=1
binder_alloc: binder_alloc_mmap_handler: 7450 20000000-20002000 already mapped failed -16
binder: BINDER_SET_CONTEXT_MGR already set
binder: 7450:7457 ioctl 40046207 0 returned -16
binder_alloc: 7450: binder_alloc_buf, no vma
binder: 7450:7462 transaction failed 29189/-3, size 72-16 line 3127
binder: undelivered TRANSACTION_ERROR: 29189
binder: release 7450:7457 transaction 39 out, still active
binder: undelivered TRANSACTION_COMPLETE
binder: send failed reply for transaction 39, target dead
SELinux: unrecognized netlink message: protocol=0 nlmsg_type=54223 sclass=netlink_route_socket pig=7586 comm=syz-executor0
SELinux: unrecognized netlink message: protocol=0 nlmsg_type=54223 sclass=netlink_route_socket pig=7594 comm=syz-executor0
Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable
PF_BRIDGE: RTM_NEWNEIGH with invalid address
PF_BRIDGE: RTM_NEWNEIGH with invalid address
Can not set IPV6_FL_F_REFLECT if flowlabel_consistency sysctl is enable
FAULT_FLAG_ALLOW_RETRY missing 30
CPU: 0 PID: 7665 Comm: syz-executor6 Not tainted 4.9.81-ga25ea24 #36
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff8801cf65f850 ffffffff81d94de9 ffff8801cf65fb30 0000000000000000
 ffff8801b9379310 ffff8801cf65fa20 ffff8801b9379200 ffff8801cf65fa48
 ffffffff8166261a ffff8801cf65f8e0 ffff8801cf65f9a0 00000001d0044067
Call Trace:
 [<ffffffff81d94de9>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81d94de9>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff8166261a>] handle_userfault+0xa3a/0x1310 fs/userfaultfd.c:323
 [<ffffffff814d0e81>] do_anonymous_page mm/memory.c:2747 [inline]
 [<ffffffff814d0e81>] handle_pte_fault mm/memory.c:3488 [inline]
 [<ffffffff814d0e81>] __handle_mm_fault mm/memory.c:3577 [inline]
 [<ffffffff814d0e81>] handle_mm_fault+0x1fd1/0x2530 mm/memory.c:3614
 [<ffffffff810de642>] __do_page_fault+0x5c2/0xd40 arch/x86/mm/fault.c:1407
 [<ffffffff810dede7>] do_page_fault+0x27/0x30 arch/x86/mm/fault.c:1470
 [<ffffffff838b5008>] page_fault+0x28/0x30 arch/x86/entry/entry_64.S:939
 [<ffffffff81bb0364>] SyS_mq_getsetattr+0x24/0x30 ipc/mqueue.c:1321
 [<ffffffff81006505>] do_syscall_64+0x1a5/0x490 arch/x86/entry/common.c:282
 [<ffffffff838b3e7d>] entry_SYSCALL_64_after_swapgs+0x47/0xc5
: renamed from gre0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/02/17 03:58 https://android.googlesource.com/kernel/common android-4.9 a25ea24f7b7d c8b3f7c1 .config console log report ci-android-49-kasan-gce
* Struck through repros no longer work on HEAD.