mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
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>
This commit is contained in:
parent
91fe4a4b9e
commit
2899656b49
2 changed files with 20 additions and 14 deletions
|
@ -57,7 +57,10 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
|
|||
struct net_device *dev);
|
||||
static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
|
||||
{
|
||||
unsigned long flags;
|
||||
local_irq_save(flags);
|
||||
netpoll_send_skb_on_dev(np, skb, np->dev);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue