Re: [syzbot] [rcu?] WARNING in rcu_note_context_switch (2)
From: Edward Adam Davis
Date: Tue Jul 23 2024 - 09:50:53 EST
miss rcu read unlock
#syz test: upstream 51835949dda3
diff --git a/fs/nsfs.c b/fs/nsfs.c
index a4a925dce331..e228d06f0949 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -188,8 +188,10 @@ static long ns_ioctl(struct file *filp, unsigned int ioctl,
tsk = find_task_by_vpid(arg);
else
tsk = find_task_by_pid_ns(arg, pid_ns);
- if (!tsk)
+ if (!tsk) {
+ rcu_read_unlock();
break;
+ }
switch (ioctl) {
case NS_GET_PID_FROM_PIDNS: