Thread (28 messages) 28 messages, 7 authors, 2019-06-07

Re: [PATCH net-next 11/11] inet: frags: rework rhashtable dismantle

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2019-05-28 06:34:10

Hi Eric:

Eric Dumazet [off-list ref] 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.

Thanks,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help