]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: gw: synchronize rcu operations before removing gw job entry
authorOliver Hartkopp <socketcan@hartkopp.net>
Fri, 18 Jun 2021 17:36:45 +0000 (19:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:15:40 +0000 (16:15 +0200)
commit2ca519986d38096597556b03674f8c75ff859669
tree2e4181708267455b8dcd7f9518cac8d3a2aa31a7
parenteabe65197876e4a0906eab784f5766c4c76098c7
can: gw: synchronize rcu operations before removing gw job entry

commit fb8696ab14adadb2e3f6c17c18ed26b3ecd96691 upstream.

can_can_gw_rcv() is called under RCU protection, so after calling
can_rx_unregister(), we have to call synchronize_rcu in order to wait
for any RCU read-side critical sections to finish before removing the
kmem_cache entry with the referenced gw job entry.

Link: https://lore.kernel.org/r/20210618173645.2238-1-socketcan@hartkopp.net
Fixes: c1aabdf379bc ("can-gw: add netlink based CAN routing")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/can/gw.c