]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/compat.c
[PATCH] ppc64: remove some direct xmon calls
[karo-tx-linux.git] / fs / compat.c
index 8c665705c6a07beea9a4ead55a2184524f7ed41f..8e71cdbecc7c78cc18f2e14f758b8493e767a07c 100644 (file)
@@ -44,6 +44,8 @@
 #include <linux/nfsd/syscall.h>
 #include <linux/personality.h>
 #include <linux/rwsem.h>
+#include <linux/acct.h>
+#include <linux/mm.h>
 
 #include <net/sock.h>          /* siocdevprivate_ioctl */
 
@@ -1487,6 +1489,7 @@ int compat_do_execve(char * filename,
 
                /* execve success */
                security_bprm_free(bprm);
+               acct_update_integrals(current);
                kfree(bprm);
                return retval;
        }
@@ -1619,6 +1622,7 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp
        char *bits;
        long timeout;
        int size, max_fdset, ret = -EINVAL;
+       struct fdtable *fdt;
 
        timeout = MAX_SCHEDULE_TIMEOUT;
        if (tvp) {
@@ -1644,7 +1648,10 @@ compat_sys_select(int n, compat_ulong_t __user *inp, compat_ulong_t __user *outp
                goto out_nofds;
 
        /* max_fdset can increase, so grab it once to avoid race */
-       max_fdset = current->files->max_fdset;
+       rcu_read_lock();
+       fdt = files_fdtable(current->files);
+       max_fdset = fdt->max_fdset;
+       rcu_read_unlock();
        if (n > max_fdset)
                n = max_fdset;