summaryrefslogtreecommitdiff
path: root/mm/mlock.c
diff options
context:
space:
mode:
authorAlexander Polakov <apolyakov@beget.ru>2016-10-27 17:46:27 -0700
committerSasha Levin <alexander.levin@verizon.com>2016-11-23 20:59:49 -0500
commit55a2f87cd5642a68b19c4bea8fdce8bf2a84228e (patch)
treef97b5d158f2dfcd3d4b2bd129f9d30189458f2ad /mm/mlock.c
parent52e7b6bd8378b1b194ad35a27a185dffa6fb4066 (diff)
downloadlinux-exynos-55a2f87cd5642a68b19c4bea8fdce8bf2a84228e.tar.gz
linux-exynos-55a2f87cd5642a68b19c4bea8fdce8bf2a84228e.tar.bz2
linux-exynos-55a2f87cd5642a68b19c4bea8fdce8bf2a84228e.zip
mm/list_lru.c: avoid error-path NULL pointer deref
[ Upstream commit 1bc11d70b5db7c6bb1414b283d7f09b1fe1ac0d0 ] As described in https://bugzilla.kernel.org/show_bug.cgi?id=177821: After some analysis it seems to be that the problem is in alloc_super(). In case list_lru_init_memcg() fails it goes into destroy_super(), which calls list_lru_destroy(). And in list_lru_init() we see that in case memcg_init_list_lru() fails, lru->node is freed, but not set NULL, which then leads list_lru_destroy() to believe it is initialized and call memcg_destroy_list_lru(). memcg_destroy_list_lru() in turn can access lru->node[i].memcg_lrus, which is NULL. [akpm@linux-foundation.org: add comment] Signed-off-by: Alexander Polakov <apolyakov@beget.ru> Acked-by: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'mm/mlock.c')
0 files changed, 0 insertions, 0 deletions