* [PATCH net] ibmveth: check return of skb_linearize in ibmveth_start_xmit
@ 2016-03-03 21:22 Thomas Falcon
2016-03-07 19:40 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Falcon @ 2016-03-03 21:22 UTC (permalink / raw)
To: netdev
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>
---
drivers/net/ethernet/ibm/ibmveth.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
index 335417b..ebe6071 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;
}
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ibmveth: check return of skb_linearize in ibmveth_start_xmit
2016-03-03 21:22 [PATCH net] ibmveth: check return of skb_linearize in ibmveth_start_xmit Thomas Falcon
@ 2016-03-07 19:40 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-03-07 19:40 UTC (permalink / raw)
To: tlfalcon; +Cc: netdev
From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date: Thu, 3 Mar 2016 15:22:36 -0600
> 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>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-07 19:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 21:22 [PATCH net] ibmveth: check return of skb_linearize in ibmveth_start_xmit Thomas Falcon
2016-03-07 19:40 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).