]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/exec.c
netfilter: nft_ct: add helper set support
[mirror_ubuntu-artful-kernel.git] / fs / exec.c
index e579466107335bf4b704863469a4162c8c335adb..65145a3df065192345c66ebc311d464fe09a6f29 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
 #include <linux/swap.h>
 #include <linux/string.h>
 #include <linux/init.h>
+#include <linux/sched/mm.h>
+#include <linux/sched/coredump.h>
+#include <linux/sched/signal.h>
+#include <linux/sched/numa_balancing.h>
+#include <linux/sched/task.h>
 #include <linux/pagemap.h>
 #include <linux/perf_event.h>
 #include <linux/highmem.h>
@@ -1088,7 +1093,7 @@ static int de_thread(struct task_struct *tsk)
                struct task_struct *leader = tsk->group_leader;
 
                for (;;) {
-                       threadgroup_change_begin(tsk);
+                       cgroup_threadgroup_change_begin(tsk);
                        write_lock_irq(&tasklist_lock);
                        /*
                         * Do this under tasklist_lock to ensure that
@@ -1099,7 +1104,7 @@ static int de_thread(struct task_struct *tsk)
                                break;
                        __set_current_state(TASK_KILLABLE);
                        write_unlock_irq(&tasklist_lock);
-                       threadgroup_change_end(tsk);
+                       cgroup_threadgroup_change_end(tsk);
                        schedule();
                        if (unlikely(__fatal_signal_pending(tsk)))
                                goto killed;
@@ -1157,7 +1162,7 @@ static int de_thread(struct task_struct *tsk)
                if (unlikely(leader->ptrace))
                        __wake_up_parent(leader, leader->parent);
                write_unlock_irq(&tasklist_lock);
-               threadgroup_change_end(tsk);
+               cgroup_threadgroup_change_end(tsk);
 
                release_task(leader);
        }
@@ -1426,12 +1431,8 @@ static void check_unsafe_exec(struct linux_binprm *bprm)
        struct task_struct *p = current, *t;
        unsigned n_fs;
 
-       if (p->ptrace) {
-               if (ptracer_capable(p, current_user_ns()))
-                       bprm->unsafe |= LSM_UNSAFE_PTRACE_CAP;
-               else
-                       bprm->unsafe |= LSM_UNSAFE_PTRACE;
-       }
+       if (p->ptrace)
+               bprm->unsafe |= LSM_UNSAFE_PTRACE;
 
        /*
         * This isn't strictly necessary, but it makes it harder for LSMs to
@@ -1479,7 +1480,7 @@ static void bprm_fill_uid(struct linux_binprm *bprm)
        if (task_no_new_privs(current))
                return;
 
-       inode = file_inode(bprm->file);
+       inode = bprm->file->f_path.dentry->d_inode;
        mode = READ_ONCE(inode->i_mode);
        if (!(mode & (S_ISUID|S_ISGID)))
                return;