Thread (90 messages) flat view 90 messages, 12 authors, 2021-06-20

Re: [PATCH 5/8] membarrier, kthread: Use _ONCE accessors for task->mm

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: 2021-06-16 18:08:36
Also in: lkml

----- On Jun 15, 2021, at 11:21 PM, Andy Lutomirski luto@kernel.org wrote:
membarrier reads cpu_rq(remote cpu)->curr->mm without locking.  Use
READ_ONCE() and WRITE_ONCE() to remove the data races.
I notice that kernel/exit.c:exit_mm() also has:

        current->mm = NULL;

I suspect you may want to add a WRITE_ONCE() there as well ?

Thanks,

Mathieu


-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help