]> git.karo-electronics.de Git - linux-beck.git/blobdiff - kernel/exit.c
cred: use correct cred accessor with regards to rcu read lock
[linux-beck.git] / kernel / exit.c
index 3db1909faed9331488cecad09e10359db175a746..910a0716e17ab4124ddd07f22d502e19ed9f30de 100644 (file)
@@ -474,7 +474,7 @@ static void close_files(struct files_struct * files)
                i = j * __NFDBITS;
                if (i >= fdt->max_fds)
                        break;
-               set = fdt->open_fds->fds_bits[j++];
+               set = fdt->open_fds[j++];
                while (set) {
                        if (set & 1) {
                                struct file * file = xchg(&fdt->fd[i], NULL);
@@ -1214,7 +1214,7 @@ static int wait_task_zombie(struct wait_opts *wo, struct task_struct *p)
        unsigned long state;
        int retval, status, traced;
        pid_t pid = task_pid_vnr(p);
-       uid_t uid = __task_cred(p)->uid;
+       uid_t uid = from_kuid_munged(current_user_ns(), __task_cred(p)->uid);
        struct siginfo __user *infop;
 
        if (!likely(wo->wo_flags & WEXITED))
@@ -1427,7 +1427,7 @@ static int wait_task_stopped(struct wait_opts *wo,
        if (!unlikely(wo->wo_flags & WNOWAIT))
                *p_code = 0;
 
-       uid = task_uid(p);
+       uid = from_kuid_munged(current_user_ns(), task_uid(p));
 unlock_sig:
        spin_unlock_irq(&p->sighand->siglock);
        if (!exit_code)
@@ -1500,7 +1500,7 @@ static int wait_task_continued(struct wait_opts *wo, struct task_struct *p)
        }
        if (!unlikely(wo->wo_flags & WNOWAIT))
                p->signal->flags &= ~SIGNAL_STOP_CONTINUED;
-       uid = task_uid(p);
+       uid = from_kuid_munged(current_user_ns(), task_uid(p));
        spin_unlock_irq(&p->sighand->siglock);
 
        pid = task_pid_vnr(p);