From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: "David S.Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@lists.codethink.co.uk,
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>,
Mitsuhiro Kimura <mitsuhiro.kimura.kc@renesas.com>,
Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>,
Yoshihiro Kaneko <ykaneko0929@gmail.com>
Subject: Re: [PATCH net 4/4] sh_eth: Fix serialisation of interrupt disable with interrupt & NAPI handlers
Date: Thu, 22 Jan 2015 19:35:06 +0300 [thread overview]
Message-ID: <54C126BA.4030807@cogentembedded.com> (raw)
In-Reply-To: <1421939177.1222.298.camel@xylophone.i.decadent.org.uk>
Hello.
On 01/22/2015 06:06 PM, Ben Hutchings wrote:
>>> In order to stop the RX path accessing the RX ring while it's being
>>> stopped or resized, we clear the interrupt mask (EESIPR) and then call
>>> free_irq() or synchronise_irq(). This is insufficient because the
>>> interrupt handler or NAPI poller may set EESIPR again after we clear
>>> it.
>> Hm, how come the interrupt handler gets called when we have disabled all
>> interrupts?
> It may be running on another processor and racing with the function that
> clears EESIPR.
Ah, I didn't think about SMP... but then we need more spinlock protection
instead, no?
>> Is it unmaskable EESR.ECI interrupt? BTW, I'm not seeing where the
>> interrupt handler enables interrupts again; only NAPI poller does that AFAIK.
> Normally it only clears EESR_RX_CHECK, but as it cannot atomically clear
> a single bit of EESIPR this can result in setting other bits.
This is again only possible on SMP kernel, right?
[...]
> Ben.
WBR, Sergei
next prev parent reply other threads:[~2015-01-22 16:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 12:38 [PATCH net 0/4] Fixes for sh_eth #2 Ben Hutchings
2015-01-22 12:40 ` [PATCH net 1/4] sh_eth: Fix padding of short frames on TX Ben Hutchings
2015-01-22 12:40 ` [PATCH net 2/4] sh_eth: Detach net device when stopping queue to resize DMA rings Ben Hutchings
2015-01-22 12:41 ` [PATCH net 3/4] sh_eth: Fix crash or memory leak when resizing rings on device that is down Ben Hutchings
2015-01-22 12:44 ` [PATCH net 4/4] sh_eth: Fix serialisation of interrupt disable with interrupt & NAPI handlers Ben Hutchings
2015-01-22 13:50 ` Sergei Shtylyov
2015-01-22 15:06 ` Ben Hutchings
2015-01-22 16:35 ` Sergei Shtylyov [this message]
2015-01-22 17:59 ` Ben Hutchings
2015-01-27 0:13 ` [PATCH net 0/4] Fixes for sh_eth #2 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=54C126BA.4030807@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=ben.hutchings@codethink.co.uk \
--cc=davem@davemloft.net \
--cc=hisashi.nakamura.ak@renesas.com \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=mitsuhiro.kimura.kc@renesas.com \
--cc=netdev@vger.kernel.org \
--cc=nobuhiro.iwamatsu.yj@renesas.com \
--cc=ykaneko0929@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;
as well as URLs for NNTP newsgroup(s).