diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-11-28 12:22:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-30 01:48:38 +0100 |
commit | 707693c8a498697aa8db240b93eb76ec62e30892 (patch) | |
tree | a9ee8933c07cfc86afc74436d39a26c8beaff683 /net/netlink/af_netlink.h | |
parent | net/sched: pedit: make sure that offset is valid (diff) | |
download | linux-707693c8a498697aa8db240b93eb76ec62e30892.tar.xz 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.h | 2 |
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) |