aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport-netdev.c
diff options
context:
space:
mode:
authorOliver Hartkopp <[email protected]>2025-04-29 07:05:55 +0000
committerMarc Kleine-Budde <[email protected]>2025-05-06 13:55:36 +0000
commit511e64e13d8cc72853275832e3f372607466c18c (patch)
tree03cd30775b9d870c23bd9c63ccd42f621f296e65 /net/openvswitch/vport-netdev.c
parentMerge patch series "can: rx-offload: fix order of unregistration calls" (diff)
downloadkernel-511e64e13d8cc72853275832e3f372607466c18c.tar.gz
kernel-511e64e13d8cc72853275832e3f372607466c18c.zip
can: gw: fix RCU/BH usage in cgw_create_job()
As reported by Sebastian Andrzej Siewior the use of local_bh_disable() is only feasible in uni processor systems to update the modification rules. The usual use-case to update the modification rules is to update the data of the modifications but not the modification types (AND/OR/XOR/SET) or the checksum functions itself. To omit additional memory allocations to maintain fast modification switching times, the modification description space is doubled at gw-job creation time so that only the reference to the active modification description is changed under rcu protection. Rename cgw_job::mod to cf_mod and make it a RCU pointer. Allocate in cgw_create_job() and free it together with cgw_job in cgw_job_free_rcu(). Update all users to dereference cgw_job::cf_mod with a RCU accessor and if possible once. [bigeasy: Replace mod1/mod2 from the Oliver's original patch with dynamic allocation, use RCU annotation and accessor] Reported-by: Sebastian Andrzej Siewior <[email protected]> Closes: https://lore.kernel.org/linux-can/[email protected]/ Fixes: dd895d7f21b2 ("can: cangw: introduce optional uid to reference created routing jobs") Tested-by: Oliver Hartkopp <[email protected]> Signed-off-by: Oliver Hartkopp <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
Diffstat (limited to 'net/openvswitch/vport-netdev.c')
0 files changed, 0 insertions, 0 deletions