projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48906f6
)
ibmveth: check return of skb_linearize in ibmveth_start_xmit
author
Thomas Falcon
<tlfalcon@linux.vnet.ibm.com>
Thu, 3 Mar 2016 21:22:36 +0000
(15:22 -0600)
committer
David S. Miller
<davem@davemloft.net>
Mon, 7 Mar 2016 19:38:52 +0000
(14:38 -0500)
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>
drivers/net/ethernet/ibm/ibmveth.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/ibm/ibmveth.c
b/drivers/net/ethernet/ibm/ibmveth.c
index
335417b
..
ebe6071
100644
(file)
--- 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;
}