linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] userfaultfd: use RCU to free the task struct when fork fails
@ 2019-03-25 22:56 Andrea Arcangeli
  2019-03-25 22:56 ` [PATCH 1/2] " Andrea Arcangeli
  2019-03-25 22:56 ` [PATCH 2/2] mm: change mm_update_next_owner() to update mm->owner with WRITE_ONCE Andrea Arcangeli
  0 siblings, 2 replies; 13+ messages in thread
From: Andrea Arcangeli @ 2019-03-25 22:56 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, zhong jiang, syzkaller-bugs,
	syzbot+cbb52e396df3e565ab02, Mike Rapoport, Mike Kravetz,
	Peter Xu, Dmitry Vyukov

Hello,

this fixes a race condition between memcg and UFFD_EVENT_FORK that was
reproduced on aarch64 with qemu with syzkaller.

While at it I also added more WRITE_ONCE in places that shall use it
(in theory) against the rcu_deferenfence issued in the in
rcu_read_lock critical section.

Andrea Arcangeli (2):
  userfaultfd: use RCU to free the task struct when fork fails
  mm: change mm_update_next_owner() to update mm->owner with WRITE_ONCE

 kernel/exit.c |  6 +++---
 kernel/fork.c | 34 ++++++++++++++++++++++++++++++++--
 2 files changed, 35 insertions(+), 5 deletions(-)


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-04-29 21:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-25 22:56 [PATCH 0/2] userfaultfd: use RCU to free the task struct when fork fails Andrea Arcangeli
2019-03-25 22:56 ` [PATCH 1/2] " Andrea Arcangeli
2019-03-26  8:07   ` Kirill Tkhai
2019-03-26  8:18     ` Kirill Tkhai
2019-03-26  8:19       ` Kirill Tkhai
2019-03-26  8:56   ` Michal Hocko
2019-03-27  0:16     ` Andrea Arcangeli
2019-03-27  8:49       ` Michal Hocko
2019-04-26  4:48         ` Andrew Morton
2019-04-29  3:57         ` [PATCH 1/1 v2] " Andrea Arcangeli
2019-04-29  6:36           ` zhong jiang
2019-04-29 14:37             ` Andrea Arcangeli
2019-03-25 22:56 ` [PATCH 2/2] mm: change mm_update_next_owner() to update mm->owner with WRITE_ONCE Andrea Arcangeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox