net: add RCU annotation to sk_dst_cache field
authorCong Wang <amwang@redhat.com>
Tue, 22 Jan 2013 21:09:51 +0000 (21:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2013 05:15:28 +0000 (00:15 -0500)
sock->sk_dst_cache is protected by RCU.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h

index 581dc6bd7dc633a23aef606826023f9b642bdeff..a340ab46b41cde493ad8cdeaef655f1b0ddf0397 100644 (file)
@@ -340,7 +340,7 @@ struct sock {
 #endif
        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;