https://github.com/torvalds/linux
Revision 1bc11d70b5db7c6bb1414b283d7f09b1fe1ac0d0 authored by Alexander Polakov on 28 October 2016, 00:46:27 UTC, committed by Linus Torvalds on 28 October 2016, 01:43:42 UTC
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>
1 parent 2175358
History
Tip revision: 1bc11d70b5db7c6bb1414b283d7f09b1fe1ac0d0 authored by Alexander Polakov on 28 October 2016, 00:46:27 UTC
mm/list_lru.c: avoid error-path NULL pointer deref
Tip revision: 1bc11d7
File Mode Size
Kconfig -rw-r--r-- 4.9 KB
Makefile -rw-r--r-- 700 bytes
arm_mhu.c -rw-r--r-- 4.4 KB
bcm-pdc-mailbox.c -rw-r--r-- 44.6 KB
bcm2835-mailbox.c -rw-r--r-- 5.9 KB
hi6220-mailbox.c -rw-r--r-- 9.7 KB
mailbox-altera.c -rw-r--r-- 9.2 KB
mailbox-sti.c -rw-r--r-- 13.3 KB
mailbox-test.c -rw-r--r-- 9.2 KB
mailbox-xgene-slimpro.c -rw-r--r-- 7.3 KB
mailbox.c -rw-r--r-- 12.9 KB
mailbox.h -rw-r--r-- 476 bytes
omap-mailbox.c -rw-r--r-- 21.7 KB
pcc.c -rw-r--r-- 16.6 KB
pl320-ipc.c -rw-r--r-- 5.2 KB
platform_mhu.c -rw-r--r-- 5.1 KB
rockchip-mailbox.c -rw-r--r-- 6.9 KB
ti-msgmgr.c -rw-r--r-- 18.3 KB

back to top