* [PATCH net-next] sunvnet: failed trigger should not cause BUG_ON()
@ 2015-02-19 18:15 David L Stevens
2015-02-19 18:24 ` Sowmini Varadhan
2015-02-20 22:44 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: David L Stevens @ 2015-02-19 18:15 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Sowmini Varadhan
An error return from __vnet_tx_trigger() sets the TX descriptor to
VIO_DESC_FREE while leaving port->tx_bufs[txi].skb set. This leads
to a BUG_ON() the next time this descriptor is used.
This patch frees the pending skb when getting a trigger error to
match the VIO_DESC_FREE state.
Signed-off-by: David L Stevens <david.stevens@oracle.com>
---
drivers/net/ethernet/sun/sunvnet.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 2b10b85..0943fb3 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -1414,6 +1414,8 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (unlikely(err < 0)) {
netdev_info(dev, "TX trigger error %d\n", err);
d->hdr.state = VIO_DESC_FREE;
+ skb = port->tx_bufs[txi].skb;
+ port->tx_bufs[txi].skb = NULL;
dev->stats.tx_carrier_errors++;
goto out_dropped;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] sunvnet: failed trigger should not cause BUG_ON()
2015-02-19 18:15 [PATCH net-next] sunvnet: failed trigger should not cause BUG_ON() David L Stevens
@ 2015-02-19 18:24 ` Sowmini Varadhan
2015-02-20 22:44 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Sowmini Varadhan @ 2015-02-19 18:24 UTC (permalink / raw)
To: David L Stevens; +Cc: David Miller, netdev
On (02/19/15 13:15), David L Stevens wrote:
> An error return from __vnet_tx_trigger() sets the TX descriptor to
> VIO_DESC_FREE while leaving port->tx_bufs[txi].skb set. This leads
> to a BUG_ON() the next time this descriptor is used.
>
> This patch frees the pending skb when getting a trigger error to
> match the VIO_DESC_FREE state.
>
> Signed-off-by: David L Stevens <david.stevens@oracle.com>
Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] sunvnet: failed trigger should not cause BUG_ON()
2015-02-19 18:15 [PATCH net-next] sunvnet: failed trigger should not cause BUG_ON() David L Stevens
2015-02-19 18:24 ` Sowmini Varadhan
@ 2015-02-20 22:44 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-02-20 22:44 UTC (permalink / raw)
To: david.stevens; +Cc: netdev, sowmini.varadhan
From: David L Stevens <david.stevens@oracle.com>
Date: Thu, 19 Feb 2015 13:15:49 -0500
> An error return from __vnet_tx_trigger() sets the TX descriptor to
> VIO_DESC_FREE while leaving port->tx_bufs[txi].skb set. This leads
> to a BUG_ON() the next time this descriptor is used.
>
> This patch frees the pending skb when getting a trigger error to
> match the VIO_DESC_FREE state.
>
> Signed-off-by: David L Stevens <david.stevens@oracle.com>
Applied, thanks David.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-20 22:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-19 18:15 [PATCH net-next] sunvnet: failed trigger should not cause BUG_ON() David L Stevens
2015-02-19 18:24 ` Sowmini Varadhan
2015-02-20 22:44 ` 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).