diff options
author | Alistair Popple <apopple@nvidia.com> | 2022-12-02 15:53:39 +1100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-12-11 18:12:18 -0800 |
commit | 675eaca1f441acd4f0d403d71036b100cd49036a (patch) | |
tree | 2bca8186188b04dcf326d50d6b713afb6e0a6a72 /mm/vmscan.c | |
parent | 1bda9dad5aa0199c8592bac32b91afbf8ea236ff (diff) |
mm/mmap: properly unaccount memory on mas_preallocate() failure
security_vm_enough_memory_mm() accounts memory via a call to
vm_acct_memory(). Therefore any subsequent failures should unaccount for
this memory prior to returning the error.
Link: https://lkml.kernel.org/r/20221202045339.2999017-1-apopple@nvidia.com
Fixes: 28c5609fb236 ("mm/mmap: preallocate maple nodes for brk vma expansion")
Signed-off-by: Alistair Popple <apopple@nvidia.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
0 files changed, 0 insertions, 0 deletions