summaryrefslogtreecommitdiffstats
path: root/mm/util.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2021-01-12 15:49:18 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-01-12 18:12:54 -0800
commitc22ee5284cf58017fa8c6d21d8f8c68159b6faab (patch)
treee660df31aae31df12f8b2721c4468c8ed7e3c3c0 /mm/util.c
parent29970dc24faf0078beb4efab5455b4f504d2198d (diff)
downloadlinux-c22ee5284cf58017fa8c6d21d8f8c68159b6faab.tar.bz2
mm/vmalloc.c: fix potential memory leak
In VM_MAP_PUT_PAGES case, we should put pages and free array in vfree. But we missed to set area->nr_pages in vmap(). So we would fail to put pages in __vunmap() because area->nr_pages = 0. Link: https://lkml.kernel.org/r/20210107123541.39206-1-linmiaohe@huawei.com Fixes: b944afc9d64d ("mm: add a VM_MAP_PUT_PAGES flag for vmap") Signed-off-by: Shijie Luo <luoshijie1@huawei.com> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/util.c')
0 files changed, 0 insertions, 0 deletions