commit | b4ecc259657c019f07e3142f5d2c162d2581a174 | [log] [tgz] |
---|---|---|
author | Miaohe Lin <[email protected]> | Tue Jan 12 15:49:18 2021 -0800 |
committer | Greg Kroah-Hartman <[email protected]> | Tue Jan 19 18:27:21 2021 +0100 |
tree | 79e0406a11bfc3dc4858f2236a7977af212ee586 | |
parent | 33dbd5422c886eda939d092c5469537ce7b125b0 [diff] |
mm/vmalloc.c: fix potential memory leak commit c22ee5284cf58017fa8c6d21d8f8c68159b6faab upstream. 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/[email protected] Fixes: b944afc9d64d ("mm: add a VM_MAP_PUT_PAGES flag for vmap") Signed-off-by: Shijie Luo <[email protected]> Signed-off-by: Miaohe Lin <[email protected]> Reviewed-by: Uladzislau Rezki (Sony) <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>