From: Chris Metcalf Date: Tue, 8 Sep 2015 22:02:12 +0000 (-0700) Subject: bootmem: avoid freeing to bootmem after bootmem is done X-Git-Tag: omap-for-v4.3/fixes-rc1~54^2~61 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b4ace4141db1ddc46f6c9915086dd5e18d7154d;p=pandora-kernel.git bootmem: avoid freeing to bootmem after bootmem is done Bootmem isn't popular any more, but some architectures still use it, and freeing to bootmem after calling free_all_bootmem_core() can end up scribbling over random memory. Instead, make sure the kernel generates a warning in this case by ensuring the node_bootmem_map field is non-NULL when are freeing or marking bootmem. An instance of this bug was just fixed in the tile architecture ("tile: use free_bootmem_late() for initrd") and catching this case more widely seems like a good thing. Signed-off-by: Chris Metcalf Acked-by: Mel Gorman Cc: Yasuaki Ishimatsu Cc: Pekka Enberg Cc: Paul McQuade Cc: Tang Chen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed