From: Andrew Morton <akpm@linux-foundation.org>
To: mt4022@columbia.edu
Cc: Mani Tofigh via B4 Relay <devnull+mt4022.columbia.edu@kernel.org>,
Oleg Nesterov <oleg@redhat.com>,
Christian Brauner <brauner@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
tz2294@columbia.edu
Subject: Re: [PATCH] exit: use READ_ONCE() to read mm->owner
Date: Wed, 28 Oct 2026 23:54:04 -0700 [thread overview]
Message-ID: <20261028235404.2a24aa50c06556eaf77a033b@linux-foundation.org> (raw)
In-Reply-To: <20261027-kcsan-exit-v1-1-7c0429a29bc0@columbia.edu>
On Tue, 27 Oct 2026 16:09:23 -0400 Mani Tofigh via B4 Relay <devnull+mt4022.columbia.edu@kernel.org> wrote:
> mm->owner is written with WRITE_ONCE() when ownership moves to another
> task, but mm_update_next_owner() reads it with a plain load. The race
> is expected, so read it with READ_ONCE() to match the writer.
>
> [ 14.915975] BUG: KCSAN: data-race in mm_update_next_owner / try_to_set_owner
>
> [ 14.916154] write (marked) to 0xff11000004471b80 of 8 bytes by task 71 on cpu 0:
> [ 14.916204] try_to_set_owner+0x100/0x140
> [ 14.916302] mm_update_next_owner+0x177/0x300
> ...
>
> [ 14.917246] read to 0xff11000004471b80 of 8 bytes by task 75 on cpu 1:
> [ 14.917293] mm_update_next_owner+0x2a/0x300
> [ 14.917396] do_exit+0x575/0x18b0
> ...
>
> [ 14.923906] value changed: 0xff1100002ec04180 -> 0xff1100002ed3a0c0
>
> Found with KCSAN while fuzzing under a deterministic hypervisor that's
> currently under development.
We don't want older kernels doing this either, so I suggest
Fixes: cf475ad28ac3 ("cgroups: add an owner to the mm_struct")
Cc: <stable$vger.kernel.org>
next prev parent reply other threads:[~2026-10-29 6:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 20:09 Mani Tofigh via B4 Relay
2026-10-27 23:11 ` Bradley Morgan
2026-10-27 23:16 ` Balbir Singh
2026-10-28 14:37 ` Oleg Nesterov
2026-10-29 6:54 ` Andrew Morton [this message]
2026-10-29 15:05 ` Mani Tofigh
2026-10-29 16:38 ` Andrew Morton
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=20261028235404.2a24aa50c06556eaf77a033b@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=devnull+mt4022.columbia.edu@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mt4022@columbia.edu \
--cc=oleg@redhat.com \
--cc=tz2294@columbia.edu \
/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
all inboxes | Powered by JetHome®