summaryrefslogtreecommitdiff
path: root/include/net/bonding.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2020-05-07 09:32:21 -0700
committerDavid S. Miller <davem@davemloft.net>2020-05-07 18:11:07 -0700
commitf78ed2204db9fc35b545d693865bddbe0149aa1f (patch)
tree547a43f4bee21b4880397429cca2a02ab85f397c /include/net/bonding.h
parent1ddabdfaf70c202b88925edd74c66f4707dbd92e (diff)
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>
Diffstat (limited to 'include/net/bonding.h')
-rw-r--r--include/net/bonding.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/net/bonding.h b/include/net/bonding.h
index 0b696da5c115..f211983cd52a 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -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,