|
@@ -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;
|
|
|
}
|
|
|
|