Netdev List
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "Tantilov, Emil S" <emil.s.tantilov@intel.com>,
	"Ronciak, John" <john.ronciak@intel.com>,
	"Brandeburg, Jesse" <jesse.brandeburg@intel.com>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>
Subject: [BUG PATCH NET-NEXT-2.6] kernel panic in dev_hard_start_xmit: remove faulty software TX time stamping
Date: Sat, 21 Feb 2009 10:28:08 +0100	[thread overview]
Message-ID: <1235208488.22598.40.camel@pohly-MOBL> (raw)

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 <patrick.ohly@intel.com>
Signed-Off: Emil Tantilov <emil.s.tantilov@intel.com>

diff --git a/net/core/dev.c b/net/core/dev.c
index d393fc9..1dcace3 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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);




             reply	other threads:[~2009-02-21  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21  9:28 Patrick Ohly [this message]
2009-02-21 10:37 ` [BUG PATCH NET-NEXT-2.6] kernel panic in dev_hard_start_xmit: remove faulty software TX time stamping Jeff Kirsher
2009-02-21 10:42 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1235208488.22598.40.camel@pohly-MOBL \
    --to=patrick.ohly@intel.com \
    --cc=davem@davemloft.net \
    --cc=emil.s.tantilov@intel.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox