Skip to contentSkip to conversation

kernel panic in dev_hard_start_xmit: remove faulty software TX time stamping

PATCH In review Patrick Ohly 3 participants 3 messages Feb 21, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel panic in dev_hard_start_xmit: remove faulty software TX time stamping

The current implementation of the TX software time stamping fallback is faulty because it accesses the skb after ndo_start_xmit() returns successfully. This patch removes the fallback, which fixes kernel panics seen during stress tests. Hardware time stamping is not affected by this removal.

Signed-Off: Patrick Ohly <[email protected]>
Signed-Off: Emil Tantilov <[email protected]>

net/core/dev.c +0 -13
index d393fc9..1dcace3 100644
@@ -1672,16 +1672,6 @@ static int dev_gso_segment(struct sk_buff *skb)
 	return 0;
 }
 
-static void tstamp_tx(struct sk_buff *skb)
-{
-	union skb_shared_tx *shtx =
-		skb_tx(skb);
-	if (unlikely(shtx->software &&
-			!shtx->in_progress)) {
-		skb_tstamp_tx(skb, NULL);
-	}
-}
-
 int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
 			struct netdev_queue *txq)
 {
@@ -1715,8 +1705,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
 		 * the skb destructor before the call and restoring it
 		 * afterwards, then doing the skb_orphan() ourselves?
 		 */
-		if (likely(!rc))
-			tstamp_tx(skb);
 		return rc;
 	}
 
@@ -1732,7 +1720,6 @@ gso:
 			skb->next = nskb;
 			return rc;
 		}
-		tstamp_tx(skb);
 		if (unlikely(netif_tx_queue_stopped(txq) && skb->next))
 			return NETDEV_TX_BUSY;
 	} while (skb->next);
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Patrick Ohly

The current implementation of the TX software time stamping fallback is faulty because it accesses the skb after ndo_start_xmit() returns successfully. This patch removes the fallback, which fixes kernel panics seen during stress tests. Hardware time stamping is not affected by this removal.

Signed-Off: Patrick Ohly <[email protected]>
Signed-Off: Emil Tantilov <[email protected]>

Signature · 2 lines
Cheers,
Jeff
maintainer
#2 lore raw
In reply to Patrick Ohly

From: Patrick Ohly <[email protected]>
Date: Sat, 21 Feb 2009 10:28:08 +0100

Quoted 8 lines

The current implementation of the TX software time stamping fallback is faulty because it accesses the skb after ndo_start_xmit() returns successfully. This patch removes the fallback, which fixes kernel panics seen during stress tests. Hardware time stamping is not affected by this removal.

Signed-Off: Patrick Ohly <[email protected]>
Signed-Off: Emil Tantilov <[email protected]>

It's "Signed-of-by", three words, only the first capitalized.

Aplied, thanks.