lkml.org 
[lkml]   [2022]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH bpf-next v3 4/5] bpf: Add support for writing to nf_conn:mark
On Sat, 20 Aug 2022 at 01:46, Kumar Kartikeya Dwivedi <memxor@gmail.com> wrote:
>
> CPU 0 CPU 1
> sa = READ_ONCE(nf_ct_bsa);
>
> delete_module("nf_conntrack", ..);
>
> WRITE_ONCE(nf_ct_bsa, NULL);
> // finishes
> successfully
> if (sa)
> return sa(...); // oops
>

Ew, I completely screwed it up. Not trying again.

CPU 0 does:
sa = READ_ONCE(nf_ct_bsa);
then CPU 1 does:
delete_module("nf_conntrack", ...);
WRITE_ONCE(nf_ct_bsa, NULL);
then CPU 0 does:
if (sa) sa(...); // bad

\
 
 \ /
  Last update: 2022-08-20 01:55    [W:0.072 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site