Netdev List
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Jeongjun Park <aha310510@gmail.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, yangbo.lu@nxp.com,
	vladimir.oltean@nxp.com, anna-maria@linutronix.de,
	frederic@kernel.org, tglx@linutronix.de, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	syzbot+7cfb66a237c4a5fb22ad@syzkaller.appspotmail.com
Subject: Re: [PATCH net v4] ptp: prevent possible ABBA deadlock in ptp_clock_freerun()
Date: Mon, 28 Jul 2025 07:09:51 -0700	[thread overview]
Message-ID: <aIeEr0ScB32ysLPu@hoboy.vegasvil.org> (raw)
In-Reply-To: <20250728062649.469882-1-aha310510@gmail.com>

On Mon, Jul 28, 2025 at 03:26:49PM +0900, Jeongjun Park wrote:

> However, when unregistering vclocks in n_vclocks_store(), the locking
> ptp->n_vclocks_mux is a physical clock lock, but clk->rwsem of
> ptp_clock_unregister() called through device_for_each_child_reverse()
> is a virtual clock lock.
> 
> Therefore, clk->rwsem used in CPU0 and clk->rwsem used in CPU1 are
> different locks, but in lockdep, a false positive occurs because the
> possibility of deadlock is determined through lock-class.
> 
> To solve this, lock subclass annotation must be added to the posix_clock
> rwsem of the vclock.
> 
> Reported-by: syzbot+7cfb66a237c4a5fb22ad@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=7cfb66a237c4a5fb22ad
> Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion")
> Signed-off-by: Jeongjun Park <aha310510@gmail.com>

Acked-by: Richard Cochran <richardcochran@gmail.com>

  reply	other threads:[~2025-07-28 14:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28  6:26 [PATCH net v4] ptp: prevent possible ABBA deadlock in ptp_clock_freerun() Jeongjun Park
2025-07-28 14:09 ` Richard Cochran [this message]
2025-07-29 15:48 ` Vladimir Oltean
2025-08-05 23:52   ` Jakub Kicinski
2025-08-24  3:23 ` Jeongjun Park

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=aIeEr0ScB32ysLPu@hoboy.vegasvil.org \
    --to=richardcochran@gmail.com \
    --cc=aha310510@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anna-maria@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=frederic@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+7cfb66a237c4a5fb22ad@syzkaller.appspotmail.com \
    --cc=tglx@linutronix.de \
    --cc=vladimir.oltean@nxp.com \
    --cc=yangbo.lu@nxp.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