]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 12 May 2025 09:27:24 +0000 (11:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:31 +0000 (11:05 +0100)
commitc1ee5f16757a23161a7f5fecd4b7bb7778fa6772
tree31262b429d5318331e7fc849e9c3caf754473800
parent97033659fc835e0e6531a0113b14c8394e7ef8a1
ipv4/route: Use this_cpu_inc() for stats on PREEMPT_RT

[ Upstream commit 1c0829788a6e6e165846b9bedd0b908ef16260b6 ]

The statistics are incremented with raw_cpu_inc() assuming it always
happens with bottom half disabled. Without per-CPU locking in
local_bh_disable() on PREEMPT_RT this is no longer true.

Use this_cpu_inc() on PREEMPT_RT for the increment to not worry about
preemption.

Cc: David Ahern <dsahern@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/20250512092736.229935-4-bigeasy@linutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/route.c