mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
net/tls: use RCU protection on icsk->icsk_ulp_data
We need to make sure context does not get freed while diag code is interrogating it. Free struct tls_context with kfree_rcu(). We add the __rcu annotation directly in icsk, and cast it away in the datapath accessor. Presumably all ULPs will do a similar thing. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ed6e8103ba
commit
15a7dea750
5 changed files with 29 additions and 12 deletions
|
@ -345,7 +345,7 @@ static int sock_map_update_common(struct bpf_map *map, u32 idx,
|
|||
return -EINVAL;
|
||||
if (unlikely(idx >= map->max_entries))
|
||||
return -E2BIG;
|
||||
if (unlikely(icsk->icsk_ulp_data))
|
||||
if (unlikely(rcu_access_pointer(icsk->icsk_ulp_data)))
|
||||
return -EINVAL;
|
||||
|
||||
link = sk_psock_init_link();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue