diff options
author | Amerigo Wang <amwang@redhat.com> | 2012-08-09 21:24:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-14 17:33:30 -0400 |
commit | 38e6bc185d9544dfad1774b3f8902a0b061aea25 (patch) | |
tree | 5dc41a28f9dc48095c998dfc0dcf8b970db6e1b5 /include | |
parent | 47be03a28cc6c80e3aa2b3e8ed6d960ff0c5c0af (diff) |
netpoll: make __netpoll_cleanup non-block
Like the previous patch, slave_disable_netpoll() and __netpoll_cleanup()
may be called with read_lock() held too, so we should make them
non-block, by moving the cleanup and kfree() to call_rcu_bh() callbacks.
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netpoll.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index bf2d51eec0f3..907812efb4d9 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -23,6 +23,7 @@ struct netpoll { | |||
23 | u8 remote_mac[ETH_ALEN]; | 23 | u8 remote_mac[ETH_ALEN]; |
24 | 24 | ||
25 | struct list_head rx; /* rx_np list element */ | 25 | struct list_head rx; /* rx_np list element */ |
26 | struct rcu_head rcu; | ||
26 | }; | 27 | }; |
27 | 28 | ||
28 | struct netpoll_info { | 29 | struct netpoll_info { |
@@ -38,6 +39,7 @@ struct netpoll_info { | |||
38 | struct delayed_work tx_work; | 39 | struct delayed_work tx_work; |
39 | 40 | ||
40 | struct netpoll *netpoll; | 41 | struct netpoll *netpoll; |
42 | struct rcu_head rcu; | ||
41 | }; | 43 | }; |
42 | 44 | ||
43 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); | 45 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); |
@@ -48,6 +50,7 @@ int netpoll_setup(struct netpoll *np); | |||
48 | int netpoll_trap(void); | 50 | int netpoll_trap(void); |
49 | void netpoll_set_trap(int trap); | 51 | void netpoll_set_trap(int trap); |
50 | void __netpoll_cleanup(struct netpoll *np); | 52 | void __netpoll_cleanup(struct netpoll *np); |
53 | void __netpoll_free_rcu(struct netpoll *np); | ||
51 | void netpoll_cleanup(struct netpoll *np); | 54 | void netpoll_cleanup(struct netpoll *np); |
52 | int __netpoll_rx(struct sk_buff *skb); | 55 | int __netpoll_rx(struct sk_buff *skb); |
53 | void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, | 56 | void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, |