Message ID | 20200329021250.8PmoLdGwm%akpm@linux-foundation.org |
---|---|
State | Superseded |
Headers | show |
Series | [folded-merged] mm-sparse-fix-kernel-crash-with-pfn_section_valid-check-v2.patch removed from -mm tree | expand |
--- a/mm/sparse.c~mm-sparse-fix-kernel-crash-with-pfn_section_valid-check-v2 +++ a/mm/sparse.c @@ -781,7 +781,11 @@ static void section_deactivate(unsigned ms->usage = NULL; } memmap = sparse_decode_mem_map(ms->section_mem_map, section_nr); - /* Mark the section invalid */ + /* + * Mark the section invalid so that valid_section() + * return false. This prevents code from dereferencing + * ms->usage array. + */ ms->section_mem_map &= ~SECTION_HAS_MEM_MAP; }