aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/sock_map.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-09-15 08:17:27 -0400
committerDavid S. Miller <davem@davemloft.net>2019-09-15 08:17:27 -0400
commitaa2eaa8c272a3211dec07ce9c6c863a7e355c10e (patch)
tree8454a23d36b2ff36133c276ee0ba80eabc00850e /net/core/sock_map.c
parenta3d3c74da49c65fc63a937fa559186b0e16adca3 (diff)
parent1609d7604b847a9820e63393d1a3b6cac7286d40 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Minor overlapping changes in the btusb and ixgbe drivers. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/sock_map.c')
-rw-r--r--net/core/sock_map.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/sock_map.c b/net/core/sock_map.c
index 01998860afaa..eb114ee419b6 100644
--- a/net/core/sock_map.c
+++ b/net/core/sock_map.c
@@ -656,6 +656,7 @@ static int sock_hash_update_common(struct bpf_map *map, void *key,
656 struct sock *sk, u64 flags) 656 struct sock *sk, u64 flags)
657{ 657{
658 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); 658 struct bpf_htab *htab = container_of(map, struct bpf_htab, map);
659 struct inet_connection_sock *icsk = inet_csk(sk);
659 u32 key_size = map->key_size, hash; 660 u32 key_size = map->key_size, hash;
660 struct bpf_htab_elem *elem, *elem_new; 661 struct bpf_htab_elem *elem, *elem_new;
661 struct bpf_htab_bucket *bucket; 662 struct bpf_htab_bucket *bucket;
@@ -666,6 +667,8 @@ static int sock_hash_update_common(struct bpf_map *map, void *key,
666 WARN_ON_ONCE(!rcu_read_lock_held()); 667 WARN_ON_ONCE(!rcu_read_lock_held());
667 if (unlikely(flags > BPF_EXIST)) 668 if (unlikely(flags > BPF_EXIST))
668 return -EINVAL; 669 return -EINVAL;
670 if (unlikely(icsk->icsk_ulp_data))
671 return -EINVAL;
669 672
670 link = sk_psock_init_link(); 673 link = sk_psock_init_link();
671 if (!link) 674 if (!link)