summaryrefslogtreecommitdiff
path: root/rust/helpers/clk.c
diff options
context:
space:
mode:
authorWei Fang <wei.fang@nxp.com>2025-09-19 16:45:08 +0800
committerJakub Kicinski <kuba@kernel.org>2025-09-22 11:49:15 -0700
commit26644c90e8fbf99d381d11873c5e8861ef0029d8 (patch)
treed8e7227e23a1a12e468c0175c70ec777099d810d /rust/helpers/clk.c
parent78e87f9d5358a5131191e439ef9a0c9f7c64423f (diff)
net: enetc: fix sleeping function called from rcu_read_lock() context
The rcu_read_lock() has been introduced in __ethtool_get_ts_info() since the commit 4c61d809cf60 ("net: ethtool: Fix suspicious rcu_dereference usage"). Therefore, the device drivers cannot use any sleeping functions when implementing the callback of ethtool_ops::get_ts_info(). Currently, pci_get_slot() is used in enetc_get_ts_info(), but it calls down_read() which might sleep, so this is a potential issue. Therefore, to fix this issue, pci_get_domain_bus_and_slot() is used to replace pci_get_slot() in enetc_get_ts_info(). Reported-by: Vladimir Oltean <vladimir.oltean@nxp.com> Closes: https://lore.kernel.org/netdev/20250918124823.t3xlzn7w2glzkhnx@skbuf/ Fixes: f5b9a1cde0a2 ("net: enetc: add PTP synchronization support for ENETC v4") Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20250919084509.1846513-2-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/helpers/clk.c')
0 files changed, 0 insertions, 0 deletions