|
@@ -218,13 +218,13 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimi
|
|
struct user_struct *user;
|
|
struct user_struct *user;
|
|
|
|
|
|
/*
|
|
/*
|
|
- * We won't get problems with the target's UID changing under us
|
|
|
|
- * because changing it requires RCU be used, and if t != current, the
|
|
|
|
- * caller must be holding the RCU readlock (by way of a spinlock) and
|
|
|
|
- * we use RCU protection here
|
|
|
|
|
|
+ * Protect access to @t credentials. This can go away when all
|
|
|
|
+ * callers hold rcu read lock.
|
|
*/
|
|
*/
|
|
|
|
+ rcu_read_lock();
|
|
user = get_uid(__task_cred(t)->user);
|
|
user = get_uid(__task_cred(t)->user);
|
|
atomic_inc(&user->sigpending);
|
|
atomic_inc(&user->sigpending);
|
|
|
|
+ rcu_read_unlock();
|
|
|
|
|
|
if (override_rlimit ||
|
|
if (override_rlimit ||
|
|
atomic_read(&user->sigpending) <=
|
|
atomic_read(&user->sigpending) <=
|