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

Commit 2c42bf4b authored by Thomas Falcon's avatar Thomas Falcon Committed by David S. Miller
Browse files

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: default avatarThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 48906f62
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1166,7 +1166,10 @@ static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb,
	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;
}