summaryrefslogtreecommitdiffstats
path: root/net/netlink/af_netlink.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2016-11-28 19:22:12 +0800
committerDavid S. Miller <davem@davemloft.net>2016-11-29 19:48:38 -0500
commit707693c8a498697aa8db240b93eb76ec62e30892 (patch)
treea9ee8933c07cfc86afc74436d39a26c8beaff683 /net/netlink/af_netlink.h
parent95c2027bfeda21a28eb245121e6a249f38d0788e (diff)
downloadlinux-707693c8a498697aa8db240b93eb76ec62e30892.tar.gz
linux-707693c8a498697aa8db240b93eb76ec62e30892.tar.bz2
linux-707693c8a498697aa8db240b93eb76ec62e30892.zip
netlink: Call cb->done from a worker thread
The cb->done interface expects to be called in process context. This was broken by the netlink RCU conversion. This patch fixes it by adding a worker struct to make the cb->done call where necessary. Fixes: 21e4902aea80 ("netlink: Lockless lookup with RCU grace...") Reported-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/af_netlink.h')
-rw-r--r--net/netlink/af_netlink.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.h b/net/netlink/af_netlink.h
index 3cfd6cc60504..4fdb38318977 100644
--- a/net/netlink/af_netlink.h
+++ b/net/netlink/af_netlink.h
@@ -3,6 +3,7 @@
#include <linux/rhashtable.h>
#include <linux/atomic.h>
+#include <linux/workqueue.h>
#include <net/sock.h>
#define NLGRPSZ(x) (ALIGN(x, sizeof(unsigned long) * 8) / 8)
@@ -33,6 +34,7 @@ struct netlink_sock {
struct rhash_head node;
struct rcu_head rcu;
+ struct work_struct work;
};
static inline struct netlink_sock *nlk_sk(struct sock *sk)