ibmveth: check return of skb_linearize in ibmveth_start_xmit
If skb_linearize fails, the driver should drop the packet instead of trying to copy it into the bounce buffer. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
48906f62c9
commit
2c42bf4b43
@@ -1166,7 +1166,10 @@ map_failed:
|
|||||||
if (!firmware_has_feature(FW_FEATURE_CMO))
|
if (!firmware_has_feature(FW_FEATURE_CMO))
|
||||||
netdev_err(netdev, "tx: unable to map xmit buffer\n");
|
netdev_err(netdev, "tx: unable to map xmit buffer\n");
|
||||||
adapter->tx_map_failed++;
|
adapter->tx_map_failed++;
|
||||||
skb_linearize(skb);
|
if (skb_linearize(skb)) {
|
||||||
|
netdev->stats.tx_dropped++;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
force_bounce = 1;
|
force_bounce = 1;
|
||||||
goto retry_bounce;
|
goto retry_bounce;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user