/* * netsniff-ng - the packet sniffing beast * Copyright 2009, 2010 Daniel Borkmann. * Subject to the GPL, version 2. */ #ifndef TPRINTF_H #define TPRINTF_H #include "built_in.h" #include "colors.h" extern void tprintf_init(void); extern void tprintf(char *msg, ...) __check_format_printf(1, 2); extern void tprintf_flush(void); extern void tprintf_cleanup(void); extern void tputchar_safe(int c); extern void tputs_safe(const char *str, size_t len); #define colorize_start(fore) "\033[" __##fore "m" #define colorize_start_full(fore, back) "\033[" __##fore ";" __on_##back "m" #define colorize_end() "\033[" __reset "m" #define DEFAULT_TTY_SIZE 80 #endif /* TPRINTF_H */ n='2'>cgit logo index : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Polakov <apolyakov@beget.ru>2016-10-27 17:46:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-27 18:43:42 -0700
commit1bc11d70b5db7c6bb1414b283d7f09b1fe1ac0d0 (patch)
tree1b0345597ee77c8a116267bff15919cee540da20
parent21753583056d48a5fad964d6f272e28168426845 (diff)
mm/list_lru.c: avoid error-path NULL pointer deref
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>
Diffstat