Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3005ad40 authored by Yevgeny Petrilin's avatar Yevgeny Petrilin Committed by David S. Miller
Browse files

mlx4_en: Validate port up prior to transmitting



We might try to use resources which were not activated.

Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e5cc44b2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -612,6 +612,9 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
	int lso_header_size;
	void *fragptr;

	if (!priv->port_up)
		goto tx_drop;

	real_size = get_real_size(skb, dev, &lso_header_size);
	if (unlikely(!real_size))
		goto tx_drop;