diff options
| author | Miaohe Lin <[email protected]> | 2022-03-22 21:44:56 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2022-03-22 22:57:07 +0000 |
| commit | 5c2a956c3eea173b2bc89f632507c0eeaebf6c4a (patch) | |
| tree | 8bf905d8e1f63679182309b8679b82bdeec54882 /mm/sparse-vmemmap.c | |
| parent | mm, fault-injection: declare should_fail_alloc_page() (diff) | |
| download | kernel-5c2a956c3eea173b2bc89f632507c0eeaebf6c4a.tar.gz kernel-5c2a956c3eea173b2bc89f632507c0eeaebf6c4a.zip | |
mm/mlock: fix potential imbalanced rlimit ucounts adjustment
user_shm_lock forgets to set allowed to 0 when get_ucounts fails. So
the later user_shm_unlock might do the extra dec_rlimit_ucounts. Fix
this by resetting allowed to 0.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: d7c9e99aee48 ("Reimplement RLIMIT_MEMLOCK on top of ucounts")
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Acked-by: Hugh Dickins <[email protected]>
Cc: Herbert van den Bergh <[email protected]>
Cc: Chris Mason <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'mm/sparse-vmemmap.c')
0 files changed, 0 insertions, 0 deletions
