summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorAndrey Zhizhikin <andrey.z@gmail.com>2020-08-11 08:29:45 +0000
committerAndrey Zhizhikin <andrey.z@gmail.com>2020-08-11 08:29:45 +0000
commit14eec8a71c3e212080803c50cd9d7982e8208ec5 (patch)
treead0bcaf840c4999bc7b6a0291116eaa57db2a103 /net/core
parent7da1a123ebce2005573def510c61214fc1000163 (diff)
parentd811d29517d1ea05bc159579231652d3ca1c2a01 (diff)
Merge tag 'v5.4.53' into 5.4-2.1.x-imx
This is the 5.4.53 stable release Conflicts (manual resolve, upstream patch merged): drivers/thermal/imx_thermal.c Upstream patch [9025a5589c035a7328c920ed4e190c0c2f5d017d] adds missing of_node_put call, NXP version has been adapted to accommodate this patch into the code. Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/filter.c10
-rw-r--r--net/core/sock.c2
2 files changed, 8 insertions, 4 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index a0a492f7cf9c..bd1e46d61d8a 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -5730,12 +5730,16 @@ BPF_CALL_1(bpf_skb_ecn_set_ce, struct sk_buff *, skb)
{
unsigned int iphdr_len;
- if (skb->protocol == cpu_to_be16(ETH_P_IP))
+ switch (skb_protocol(skb, true)) {
+ case cpu_to_be16(ETH_P_IP):
iphdr_len = sizeof(struct iphdr);
- else if (skb->protocol == cpu_to_be16(ETH_P_IPV6))
+ break;
+ case cpu_to_be16(ETH_P_IPV6):
iphdr_len = sizeof(struct ipv6hdr);
- else
+ break;
+ default:
return 0;
+ }
if (skb_headlen(skb) < iphdr_len)
return 0;
diff --git a/net/core/sock.c b/net/core/sock.c
index 078791a6649a..33a232974374 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1837,7 +1837,7 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
/* sk->sk_memcg will be populated at accept() time */
newsk->sk_memcg = NULL;
- cgroup_sk_alloc(&newsk->sk_cgrp_data);
+ cgroup_sk_clone(&newsk->sk_cgrp_data);
rcu_read_lock();
filter = rcu_dereference(sk->sk_filter);