From: Mugunthan V N <mugunthanvnm@ti.com>
To: Daniel Mack <zonque@gmail.com>, <davem@davemloft.net>
Cc: <julia.lawall@lip6.fr>, <netdev@vger.kernel.org>,
<george.cherian@ti.com>
Subject: Re: [PATCH 1/2] net: ethernet: cpsw: don't claim IRQs with devm_request_irq()
Date: Wed, 3 Sep 2014 12:57:37 +0530 [thread overview]
Message-ID: <5406C2E9.9010903@ti.com> (raw)
In-Reply-To: <1409676245-13897-1-git-send-email-zonque@gmail.com>
On Tuesday 02 September 2014 10:14 PM, Daniel Mack wrote:
> Julia Lawall spotted a problem with aa1a15e ("net: ethernet: cpsw:
> switch to devres allocations") which introduced a race condition in
> cpsw_probe() by removing explicit interrupt disable calls before
> calling free_netdev(). Hence, an interrupt can fire after free_netdev()
> was called. The same problem exists in cpsw_remove().
>
> Fix this by reverting the IRQ part of the aforementioned patch and
> handle those resources explicitly.
>
> Reported-by: Julia Lawall <julia.lawall@lip6.fr>
> Signed-off-by: Daniel Mack <zonque@gmail.com>
CPSW interrupts cannot be triggered as the interrupts are disabled in
priv->wr_regs->tx_en and priv->wr_regs->rx_en inside CPSW module and
these interrupts are enabled only when the device is opened.
In cpsw_remove, CPDMA controller is stopped and interrupts are disabled
in cpsw_ndo_stop(), so there is no chance that an interrupt can occur
during cpsw_remove().
Regards
Mugunthan V N
prev parent reply other threads:[~2014-09-03 7:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 16:44 [PATCH 1/2] net: ethernet: cpsw: don't claim IRQs with devm_request_irq() Daniel Mack
2014-09-02 16:44 ` [PATCH 2/2] net: ethernet: cpsw: fix interrupt lookup logic in cpsw_probe() Daniel Mack
2014-09-03 7:28 ` Mugunthan V N
2014-09-03 7:30 ` Daniel Mack
2014-09-03 8:22 ` Mugunthan V N
2014-09-03 8:23 ` Daniel Mack
2014-09-03 7:27 ` Mugunthan V N [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=5406C2E9.9010903@ti.com \
--to=mugunthanvnm@ti.com \
--cc=davem@davemloft.net \
--cc=george.cherian@ti.com \
--cc=julia.lawall@lip6.fr \
--cc=netdev@vger.kernel.org \
--cc=zonque@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.