]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - kernel/sys.c
Merge branch 'ben' into docs-next
[karo-tx-linux.git] / kernel / sys.c
index 89d5be418157fa7a18760b57c11a56a7437c8b81..842914ef7de4b58a09c1b545d4cf804cb075983a 100644 (file)
@@ -57,7 +57,7 @@
 /* Move somewhere else to avoid recompiling? */
 #include <generated/utsrelease.h>
 
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <asm/io.h>
 #include <asm/unistd.h>
 
@@ -1416,7 +1416,8 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource,
         * applications, so we live with it
         */
         if (!retval && new_rlim && resource == RLIMIT_CPU &&
-                        new_rlim->rlim_cur != RLIM_INFINITY)
+            new_rlim->rlim_cur != RLIM_INFINITY &&
+            IS_ENABLED(CONFIG_POSIX_TIMERS))
                update_rlimit_cpu(tsk, new_rlim->rlim_cur);
 out:
        read_unlock(&tasklist_lock);
@@ -1696,16 +1697,6 @@ static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd)
                fput(exe_file);
        }
 
-       /*
-        * The symlink can be changed only once, just to disallow arbitrary
-        * transitions malicious software might bring in. This means one
-        * could make a snapshot over all processes running and monitor
-        * /proc/pid/exe changes to notice unusual activity if needed.
-        */
-       err = -EPERM;
-       if (test_and_set_bit(MMF_EXE_FILE_CHANGED, &mm->flags))
-               goto exit;
-
        err = 0;
        /* set the new file, lockless */
        get_file(exe.file);