memblock: memblock should be able to handle zero length operations
Commit 24aa0788 ("memblock, x86: Replace memblock_x86_reserve/ free_range() with generic ones") replaced x86 specific memblock operations with the generic ones; unfortunately, it lost zero length operation handling in the process making the kernel panic if somebody tries to reserve zero length area. There isn't much to be gained by being cranky to zero length operations and panicking is almost the worst response. Drop the BUG_ON() in memblock_reserve() and update memblock_add_region/isolate_range() so that all zero length operations are handled as noops. Signed-off-by: NTejun Heo <tj@kernel.org> Cc: stable@vger.kernel.org Reported-by: NValere Monseur <valere.monseur@ymail.com> Bisected-by: NJoseph Freeman <jfree143dev@gmail.com> Tested-by: NJoseph Freeman <jfree143dev@gmail.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43098Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Showing
想要评论请 注册 或 登录