Merge tag 'v4.9.177' into khadas-vim3-4.9.y
authorNick <nick@khadas.com>
Tue, 21 May 2019 10:02:08 +0000 (18:02 +0800)
committerNick <nick@khadas.com>
Tue, 21 May 2019 10:02:08 +0000 (18:02 +0800)
This is the 4.9.177 stable release

 Conflicts:
arch/x86/entry/vdso/Makefile
kernel/bpf/hashtab.c
net/core/fib_rules.c

1  2 
Makefile
include/linux/efi.h
init/main.c
kernel/bpf/hashtab.c
net/core/fib_rules.c
net/ipv4/raw.c

diff --cc Makefile
Simple merge
Simple merge
diff --cc init/main.c
Simple merge
  #include <linux/bpf.h>
  #include <linux/jhash.h>
  #include <linux/filter.h>
+ #include <linux/rculist_nulls.h>
  #include "percpu_freelist.h"
 +#define HTAB_CREATE_FLAG_MASK                                         \
 +      (BPF_F_NO_PREALLOC | BPF_F_RDONLY | BPF_F_WRONLY)
  
  struct bucket {
-       struct hlist_head head;
+       struct hlist_nulls_head head;
        raw_spinlock_t lock;
  };
  
@@@ -471,24 -429,9 +471,27 @@@ int fib_nl_newrule(struct sk_buff *skb
        if (rule->l3mdev && rule->table)
                goto errout_free;
  
 +      if (tb[FRA_UID_RANGE]) {
 +              if (current_user_ns() != net->user_ns) {
 +                      err = -EPERM;
 +                      goto errout_free;
 +              }
 +
 +              rule->uid_range = nla_get_kuid_range(tb);
 +
 +              if (!uid_range_set(&rule->uid_range) ||
 +                  !uid_lte(rule->uid_range.start, rule->uid_range.end))
 +                      goto errout_free;
 +      } else {
 +              rule->uid_range = fib_kuid_range_unset;
 +      }
 +
 +      if ((nlh->nlmsg_flags & NLM_F_EXCL) &&
 +          rule_exists(ops, frh, tb, rule)) {
 +              err = -EEXIST;
+       if (rule_exists(ops, frh, tb, rule)) {
+               if (nlh->nlmsg_flags & NLM_F_EXCL)
+                       err = -EEXIST;
                goto errout_free;
        }
  
diff --cc net/ipv4/raw.c
Simple merge