From: David Miller <davem@davemloft.net>
To: ben@decadent.org.uk
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-2.6] 3c59x: Remove incorrect locking; correct documented lock hierarchy
Date: Wed, 01 Sep 2010 14:38:15 -0700 (PDT) [thread overview]
Message-ID: <20100901.143815.215547115.davem@davemloft.net> (raw)
In-Reply-To: <1283213733.7653.180.camel@localhost>
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 31 Aug 2010 01:15:33 +0100
> vortex_ioctl() was grabbing vortex_private::lock around its call to
> generic_mii_ioctl(). This is no longer necessary since there are more
> specific locks which the mdio_{read,write}() functions will obtain.
> Worse, those functions do not save and restore IRQ flags when locking
> the MII state, so interrupts will be enabled when generic_mii_ioctl()
> returns.
>
> Since there is currently no need for any function to call
> mdio_{read,write}() while holding another spinlock, do not change them
> to save and restore IRQ flags but remove the specification of ordering
> between vortex_private::lock and vortex_private::mii_lock.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> I've now borrowed a card to test 3c59x on. I've seen another regression
> reported <http://bugs.debian.org/586967> after my locking changes, which
> I can't reproduce.
I think the lock is necessary, in some form.
Nothing otherwise protects vp->mii, which is accessed and modified by
not just this ioctl, but also ethtool operation calls.
So we can't apply your patch as-is.
next prev parent reply other threads:[~2010-09-01 21:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 0:15 [PATCH net-2.6] 3c59x: Remove incorrect locking; correct documented lock hierarchy Ben Hutchings
2010-09-01 21:38 ` David Miller [this message]
2010-09-01 21:47 ` Ben Hutchings
2010-09-01 22:08 ` Ben Hutchings
2010-09-02 0:37 ` David Miller
2010-09-02 0:42 ` Ben Hutchings
2010-09-02 1:02 ` 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=20100901.143815.215547115.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ben@decadent.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).