From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jann Horn , Davidlohr Bueso , Oleg Nesterov , Christoph Lameter , Kemi Wang , Andy Lutomirski , Ingo Molnar , Andrew Morton , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 4.4 25/25] mm/vmstat.c: fix outdated vmstat_text Date: Tue, 16 Oct 2018 00:16:06 -0400 Message-Id: <20181016041606.135876-25-sashal@kernel.org> In-Reply-To: <20181016041606.135876-1-sashal@kernel.org> References: <20181016041606.135876-1-sashal@kernel.org> List-ID: From: Jann Horn [ Upstream commit 28e2c4bb99aa40f9d5f07ac130cbc4da0ea93079 ] 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") removed the VMACACHE_FULL_FLUSHES statistics, but didn't remove the corresponding entry in vmstat_text. This causes an out-of-bounds access in vmstat_show(). Luckily this only affects kernels with CONFIG_DEBUG_VM_VMACACHE=y, which is probably very rare. Link: http://lkml.kernel.org/r/20181001143138.95119-1-jannh@google.com Fixes: 7a9cdebdcc17 ("mm: get rid of vmacache_flush_all() entirely") Signed-off-by: Jann Horn Reviewed-by: Kees Cook Reviewed-by: Andrew Morton Acked-by: Michal Hocko Acked-by: Roman Gushchin Cc: Davidlohr Bueso Cc: Oleg Nesterov Cc: Christoph Lameter Cc: Kemi Wang Cc: Andy Lutomirski Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- mm/vmstat.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/vmstat.c b/mm/vmstat.c index 8895eff2d735..a2d70ef74db7 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -869,7 +869,6 @@ const char * const vmstat_text[] = { #ifdef CONFIG_DEBUG_VM_VMACACHE "vmacache_find_calls", "vmacache_find_hits", - "vmacache_full_flushes", #endif #endif /* CONFIG_VM_EVENTS_COUNTERS */ }; -- 2.17.1