summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorRunyu Xiao <runyu.xiao@seu.edu.cn>2026-09-08 18:39:24 +0800
committerJakub Kicinski <kuba@kernel.org>2026-09-10 08:46:19 -0700
commite1406330d70e56dd44fa6fbafc86e77e5c80c122 (patch)
tree2291415b8da9eb8dcf3cdc335e1ad07c0b9c785e /scripts/basic/split-include.c
parenta2dc179481d18f6df7274522571b64dd50f31e81 (diff)
downloadlinux-e1406330d70e56dd44fa6fbafc86e77e5c80c122.tar.gz
linux-e1406330d70e56dd44fa6fbafc86e77e5c80c122.zip
net: macb: initialize PTP state before registering clock
gem_ptp_init() registers the PTP clock before initializing bp->tsu_clk_lock and the TSU hardware. Since ptp_clock_register() publishes the PTP character device, userspace may invoke PTP callbacks before the lock and hardware are ready. In addition, gem_ptp_init() is called from both the interface open and resume paths. Reinitializing tsu_clk_lock there can reset the lock while timestamp processing is using it. This race is theoretical and has not been observed in practice. Initialize tsu_clk_lock once during probe and initialize the TSU before registering the PTP clock. Fixes: ab91f0a9b5f4 ("net: macb: Add hardware PTP support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/netdev/20260904030439.3994047-1-runyu.xiao@seu.edu.cn/ Reviewed-by: Théo Lebrun <theo.lebrun@bootlin.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn> Link: https://patch.msgid.link/20260908103924.607033-1-runyu.xiao@seu.edu.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions