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:

committed by
David S. Miller

parent
1ddabdfaf7
commit
f78ed2204d
@@ -507,10 +507,7 @@ static inline unsigned long slave_last_rx(struct bonding *bond,
|
||||
static inline void bond_netpoll_send_skb(const struct slave *slave,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
struct netpoll *np = slave->np;
|
||||
|
||||
if (np)
|
||||
netpoll_send_skb(np, skb);
|
||||
netpoll_send_skb(slave->np, skb);
|
||||
}
|
||||
#else
|
||||
static inline void bond_netpoll_send_skb(const struct slave *slave,
|
||||
|
Reference in New Issue
Block a user