summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/ibmveth.c
diff options
context:
space:
mode:
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>2016-03-03 22:22:36 +0100
committerDavid S. Miller <davem@davemloft.net>2016-03-07 20:38:52 +0100
commit2c42bf4b43170ee83354bb68a12f8fc84c2e27a9 (patch)
treee2cb055dbdf55853f61c13ff1f00fc26da41b96c /drivers/net/ethernet/ibm/ibmveth.c
parentcdc_ncm: toggle altsetting to force reset before setup (diff)
downloadlinux-2c42bf4b43170ee83354bb68a12f8fc84c2e27a9.tar.xz
linux-2c42bf4b43170ee83354bb68a12f8fc84c2e27a9.zip
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>
Diffstat (limited to 'drivers/net/ethernet/ibm/ibmveth.c')
-rw-r--r--drivers/net/ethernet/ibm/ibmveth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index 335417b4756b..ebe60719e489 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -1166,7 +1166,10 @@ map_failed:
if (!firmware_has_feature(FW_FEATURE_CMO))
netdev_err(netdev, "tx: unable to map xmit buffer\n");
adapter->tx_map_failed++;
- skb_linearize(skb);
+ if (skb_linearize(skb)) {
+ netdev->stats.tx_dropped++;
+ goto out;
+ }
force_bounce = 1;
goto retry_bounce;
}