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-- 10.4 KB
Makefile -rw-r--r-- 1.4 KB
ath3k.c -rw-r--r-- 15.9 KB
bcm203x.c -rw-r--r-- 6.7 KB
bfusb.c -rw-r--r-- 15.6 KB
bluecard_cs.c -rw-r--r-- 20.0 KB
bpa10x.c -rw-r--r-- 9.5 KB
bt3c_cs.c -rw-r--r-- 14.7 KB
btbcm.c -rw-r--r-- 13.0 KB
btbcm.h -rw-r--r-- 2.6 KB
btintel.c -rw-r--r-- 13.0 KB
btintel.h -rw-r--r-- 4.1 KB
btmrvl_debugfs.c -rw-r--r-- 6.5 KB
btmrvl_drv.h -rw-r--r-- 5.1 KB
btmrvl_main.c -rw-r--r-- 18.1 KB
btmrvl_sdio.c -rw-r--r-- 39.9 KB
btmrvl_sdio.h -rw-r--r-- 3.3 KB
btqca.c -rw-r--r-- 9.8 KB
btqca.h -rw-r--r-- 3.0 KB
btqcomsmd.c -rw-r--r-- 4.2 KB
btrtl.c -rw-r--r-- 11.8 KB
btrtl.h -rw-r--r-- 1.1 KB
btsdio.c -rw-r--r-- 8.1 KB
btuart_cs.c -rw-r--r-- 13.9 KB
btusb.c -rw-r--r-- 82.3 KB
btwilink.c -rw-r--r-- 8.5 KB
dtl1_cs.c -rw-r--r-- 12.4 KB
hci_ag6xx.c -rw-r--r-- 7.8 KB
hci_ath.c -rw-r--r-- 5.6 KB
hci_bcm.c -rw-r--r-- 19.6 KB
hci_bcsp.c -rw-r--r-- 18.8 KB
hci_h4.c -rw-r--r-- 5.6 KB
hci_h5.c -rw-r--r-- 16.1 KB
hci_intel.c -rw-r--r-- 31.0 KB
hci_ldisc.c -rw-r--r-- 18.9 KB
hci_ll.c -rw-r--r-- 11.8 KB
hci_mrvl.c -rw-r--r-- 8.6 KB
hci_qca.c -rw-r--r-- 23.7 KB
hci_uart.h -rw-r--r-- 4.9 KB
hci_vhci.c -rw-r--r-- 8.0 KB

back to top