diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-08 11:13:42 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-08 11:13:42 -0700 |
| commit | 79637a41e466bbe7dfe394bac3c9d86a92fd55b1 (patch) | |
| tree | 0ee720d20572a3e1f901f78331b57612984f1e2e /kernel/sys.c | |
| parent | 899edae615c806f78880077bd46f04d7f23ae6e6 (diff) | |
| parent | b3bd3de66f60df4c9a2076e2886a622458929056 (diff) | |
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
gcc-4.6: kernel/*: Fix unused but set warnings
mutex: Fix annotations to include it in kernel-locking docbook
pid: make setpgid() system call use RCU read-side critical section
MAINTAINERS: Add RCU's public git tree
Diffstat (limited to 'kernel/sys.c')
| -rw-r--r-- | kernel/sys.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index e9ad44489828..7f5a0cd296a9 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; } |
