Thread (5 messages) 5 messages, 4 authors, 2026-09-10

Re: [PATCH net] net: stmmac: initialize ptp_lock at probe time

flat view

From: patchwork-bot+netdevbpf@kernel.org
Date: 2026-09-10 02:31:07
Also in: linux-arm-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski [off-list ref]:

On Fri, 04 Sep 2026 12:32:55 +0200 you wrote:
priv->ptp_lock is only initialized in stmmac_ptp_register(), which runs
during __stmmac_open(). However, the lock is also used while the
interface is down and has never been opened: tc_taprio_configure()
invokes the PTP gettime64() callback to compute the EST base time when
offloading a TAPRIO schedule, and stmmac_get_time() takes
priv->ptp_lock. Using an uninitialized rwlock is undefined behaviour.
Move the rwlock_init() to __stmmac_dvr_probe(), together with the other
private locks, so that ptp_lock is always valid regardless of the
interface state.

[...]
Here is the summary with links:
  - [net] net: stmmac: initialize ptp_lock at probe time
    https://git.kernel.org/netdev/net/c/0338c68e22ab

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help