[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aIeEr0ScB32ysLPu@hoboy.vegasvil.org>
Date: Mon, 28 Jul 2025 07:09:51 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Jeongjun Park <aha310510@...il.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, yangbo.lu@....com,
vladimir.oltean@....com, anna-maria@...utronix.de,
frederic@...nel.org, tglx@...utronix.de, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
syzbot+7cfb66a237c4a5fb22ad@...kaller.appspotmail.com
Subject: Re: [PATCH net v4] ptp: prevent possible ABBA deadlock in
ptp_clock_freerun()
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@...kaller.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@...il.com>
Acked-by: Richard Cochran <richardcochran@...il.com>
Powered by blists - more mailing lists