Thread (26 messages) 26 messages, 3 authors, 20d ago

Re: [PATCH v2 net-next 01/11] bridge: add a READ_ONCE() in br_timer_value()

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: 2026-06-03 07:42:14

On 03/06/2026 09:20, Eric Dumazet wrote:
quoted hunk ↗ jump to hunk
br_timer_value() can be called locklessly, the expires field
could be changed concurrently.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
---
  net/bridge/br_stp_timer.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c
index e5d453305381baa34225a144ac99e98f2a62d810..83cc9c6a3943508eb94d20ddc1b7e737a58d7abb 100644
--- a/net/bridge/br_stp_timer.c
+++ b/net/bridge/br_stp_timer.c
@@ -160,5 +160,5 @@ void br_stp_port_timer_init(struct net_bridge_port *p)
  unsigned long br_timer_value(const struct timer_list *timer)
  {
  	return timer_pending(timer)
-		? jiffies_delta_to_clock_t(timer->expires - jiffies) : 0;
+		? jiffies_delta_to_clock_t(READ_ONCE(timer->expires) - jiffies) : 0;
  }
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help