From: Andrea Arcangeli <aarcange@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, zhong jiang <zhongjiang@huawei.com>,
syzkaller-bugs@googlegroups.com,
syzbot+cbb52e396df3e565ab02@syzkaller.appspotmail.com,
Mike Rapoport <rppt@linux.vnet.ibm.com>,
Mike Kravetz <mike.kravetz@oracle.com>,
Peter Xu <peterx@redhat.com>, Dmitry Vyukov <dvyukov@google.com>
Subject: [PATCH 0/2] userfaultfd: use RCU to free the task struct when fork fails
Date: Mon, 25 Mar 2019 18:56:34 -0400 [thread overview]
Message-ID: <20190325225636.11635-1-aarcange@redhat.com> (raw)
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(-)
next reply other threads:[~2019-03-25 22:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-25 22:56 Andrea Arcangeli [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190325225636.11635-1-aarcange@redhat.com \
--to=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=peterx@redhat.com \
--cc=rppt@linux.vnet.ibm.com \
--cc=syzbot+cbb52e396df3e565ab02@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=zhongjiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox