summaryrefslogtreecommitdiff
path: root/include/linux/if_team.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2020-05-07 19:32:21 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-08 04:11:07 +0300
commitf78ed2204db9fc35b545d693865bddbe0149aa1f (patch)
tree547a43f4bee21b4880397429cca2a02ab85f397c /include/linux/if_team.h
parent1ddabdfaf70c202b88925edd74c66f4707dbd92e (diff)
downloadlinux-f78ed2204db9fc35b545d693865bddbe0149aa1f.tar.xz
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/linux/if_team.h')
-rw-r--r--include/linux/if_team.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index ec7e4bd07f82..537dc2b8c879 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -102,10 +102,7 @@ static inline bool team_port_dev_txable(const struct net_device *port_dev)
static inline void team_netpoll_send_skb(struct team_port *port,
struct sk_buff *skb)
{
- struct netpoll *np = port->np;
-
- if (np)
- netpoll_send_skb(np, skb);
+ netpoll_send_skb(port->np, skb);
}
#else
static inline void team_netpoll_send_skb(struct team_port *port,