diff options
| author | David Hildenbrand <[email protected]> | 2023-01-02 17:08:56 +0100 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-01-18 17:12:57 -0800 |
| commit | 997931ce02b72f15c40e742ee035ce5643ba574f (patch) | |
| tree | 1e144b743cb0dcceabb92be8662b668372541ebf /include/linux | |
| parent | b6b7a8faf05c709cd9f63d3b7d9c66bd91bc3b0d (diff) | |
drivers/misc/open-dice: don't touch VM_MAYSHARE
A MAP_SHARED mapping always has VM_MAYSHARE set, and writable
(VM_MAYWRITE) MAP_SHARED mappings have VM_SHARED set as well. To identify
a MAP_SHARED mapping, it's sufficient to look at VM_MAYSHARE.
We cannot have VM_MAYSHARE|VM_WRITE mappings without having VM_SHARED set.
Consequently, current code will never actually end up clearing
VM_MAYSHARE and that code is confusing, because nobody is supposed to mess
with VM_MAYWRITE.
Let's clean it up and restructure the code. No functional change intended.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: David Hildenbrand <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Nicolas Pitre <[email protected]>
Cc: Pavel Begunkov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions