Displaying 2 results from an estimated 2 matches for "cpu_1".
Did you mean:
cpu_t
2023 May 31
1
[PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression
...; >
> > I don't understand you. OK, to simplify, suppose we have 2 global vars
> >
> > void *PTR = something_non_null;
> > unsigned long FLAGS = -1ul;
> >
> > Now I think this code
> >
> > CPU_0 CPU_1
> >
> > void *ptr = PTR; if (!test_and_set_bit(0, FLAGS))
> > clear_bit(0, FLAGS); PTR = NULL;
> > BUG_ON(!ptr);
> >
> > is racy and can hit the BUG_ON(!ptr).
>
> This seems different to the above ca...
2023 Jun 01
1
[PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression
...tand you. OK, to simplify, suppose we have 2 global vars
> > >
> > > void *PTR = something_non_null;
> > > unsigned long FLAGS = -1ul;
> > >
> > > Now I think this code
> > >
> > > CPU_0 CPU_1
> > >
> > > void *ptr = PTR; if (!test_and_set_bit(0, FLAGS))
> > > clear_bit(0, FLAGS); PTR = NULL;
> > > BUG_ON(!ptr);
> > >
> > > is racy and can hit the BUG_ON(!ptr).
> >
> &...