X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=net%2Fipv4%2Ftcp_ulp.c;fp=net%2Fipv4%2Ftcp_ulp.c;h=6c43fa189195d12c4f55c5fbb225c5dcf6808e9e;hb=b8e202d1d1d0f182f01062804efb523ea9a9008c;hp=38d3ad1411611ef6002a9843ec7699a860f1485a;hpb=e42da4c62abb547d9c9138e0e7fcd1f36057b5e8;p=linux-2.6-microblaze.git diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c index 38d3ad141161..6c43fa189195 100644 --- a/net/ipv4/tcp_ulp.c +++ b/net/ipv4/tcp_ulp.c @@ -106,7 +106,8 @@ void tcp_update_ulp(struct sock *sk, struct proto *proto, if (!icsk->icsk_ulp_ops) { sk->sk_write_space = write_space; - sk->sk_prot = proto; + /* Pairs with lockless read in sk_clone_lock() */ + WRITE_ONCE(sk->sk_prot, proto); return; }