Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers/base/memory.c: prohibit offlining of memory blocks with missi…
…ng sections Commit bdee237 ("x86: mm: Use 2GB memory block size on large-memory x86-64 systems") and 982792c ("x86, mm: probe memory block size for generic x86 64bit") introduced large block sizes for x86. This made it possible to have multiple sections per memory block where previously, there was a only every one section per block. Since blocks consist of contiguous ranges of section, there can be holes in the blocks where sections are not present. If one attempts to offline such a block, a crash occurs since the code is not designed to deal with this. This patch is a quick fix to gaurd against the crash by not allowing blocks with non-present sections to be offlined. Addresses https://bugzilla.kernel.org/show_bug.cgi?id=107781 Signed-off-by: Seth Jennings <[email protected]> Reported-by: Andrew Banman <[email protected]> Cc: Daniel J Blueman <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Greg KH <[email protected]> Cc: Russ Anderson <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information