tcp: md5: protects md5sig_info with RCU
This patch makes sure we use appropriate memory barriers before publishing tp->md5sig_info, allowing tcp_md5_do_lookup() being used from tcp_v4_send_reset() without holding socket lock (upcoming patch from Shawn Lu) Note we also need to respect rcu grace period before its freeing, since we can free socket without this grace period thanks to SLAB_DESTROY_BY_RCU Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Shawn Lu <shawn.lu@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
41de8d4cff
commit
a8afca0329
@ -1150,6 +1150,7 @@ struct tcp_md5sig_key {
|
||||
/* - sock block */
|
||||
struct tcp_md5sig_info {
|
||||
struct hlist_head head;
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
/* - pseudo header */
|
||||
|
Reference in New Issue
Block a user