Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: damuzi000@gmail.com
Cc: peppe.cavallaro@st.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: stmmac: fix NULL pointer dereference in stmmac_get_tx_hwtstamp
Date: Wed, 15 Jan 2014 16:58:45 -0800 (PST)	[thread overview]
Message-ID: <20140115.165845.1813878173743840445.davem@davemloft.net> (raw)
In-Reply-To: <1389795967-2452-1-git-send-email-damuzi000@gmail.com>

From: Bruce Liu <damuzi000@gmail.com>
Date: Wed, 15 Jan 2014 22:26:07 +0800

> When timestamping is enabled, stmmac_tx_clean will call
> stmmac_get_tx_hwtstamp to get tx TS.
> But the skb can be NULL because the last of its tx_skbuff is NULL
> if this packet frame is filled in more than one descriptors.
> 
> Signed-off-by: Bruce Liu <damuzi000@gmail.com>

Sometimes the cure is worse than the disease.

Your change means that every multi-segment packet will never have
it's timestamp properly recorded, which is of course bogus.

You need to change this code such that the SKB from the first
descriptor is maintained so that we can pass it into
stmmac_get_tx_hwtstamp() at the appropriate time.

Thanks.

      reply	other threads:[~2014-01-16  0:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 14:26 [PATCH net-next] net: stmmac: fix NULL pointer dereference in stmmac_get_tx_hwtstamp Bruce Liu
2014-01-16  0:58 ` David Miller [this message]

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=20140115.165845.1813878173743840445.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=damuzi000@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    /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