X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=kernel%2Fsys.c;h=7f5a0cd296a96ca44e43f0db028026094dbbb57a;hb=HEAD;hp=e9ad4448982860af9919df53c3368156a4bf2445;hpb=b618f6f885579a6237e5bf4582fa6167972ddef4;p=net-next-2.6.git diff --git a/kernel/sys.c b/kernel/sys.c index e9ad4448982..7f5a0cd296a 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -931,6 +931,7 @@ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) pgid = pid; if (pgid < 0) return -EINVAL; + rcu_read_lock(); /* From this point forward we keep holding onto the tasklist lock * so that our parent does not change from under us. -DaveM @@ -984,6 +985,7 @@ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) out: /* All paths lead to here, thus we are safe. -DaveM */ write_unlock_irq(&tasklist_lock); + rcu_read_unlock(); return err; }