diff options
author | Lokesh Gidra <lokeshgidra@google.com> | 2024-01-17 14:37:29 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-03-01 13:16:43 +0100 |
commit | 19087d70e9e61d42dc1cdd204a81c5c94bc6eb8f (patch) | |
tree | 478054f9549db75788f23df73b941f87e078bcf0 /fs/zonefs | |
parent | 18d88bf9c2e793efea4fd5930a2723c55b2eae25 (diff) | |
download | linux-stable-19087d70e9e61d42dc1cdd204a81c5c94bc6eb8f.tar.gz linux-stable-19087d70e9e61d42dc1cdd204a81c5c94bc6eb8f.tar.bz2 linux-stable-19087d70e9e61d42dc1cdd204a81c5c94bc6eb8f.zip |
userfaultfd: fix mmap_changing checking in mfill_atomic_hugetlb
commit 67695f18d55924b2013534ef3bdc363bc9e14605 upstream.
In mfill_atomic_hugetlb(), mmap_changing isn't being checked
again if we drop mmap_lock and reacquire it. When the lock is not held,
mmap_changing could have been incremented. This is also inconsistent
with the behavior in mfill_atomic().
Link: https://lkml.kernel.org/r/20240117223729.1444522-1-lokeshgidra@google.com
Fixes: df2cc96e77011 ("userfaultfd: prevent non-cooperative events vs mcopy_atomic races")
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Brian Geffon <bgeffon@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Jann Horn <jannh@google.com>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Nicolas Geoffray <ngeoffray@google.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/zonefs')
0 files changed, 0 insertions, 0 deletions