mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
netpoll: accept NULL np argument in netpoll_send_skb()
netpoll_send_skb() callers seem to leak skb if the np pointer is NULL. While this should not happen, we can make the code more robust. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1ddabdfaf7
commit
f78ed2204d
7 changed files with 17 additions and 24 deletions
|
@ -445,12 +445,11 @@ static inline netdev_tx_t dsa_slave_netpoll_send_skb(struct net_device *dev,
|
|||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
struct dsa_slave_priv *p = netdev_priv(dev);
|
||||
|
||||
if (p->netpoll)
|
||||
netpoll_send_skb(p->netpoll, skb);
|
||||
return netpoll_send_skb(p->netpoll, skb);
|
||||
#else
|
||||
BUG();
|
||||
#endif
|
||||
return NETDEV_TX_OK;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void dsa_skb_tx_timestamp(struct dsa_slave_priv *p,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue