mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: al.kochet@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	f.fainelli@gmail.com, edumazet@google.com
Subject: Re: [PATCH] net: arc_emac: fix arc_emac_rx() error paths
Date: Tue, 19 Dec 2017 11:41:00 -0500 (EST)	[thread overview]
Message-ID: <20171219.114100.723259287206961093.davem@davemloft.net> (raw)
In-Reply-To: <BAD7D613-6D0E-462C-89AC-E8839F28544D@gmail.com>

From: Alexander Kochetkov <al.kochet@gmail.com>
Date: Tue, 19 Dec 2017 18:49:48 +0300

>> And then you unmap it.  "addr" is the new DMA mapping, not the old one.
> 
> The old mapping should be unmapped here. It refer to old skb what contains already
> received packet. Because buffer doesn’t belong to EMAC anymore.
> That old mapping point to old skb buffer. And netif_receive_skb() will be
> called for old skb after that.

I misread the code, sorry.  I saw the dma_unmap_addr(xxx, addr) and just
considered 'addr' as the local variable.  It's not, it's in fact the
TX struct member.

Let me look at this some more. ;-)

  reply	other threads:[~2017-12-19 16:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15 17:20 Alexander Kochetkov
2017-12-19 11:03 ` [PATCH v2] net: arc_emac: restart stalled EMAC Alexander Kochetkov
2017-12-19 18:26   ` David Miller
2017-12-19 11:07 ` [PATCH v2] net: arc_emac: fix arc_emac_rx() error paths Alexander Kochetkov
2017-12-19 18:26   ` David Miller
2017-12-19 15:22 ` [PATCH] " David Miller
2017-12-19 15:49   ` Alexander Kochetkov
2017-12-19 16:41     ` David Miller [this message]
2017-12-19 18:33     ` Florian Fainelli

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=20171219.114100.723259287206961093.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=al.kochet@gmail.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®