Patchwork [net-next,2/2] net: add RCU annotation to sk_dst_cache field

mail settings
Submitter Amerigo Wang
Date Jan. 23, 2013, 7:09 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/214818/
State Accepted
Delegated to: David Miller
Headers show


Amerigo Wang - Jan. 23, 2013, 7:09 a.m.
From: Cong Wang <>

sock->sk_dst_cache is protected by RCU.

Reported-by: Fengguang Wu <>
Cc: Eric Dumazet <>
Cc: David S. Miller <>
Signed-off-by: Cong Wang <>

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at


diff --git a/include/net/sock.h b/include/net/sock.h
index 5a34e2f..c4b64c6 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -337,7 +337,7 @@  struct sock {
 	unsigned long 		sk_flags;
 	struct dst_entry	*sk_rx_dst;
-	struct dst_entry	*sk_dst_cache;
+	struct dst_entry __rcu	*sk_dst_cache;
 	spinlock_t		sk_dst_lock;
 	atomic_t		sk_wmem_alloc;
 	atomic_t		sk_omem_alloc;