syzbot


WARNING: suspicious RCU usage in proc_alloc_inode

Status: fixed on 2021/11/10 00:50
Subsystems: fs
[Documentation on labels]
Fix commit: 3066820034b5 rcu: Reject RCU_LOCKDEP_WARN() false positives
First crash: 1263d, last: 1263d

Sample crash report:
=============================
WARNING: suspicious RCU usage
5.13.0-rc6-syzkaller #0 Not tainted
-----------------------------
kernel/sched/core.c:8303 Illegal context switch in RCU-bh read-side critical section!

other info that might help us debug this:


rcu_scheduler_active = 2, debug_locks = 0
2 locks held by syz-executor.5/17189:
 #0: 
ffff888029302460
 (
sb_writers
#4
){.+.+}-{0:0}
, at: open_last_lookups fs/namei.c:3274 [inline]
, at: path_openat+0x264e/0x27e0 fs/namei.c:3491
 #1: 
ffff8880397fba98
 (
&sb->s_type->i_mutex_key
#9
){++++}-{3:3}
, at: inode_lock_shared include/linux/fs.h:784 [inline]
, at: open_last_lookups fs/namei.c:3284 [inline]
, at: path_openat+0x14bf/0x27e0 fs/namei.c:3491

stack backtrace:
CPU: 0 PID: 17189 Comm: syz-executor.5 Not tainted 5.13.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x141/0x1d7 lib/dump_stack.c:120
 ___might_sleep+0x229/0x2c0 kernel/sched/core.c:8303
 might_alloc include/linux/sched/mm.h:201 [inline]
 slab_pre_alloc_hook mm/slab.h:497 [inline]
 slab_alloc_node mm/slub.c:2835 [inline]
 slab_alloc mm/slub.c:2922 [inline]
 kmem_cache_alloc+0x2e8/0x3a0 mm/slub.c:2927
 proc_alloc_inode+0x18/0x200 fs/proc/inode.c:69
 alloc_inode+0x61/0x230 fs/inode.c:233
 new_inode_pseudo fs/inode.c:934 [inline]
 new_inode+0x27/0x2f0 fs/inode.c:963
 proc_pid_make_inode+0x26/0x3c0 fs/proc/base.c:1892
 proc_pident_instantiate+0x81/0x310 fs/proc/base.c:2605
 proc_pident_lookup+0x1ec/0x270 fs/proc/base.c:2641
 lookup_open.isra.0+0x6a4/0x13d0 fs/namei.c:3193
 open_last_lookups fs/namei.c:3285 [inline]
 path_openat+0x9b4/0x27e0 fs/namei.c:3491
 do_filp_open+0x190/0x3d0 fs/namei.c:3521
 do_sys_openat2+0x16d/0x420 fs/open.c:1187
 do_sys_open fs/open.c:1203 [inline]
 __do_sys_openat fs/open.c:1219 [inline]
 __se_sys_openat fs/open.c:1214 [inline]
 __x64_sys_openat+0x13f/0x1f0 fs/open.c:1214
 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4196c4
Code: 84 00 00 00 00 00 44 89 54 24 0c e8 96 f9 ff ff 44 8b 54 24 0c 44 89 e2 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 89 44 24 0c e8 c8 f9 ff ff 8b 44
RSP: 002b:00007fffef359ea0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00000000004196c4
RDX: 0000000000080001 RSI: 00000000004bfd41 RDI: 00000000ffffff9c
RBP: 00000000004bfd41 R08: 0000000000000000 R09: 00007fffef359e90
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000080001
R13: 00007fffef359f40 R14: 0000000000000000 R15: 00007fffef35a4f0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/06/20 21:17 upstream cba5e97280f5 aba2b2fb .config console log report info ci-upstream-kasan-gce-root WARNING: suspicious RCU usage in proc_alloc_inode
* Struck through repros no longer work on HEAD.