diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-11-29 13:04:52 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-29 13:04:52 -0800 |
commit | f2bb566f5c977ff010baaa9e5e14d9a75b06e5f2 (patch) | |
tree | 6359cc9169bd06bfb8b757a534c82886df605b71 /net/sched/act_ct.c | |
parent | 7a945ce0c19bbdf821d5f7ce1515e7fb8e444465 (diff) | |
parent | 01f856ae6d0ca5ad0505b79bf2d22d7ca439b2a1 (diff) | |
download | linux-f2bb566f5c977ff010baaa9e5e14d9a75b06e5f2.tar.gz linux-f2bb566f5c977ff010baaa9e5e14d9a75b06e5f2.tar.bz2 linux-f2bb566f5c977ff010baaa9e5e14d9a75b06e5f2.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
tools/lib/bpf/ringbuf.c
927cbb478adf ("libbpf: Handle size overflow for ringbuf mmap")
b486d19a0ab0 ("libbpf: checkpatch: Fixed code alignments in ringbuf.c")
https://lore.kernel.org/all/20221121122707.44d1446a@canb.auug.org.au/
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/sched/act_ct.c')
-rw-r--r-- | net/sched/act_ct.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c index da0b7f665277..dd5ae7551956 100644 --- a/net/sched/act_ct.c +++ b/net/sched/act_ct.c @@ -179,7 +179,7 @@ static void tcf_ct_flow_table_add_action_meta(struct nf_conn *ct, entry = tcf_ct_flow_table_flow_action_get_next(action); entry->id = FLOW_ACTION_CT_METADATA; #if IS_ENABLED(CONFIG_NF_CONNTRACK_MARK) - entry->ct_metadata.mark = ct->mark; + entry->ct_metadata.mark = READ_ONCE(ct->mark); #endif ctinfo = dir == IP_CT_DIR_ORIGINAL ? IP_CT_ESTABLISHED : IP_CT_ESTABLISHED_REPLY; @@ -955,9 +955,9 @@ static void tcf_ct_act_set_mark(struct nf_conn *ct, u32 mark, u32 mask) if (!mask) return; - new_mark = mark | (ct->mark & ~(mask)); - if (ct->mark != new_mark) { - ct->mark = new_mark; + new_mark = mark | (READ_ONCE(ct->mark) & ~(mask)); + if (READ_ONCE(ct->mark) != new_mark) { + WRITE_ONCE(ct->mark, new_mark); if (nf_ct_is_confirmed(ct)) nf_conntrack_event_cache(IPCT_MARK, ct); } |