]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
batman-adv: tp_meter: initialize last_recv_time during init
authorSven Eckelmann <sven@narfation.org>
Thu, 4 Jun 2026 08:58:51 +0000 (10:58 +0200)
committerSven Eckelmann <sven@narfation.org>
Fri, 5 Jun 2026 05:47:37 +0000 (07:47 +0200)
commit811cb00fa8cdc3f0a7f6eefc000a6888367c8c8f
tree171ee0d69a502acd6489ab4d6c764403337d737a
parent626fd14371614b7a8177f79b357fd323a7b91032
batman-adv: tp_meter: initialize last_recv_time during init

The last_recv_time is the most important indicator for a receiver session
to figure out whether a session timed out or not. But this information was
only initialized after the session was added to the tp_receiver_list and
after the timer was started.

In the worst case, the timer (function) could have tried to access this
information before the actual initialization was reached. Like rest of the
variables of the tp_meter receiver session, this field has to be filled out
before any other (parallel running) context has the chance to access it.

Cc: stable@kernel.org
Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
net/batman-adv/tp_meter.c