From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Frank <Frank.Sae@motor-comm.com>,
Peter Geis <pgwipeout@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
yinghong.zhang@motor-comm.com, fei.zhang@motor-comm.com,
hua.sun@motor-comm.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy
Date: Wed, 30 Nov 2022 17:33:15 +0000 [thread overview]
Message-ID: <Y4eT25bT7T8W6UXW@shell.armlinux.org.uk> (raw)
In-Reply-To: <Y4eOkiaRywaUJa9n@lunn.ch>
Hi Andrew,
On Wed, Nov 30, 2022 at 06:10:42PM +0100, Andrew Lunn wrote:
> This is not the first time Russell has pointed out your locking is
> wrong.
>
> How about adding a check in functions which should be called with the
> lock taken really do have the lock taken?
They already do:
lockdep_assert_held_once(&bus->mdio_lock);
but I guess people just aren't testing their code with lockdep enabled.
The only other thing I can think of trying is to use mutex_trylock():
if (WARN_ON_ONCE(mutex_trylock(&bus->mdio_lock)))
mutex_unlock(&bus->mdio_lock);
scattered throughout.
However, if the author does have lockdep enabled but ignores the
warnings, that isn't going to help.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2022-11-30 17:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 9:49 [PATCH net-next] net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy Frank
2022-11-30 9:55 ` Russell King (Oracle)
2022-11-30 17:10 ` Andrew Lunn
2022-11-30 17:33 ` Russell King (Oracle) [this message]
2022-11-30 18:19 ` Andrew Lunn
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=Y4eT25bT7T8W6UXW@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=Frank.Sae@motor-comm.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fei.zhang@motor-comm.com \
--cc=hkallweit1@gmail.com \
--cc=hua.sun@motor-comm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pgwipeout@gmail.com \
--cc=yinghong.zhang@motor-comm.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.