diff options
| author | Paul Mackerras <paulus@samba.org> | 2006-12-04 15:59:07 +1100 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-12-04 15:59:07 +1100 |
| commit | 79acbb3ff2d8095b692e1502b9eb2ccec348de26 (patch) | |
| tree | 6ab773e5a8f9de2cd6443362b21d0d6fffe3b35e /kernel/user.c | |
| parent | [PATCH] ppc: Fix io.h for config with CONFIG_PCI not set (diff) | |
| parent | [XFRM]: Fix aevent structuring to be more complete. (diff) | |
| download | linux-79acbb3ff2d8095b692e1502b9eb2ccec348de26.tar.gz linux-79acbb3ff2d8095b692e1502b9eb2ccec348de26.zip | |
Merge branch 'linux-2.6' into for-linus
Diffstat (limited to 'kernel/user.c')
| -rw-r--r-- | kernel/user.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/user.c b/kernel/user.c index 6408c0424291..220e586127a0 100644 --- a/kernel/user.c +++ b/kernel/user.c @@ -187,6 +187,17 @@ void switch_uid(struct user_struct *new_user) atomic_dec(&old_user->processes); switch_uid_keyring(new_user); current->user = new_user; + + /* + * We need to synchronize with __sigqueue_alloc() + * doing a get_uid(p->user).. If that saw the old + * user value, we need to wait until it has exited + * its critical region before we can free the old + * structure. + */ + smp_mb(); + spin_unlock_wait(¤t->sighand->siglock); + free_uid(old_user); suid_keys(current); } |
