diff options
author | Joel Stanley <joel@jms.id.au> | 2016-02-02 13:23:36 +1100 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2016-02-02 13:23:42 +1100 |
commit | f3f4aeb9ea8954c0da3cf0d12693f9a57f1f4ac7 (patch) | |
tree | 3663ab29736373c565d88e941162d37311cc3c75 /net/core | |
parent | 2a3f5f14fdf2e8fb680af168fa642ef8a9218ffb (diff) | |
parent | 849a2d3d9be31368559e6852cf64d749e6903818 (diff) | |
download | talos-obmc-linux-openbmc-20160202-1.tar.gz talos-obmc-linux-openbmc-20160202-1.zip |
Merge tag 'v4.3.5' into dev-4.3openbmc-20160202-1
This is the 4.3.5 stable release
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 5 | ||||
-rw-r--r-- | net/core/dst.c | 3 | ||||
-rw-r--r-- | net/core/filter.c | 5 | ||||
-rw-r--r-- | net/core/pktgen.c | 4 |
4 files changed, 15 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index c14748d051e7..6369c456e326 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2539,6 +2539,8 @@ static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path) * * It may return NULL if the skb requires no segmentation. This is * only possible when GSO is used for verifying header integrity. + * + * Segmentation preserves SKB_SGO_CB_OFFSET bytes of previous skb cb. */ struct sk_buff *__skb_gso_segment(struct sk_buff *skb, netdev_features_t features, bool tx_path) @@ -2553,6 +2555,9 @@ struct sk_buff *__skb_gso_segment(struct sk_buff *skb, return ERR_PTR(err); } + BUILD_BUG_ON(SKB_SGO_CB_OFFSET + + sizeof(*SKB_GSO_CB(skb)) > sizeof(skb->cb)); + SKB_GSO_CB(skb)->mac_offset = skb_headroom(skb); SKB_GSO_CB(skb)->encap_level = 0; diff --git a/net/core/dst.c b/net/core/dst.c index d6a5a0bc7df5..8852021a7093 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -301,12 +301,13 @@ void dst_release(struct dst_entry *dst) { if (dst) { int newrefcnt; + unsigned short nocache = dst->flags & DST_NOCACHE; newrefcnt = atomic_dec_return(&dst->__refcnt); if (unlikely(newrefcnt < 0)) net_warn_ratelimited("%s: dst:%p refcnt:%d\n", __func__, dst, newrefcnt); - if (!newrefcnt && unlikely(dst->flags & DST_NOCACHE)) + if (!newrefcnt && unlikely(nocache)) call_rcu(&dst->rcu_head, dst_destroy_rcu); } } diff --git a/net/core/filter.c b/net/core/filter.c index bb18c3680001..49b44879dc7f 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -781,6 +781,11 @@ static int bpf_check_classic(const struct sock_filter *filter, if (ftest->k == 0) return -EINVAL; break; + case BPF_ALU | BPF_LSH | BPF_K: + case BPF_ALU | BPF_RSH | BPF_K: + if (ftest->k >= 32) + return -EINVAL; + break; case BPF_LD | BPF_MEM: case BPF_LDX | BPF_MEM: case BPF_ST: diff --git a/net/core/pktgen.c b/net/core/pktgen.c index de8d5cc5eb24..4da4d51a2ccf 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -2787,7 +2787,9 @@ static struct sk_buff *pktgen_alloc_skb(struct net_device *dev, } else { skb = __netdev_alloc_skb(dev, size, GFP_NOWAIT); } - skb_reserve(skb, LL_RESERVED_SPACE(dev)); + + if (likely(skb)) + skb_reserve(skb, LL_RESERVED_SPACE(dev)); return skb; } |