]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: gw: use call_rcu() instead of costly synchronize_rcu()
authorEric Dumazet <edumazet@google.com>
Mon, 7 Feb 2022 19:07:06 +0000 (11:07 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 May 2025 06:20:35 +0000 (08:20 +0200)
commit3574f537b5b0d45e9b215cd3df60af3d47773123
tree694954599c9b820ce3f668dbcc6b2d90a4d4cb14
parent69aa22df4fdcd7bcea8fa2561240d9004bf97bd2
can: gw: use call_rcu() instead of costly synchronize_rcu()

[ Upstream commit 181d4447905d551cc664f1e7e796b482c1eec992 ]

Commit fb8696ab14ad ("can: gw: synchronize rcu operations
before removing gw job entry") added three synchronize_rcu() calls
to make sure one rcu grace period was observed before freeing
a "struct cgw_job" (which are tiny objects).

This should be converted to call_rcu() to avoid adding delays
in device / network dismantles.

Use the rcu_head that was already in struct cgw_job,
not yet used.

Link: https://lore.kernel.org/all/20220207190706.1499190-1-eric.dumazet@gmail.com
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Stable-dep-of: 511e64e13d8c ("can: gw: fix RCU/BH usage in cgw_create_job()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/can/gw.c