[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+NfFLHDthLC-=+vWV6fFSqddVqhnAWE_+mHRD9nQsNyw@mail.gmail.com>
Date: Tue, 28 May 2019 06:31:00 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net-next 11/11] inet: frags: rework rhashtable dismantle
On Mon, May 27, 2019 at 11:34 PM Herbert Xu <herbert@...dor.apana.org.au> wrote:
>
> Hi Eric:
>
> Eric Dumazet <edumazet@...gle.com> wrote:
> >
> > +void fqdir_exit(struct fqdir *fqdir)
> > +{
> > + fqdir->high_thresh = 0; /* prevent creation of new frags */
> > +
> > + /* paired with READ_ONCE() in inet_frag_kill() :
> > + * We want to prevent rhashtable_remove_fast() calls
> > + */
> > + smp_store_release(&fqdir->dead, true);
> > +
> > + INIT_RCU_WORK(&fqdir->destroy_rwork, fqdir_rwork_fn);
> > + queue_rcu_work(system_wq, &fqdir->destroy_rwork);
> > +
> > +}
>
> What is the smp_store_release supposed to protect here? If it's
> meant to separate the setting of dead and the subsequent destruction
> work then it doesn't work because the barrier only protects the code
> preceding it, not after.
>
This smp_store_release() is a left over of the first version of the patch, where
there was no rcu grace period enforcement.
I do not believe there is harm letting this, but if you disagree
please send a patch ;)
Thanks
Powered by blists - more mailing lists