diff options
author | David S. Miller <davem@davemloft.net> | 2019-09-15 14:17:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-15 14:17:27 +0200 |
commit | aa2eaa8c272a3211dec07ce9c6c863a7e355c10e (patch) | |
tree | 8454a23d36b2ff36133c276ee0ba80eabc00850e /net/core/sock_map.c | |
parent | a3d3c74da49c65fc63a937fa559186b0e16adca3 (diff) | |
parent | 1609d7604b847a9820e63393d1a3b6cac7286d40 (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.c | 3 |
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, struct sock *sk, u64 flags) { struct bpf_htab *htab = container_of(map, struct bpf_htab, map); + struct inet_connection_sock *icsk = inet_csk(sk); u32 key_size = map->key_size, hash; struct bpf_htab_elem *elem, *elem_new; struct bpf_htab_bucket *bucket; @@ -666,6 +667,8 @@ static int sock_hash_update_common(struct bpf_map *map, void *key, WARN_ON_ONCE(!rcu_read_lock_held()); if (unlikely(flags > BPF_EXIST)) return -EINVAL; + if (unlikely(icsk->icsk_ulp_data)) + return -EINVAL; link = sk_psock_init_link(); if (!link) |