From: Florian Fainelli <f.fainelli@gmail.com>
To: Alexander Kochetkov <al.kochet@gmail.com>,
David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
edumazet@google.com
Subject: Re: [PATCH] net: arc_emac: fix arc_emac_rx() error paths
Date: Tue, 19 Dec 2017 10:33:35 -0800 [thread overview]
Message-ID: <9170e5bb-4765-a4dd-9d85-e44791877ea1@gmail.com> (raw)
In-Reply-To: <BAD7D613-6D0E-462C-89AC-E8839F28544D@gmail.com>
On 12/19/2017 07:49 AM, Alexander Kochetkov wrote:
>
>> 19 дек. 2017 г., в 18:22, David Miller <davem@davemloft.net> написал(а):
>>
>> From: Alexander Kochetkov <al.kochet@gmail.com>
>> Date: Fri, 15 Dec 2017 20:20:06 +0300
>>
>>> arc_emac_rx() has some issues found by code review.
>>>
>>> In case netdev_alloc_skb_ip_align() or dma_map_single() failure
>>> rx fifo entry will not be returned to EMAC.
>>>
>>> In case dma_map_single() failure previously allocated skb became
>>> lost to driver. At the same time address of newly allocated skb
>>> will not be provided to EMAC.
>>>
>>> Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
>>
>> This patch adds quite a few bugs, here is one which shows this is not
>> functionally tested:
>
> May be I don’t understand correctly, but I don’t see bug here.
>
> Wrong dma mapping usage should immediately manifest itself (kernel
> instability, koops and so on). The patch was tested on rk3188 and work fine for me.
> Also I did simulations of netdev_alloc_skb_ip_align() and dma_map_single()
> faults and can confirm that new error handling work.
>
> Could someone else with ARC EMAC test the patch? I would be very grateful for the help.
> Florian or Eric, can you test it on your hardware?
I don't actually have access to this hardware, the only change I did to
this driver was to use a standard Device Tree property :)
--
Florian
prev parent reply other threads:[~2017-12-19 18:33 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
2017-12-19 18:33 ` Florian Fainelli [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=9170e5bb-4765-a4dd-9d85-e44791877ea1@gmail.com \
--to=f.fainelli@gmail.com \
--cc=al.kochet@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.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
Powered by JetHome