linux-stable/net/mctp
Jeremy Kerr b98e1a04e2 net: mctp: mark socks as dead on unhash, prevent re-add
Once a socket has been unhashed, we want to prevent it from being
re-used in a sk_key entry as part of a routing operation.

This change marks the sk as SOCK_DEAD on unhash, which prevents addition
into the net's key list.

We need to do this during the key add path, rather than key lookup, as
we release the net keys_lock between those operations.

Fixes: 4a992bbd36 ("mctp: Implement message fragmentation & reassembly")
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-01-25 13:07:37 +00:00
..
test Networking changes for 5.19. 2022-05-25 12:22:58 -07:00
Kconfig mctp: Add flow extension to skb 2021-10-29 13:23:51 +01:00
Makefile mctp: Add test utils 2021-10-03 14:35:41 +01:00
af_mctp.c net: mctp: mark socks as dead on unhash, prevent re-add 2023-01-25 13:07:37 +00:00
device.c mctp: Remove device type check at unregister 2022-12-19 17:20:22 -08:00
neigh.c mctp: replace mctp_address_ok with more fine-grained helpers 2022-02-18 21:24:28 -08:00
route.c net: mctp: mark socks as dead on unhash, prevent re-add 2023-01-25 13:07:37 +00:00