diff options
author | Amerigo Wang <amwang@redhat.com> | 2012-08-09 21:24:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-14 17:33:31 -0400 |
commit | 2899656b494dcd118123af1126826b115c8ea6f9 (patch) | |
tree | 969d2b4362c2237cb38259f909774dc0a00a7e4d /include/linux/netpoll.h | |
parent | 91fe4a4b9e490a24f6702dd8afe72d8afab6fcdb (diff) |
netpoll: take rcu_read_lock_bh() in netpoll_send_skb_on_dev()
This patch fixes several problems in the call path of
netpoll_send_skb_on_dev():
1. Disable IRQ's before calling netpoll_send_skb_on_dev().
2. All the callees of netpoll_send_skb_on_dev() should use
rcu_dereference_bh() to dereference ->npinfo.
3. Rename arp_reply() to netpoll_arp_reply(), the former is too generic.
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/linux/netpoll.h')
-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 2d178baa49df..61aee86cf21d 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -57,7 +57,10 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb, | |||
57 | struct net_device *dev); | 57 | struct net_device *dev); |
58 | static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | 58 | static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) |
59 | { | 59 | { |
60 | unsigned long flags; | ||
61 | local_irq_save(flags); | ||
60 | netpoll_send_skb_on_dev(np, skb, np->dev); | 62 | netpoll_send_skb_on_dev(np, skb, np->dev); |
63 | local_irq_restore(flags); | ||
61 | } | 64 | } |
62 | 65 | ||
63 | 66 | ||