Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
authorAlex Shi <alex.shi@linaro.org>
Tue, 11 Oct 2016 21:33:37 +0000 (23:33 +0200)
committerAlex Shi <alex.shi@linaro.org>
Tue, 11 Oct 2016 21:33:37 +0000 (23:33 +0200)
Conflicts:
kernel/cpuset.c

15 files changed:
1  2 
arch/x86/include/asm/uaccess.h
drivers/md/dm-crypt.c
fs/ext4/ioctl.c
fs/ext4/mballoc.c
fs/proc/base.c
include/linux/mm.h
kernel/cpuset.c
kernel/fork.c
kernel/sched/core.c
kernel/trace/Makefile
kernel/trace/trace.c
net/ipv4/tcp_ipv4.c
net/ipv6/addrconf.c
net/ipv6/ping.c
net/ipv6/tcp_ipv6.c

Simple merge
Simple merge
diff --cc fs/ext4/ioctl.c
Simple merge
Simple merge
diff --cc fs/proc/base.c
Simple merge
Simple merge
diff --cc kernel/cpuset.c
index e2e294d997e0c9b8b5f26b5626649c984ffa44db,b9279a2844d81656115195235df679ff2b2291e0..e5bd044c1cbb4a412f7dedfcb8da29ac80f591b7
@@@ -2084,23 -2074,20 +2084,37 @@@ static void cpuset_bind(struct cgroup_s
        mutex_unlock(&cpuset_mutex);
  }
  
 +static int cpuset_allow_attach(struct cgroup_taskset *tset)
 +{
 +      const struct cred *cred = current_cred(), *tcred;
 +      struct task_struct *task;
 +      struct cgroup_subsys_state *css;
 +
 +      cgroup_taskset_for_each(task, css, tset) {
 +              tcred = __task_cred(task);
 +
 +              if ((current != task) && !capable(CAP_SYS_ADMIN) &&
 +                   cred->euid.val != tcred->uid.val && cred->euid.val != tcred->suid.val)
 +                      return -EACCES;
 +      }
 +
 +      return 0;
 +}
 +
+ /*
+  * Make sure the new task conform to the current state of its parent,
+  * which could have been changed by cpuset just after it inherits the
+  * state from the parent and before it sits on the cgroup's task list.
+  */
+ void cpuset_fork(struct task_struct *task, void *priv)
+ {
+       if (task_css_is_root(task, cpuset_cgrp_id))
+               return;
+       set_cpus_allowed_ptr(task, &current->cpus_allowed);
+       task->mems_allowed = current->mems_allowed;
+ }
  struct cgroup_subsys cpuset_cgrp_subsys = {
        .css_alloc      = cpuset_css_alloc,
        .css_online     = cpuset_css_online,
diff --cc kernel/fork.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/ipv6/ping.c
index 9411c8d770a53cf6cf367a567228b7c8e832879e,3e55447b63a43943b5552ed0c9a80bcb31741c4e..fa65e92e9510b3369bddf874f0d1a9a0681e36a2
@@@ -152,9 -150,16 +152,11 @@@ int ping_v6_sendmsg(struct sock *sk, st
        rt = (struct rt6_info *) dst;
  
        np = inet6_sk(sk);
-       if (!np)
-               return -EBADF;
+       if (!np) {
+               err = -EBADF;
+               goto dst_err_out;
+       }
  
 -      if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr))
 -              fl6.flowi6_oif = np->mcast_oif;
 -      else if (!fl6.flowi6_oif)
 -              fl6.flowi6_oif = np->ucast_oif;
 -
        pfh.icmph.type = user_icmph.icmp6_type;
        pfh.icmph.code = user_icmph.icmp6_code;
        pfh.icmph.checksum = 0;
Simple merge