aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.h
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-01-02 17:00:22 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-03 14:32:57 -0500
commit21e4902aea80ef35afc00ee8d2abdea4f519b7f7 (patch)
tree8c1d2761c3959356151eed7bb677df633d64c0dd /net/netlink/af_netlink.h
parentf89bd6f87a53ce5a7d60662429591ebac2745c10 (diff)
netlink: Lockless lookup with RCU grace period in socket release
Defers the release of the socket reference using call_rcu() to allow using an RCU read-side protected call to rhashtable_lookup() This restores behaviour and performance gains as previously introduced by e341694 ("netlink: Convert netlink_lookup() to use RCU protected hash table") without the side effect of severely delayed socket destruction. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/af_netlink.h')
-rw-r--r--net/netlink/af_netlink.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.h b/net/netlink/af_netlink.h
index f123a88496f8..fd96fa76202a 100644
--- a/net/netlink/af_netlink.h
+++ b/net/netlink/af_netlink.h
@@ -50,6 +50,7 @@ struct netlink_sock {
50#endif /* CONFIG_NETLINK_MMAP */ 50#endif /* CONFIG_NETLINK_MMAP */
51 51
52 struct rhash_head node; 52 struct rhash_head node;
53 struct rcu_head rcu;
53}; 54};
54 55
55static inline struct netlink_sock *nlk_sk(struct sock *sk) 56static inline struct netlink_sock *nlk_sk(struct sock *sk)