Skip to content

Commit

Permalink
mlx4_en: Validate port up prior to transmitting
Browse files Browse the repository at this point in the history
We might try to use resources which were not activated.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yevgeny Petrilin authored and David S. Miller committed Aug 24, 2010
1 parent e5cc44b commit 3005ad4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/mlx4/en_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3005ad4

Please sign in to comment.