diff options
author | Eric Dumazet <edumazet@google.com> | 2020-05-07 09:32:21 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-07 18:11:07 -0700 |
commit | f78ed2204db9fc35b545d693865bddbe0149aa1f (patch) | |
tree | 547a43f4bee21b4880397429cca2a02ab85f397c /net/bridge | |
parent | 1ddabdfaf70c202b88925edd74c66f4707dbd92e (diff) | |
download | linux-f78ed2204db9fc35b545d693865bddbe0149aa1f.tar.gz linux-f78ed2204db9fc35b545d693865bddbe0149aa1f.tar.bz2 linux-f78ed2204db9fc35b545d693865bddbe0149aa1f.zip |
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 'net/bridge')
-rw-r--r-- | net/bridge/br_private.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 78d3a951180d..4dc21e8f7e33 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -598,10 +598,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev); static inline void br_netpoll_send_skb(const struct net_bridge_port *p, struct sk_buff *skb) { - struct netpoll *np = p->np; - - if (np) - netpoll_send_skb(np, skb); + netpoll_send_skb(p->np, skb); } int br_netpoll_enable(struct net_bridge_port *p); |