Skip to content

Commit

Permalink
netpoll: warning for ndo_start_xmit returns with interrupts enabled
Browse files Browse the repository at this point in the history
WARN_ONCE for ndo_start_xmit() enable interrupts in netpoll_send_skb(),
because the NETPOLL API requires that interrupts remain disabled in
netpoll_send_skb().

Signed-off-by: Dongdong Deng <[email protected]>
Acked-by: Matt Mackall <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dongdong Deng authored and davem330 committed Aug 24, 2009
1 parent c189308 commit 79b1bee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)

udelay(USEC_PER_POLL);
}

WARN_ONCE(!irqs_disabled(),
"netpoll_send_skb(): %s enabled interrupts in poll (%pF)\n",
dev->name, ops->ndo_start_xmit);

local_irq_restore(flags);
}

Expand Down

0 comments on commit 79b1bee

Please sign in to comment.