Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tile: handle pgtable_page_ctor() fail

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Kirill A. Shutemov and committed by
Linus Torvalds
76b3aec3 1ae9ae5f

+5 -1
+5 -1
arch/tile/mm/pgtable.c
··· 241 241 if (p == NULL) 242 242 return NULL; 243 243 244 + if (!pgtable_page_ctor(p)) { 245 + __free_pages(p, L2_USER_PGTABLE_ORDER); 246 + return NULL; 247 + } 248 + 244 249 /* 245 250 * Make every page have a page_count() of one, not just the first. 246 251 * We don't use __GFP_COMP since it doesn't look like it works ··· 256 251 inc_zone_page_state(p+i, NR_PAGETABLE); 257 252 } 258 253 259 - pgtable_page_ctor(p); 260 254 return p; 261 255 } 262 256