From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Kurt Kanzenbach <kurt@linutronix.de>
Cc: "Richard Cochran" <richardcochran@gmail.com>,
"Yangbo Lu" <yangbo.lu@nxp.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Íñigo Huguet" <ihuguet@redhat.com>,
"Miroslav Lichvar" <mlichvar@redhat.com>,
"Blanco Alcaine Hector" <hector.blanco.alcaine@intel.com>,
"Christopher S. Hall" <christopher.s.hall@intel.com>,
"Florian Zeitz" <florian.zeitz@schettke.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2] ptp: vclock: Switch from RCU to SRCU
Date: Fri, 29 May 2026 19:39:43 +0200 [thread overview]
Message-ID: <20260529173943.9aedelBp@linutronix.de> (raw)
In-Reply-To: <20260529-vclock_rcu-v2-1-02a5531fab92@linutronix.de>
On 2026-05-29 19:11:47 [+0200], Kurt Kanzenbach wrote:
> The usage of PTP vClocks leads immediately to the following issues with
> ptp4l with LOCKDEP and DEBUG_ATOMIC_SLEEP enabled: "BUG: sleeping function
> called from invalid context".
>
> ptp_convert_timestamp() acquires a mutex_t within a RCU read section. This
> is illegal, because acquiring a mutex_t can result in voluntary scheduling
> request which is not allowed within a RCU read section.
>
> Replace the RCU usage with SRCU where sleeping is allowed.
>
> Reported-by: Florian Zeitz <florian.zeitz@schettke.com>
> Closes: https://lore.kernel.org/all/00a8cce8-410e-4038-98af-49be6d93d7bd@schettke.com/
> Fixes: 67d93ffc0f3c ("ptp: vclock: use mutex to fix "sleep on atomic" bug")
> Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Sebastian
prev parent reply other threads:[~2026-05-29 17:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 17:11 [PATCH net v2] ptp: vclock: Switch from RCU to SRCU Kurt Kanzenbach
2026-05-29 17:39 ` Sebastian Andrzej Siewior [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=20260529173943.9aedelBp@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=andrew+netdev@lunn.ch \
--cc=christopher.s.hall@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.zeitz@schettke.com \
--cc=hector.blanco.alcaine@intel.com \
--cc=ihuguet@redhat.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mlichvar@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.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