]> git.baikalelectronics.ru Git - kernel.git/commit
mm/z3fold: fix potential memory leak in z3fold_destroy_pool()
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 1 Jul 2021 01:50:36 +0000 (18:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 1 Jul 2021 03:47:28 +0000 (20:47 -0700)
commit8e18e6b1a4bd94814d40279d8eacfa0eb73da100
treea617a57f322f388ad2f88cec22f2e700bb64ee3b
parent56286c6075e2aa849382a3db1aa67f4515c18267
mm/z3fold: fix potential memory leak in z3fold_destroy_pool()

There is a memory leak in z3fold_destroy_pool() as it forgets to
free_percpu pool->unbuddied.  Call free_percpu for pool->unbuddied to fix
this issue.

Link: https://lkml.kernel.org/r/20210619093151.1492174-6-linmiaohe@huawei.com
Fixes: 3c7cc5004f45 ("z3fold: use per-cpu unbuddied lists")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Vitaly Wool <vitaly.wool@konsulko.com>
Cc: Hillf Danton <hdanton@sina.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/z3fold.c