From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: "eric.dumazet@gmail.com" <eric.dumazet@gmail.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"richardcochran@gmail.com" <richardcochran@gmail.com>
Subject: Re: [PATCH v2] arc_emac: fix potential use after free
Date: Fri, 20 Dec 2013 14:06:07 +0000 [thread overview]
Message-ID: <1387548366.32574.5.camel@abrodkin-8560l> (raw)
In-Reply-To: <1387505440.19078.419.camel@edumazet-glaptop2.roam.corp.google.com>
On Thu, 2013-12-19 at 18:10 -0800, Eric Dumazet wrote:
> Signed-off-by: Eric Dumazet <edumazet@google.com>
>
> skb_tx_timestamp(skb) should be called _before_ TX completion
> has a chance to trigger, otherwise it is too late and we access
> freed memory.
>
> Fixes: e4f2379db6c6 ("ethernet/arc/arc_emac - Add new driver")
Hi Eric,
thanks for this fix.
Indeed I missed this part and description of "skb_tx_timestamp" which
clearly directs to use it earlier:
=======
* skb_tx_timestamp() - Driver hook for transmit timestamping
*
* Ethernet MAC Drivers should call this function in their hard_xmit()
* function immediately before giving the sk_buff to the MAC hardware.
=======
-Alexey
next prev parent reply other threads:[~2013-12-20 14:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 1:58 [PATCH] arc_emac: fix Eric Dumazet
2013-12-20 2:05 ` Eric Dumazet
2013-12-20 2:10 ` [PATCH v2] arc_emac: fix potential use after free Eric Dumazet
2013-12-20 14:06 ` Alexey Brodkin [this message]
2013-12-27 18:05 ` 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=1387548366.32574.5.camel@abrodkin-8560l \
--to=alexey.brodkin@synopsys.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.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