]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
um: Fix potential integer overflow during physmem setup
authorTiwei Bie <tiwei.btw@antgroup.com>
Mon, 16 Sep 2024 04:59:48 +0000 (12:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:19 +0000 (19:51 +0100)
commit1bd118c5f887802cef2d9ba0d1917258667f1cae
tree6802da806f8bb7cecca232f670903d016b3eef85
parentf5872a2a84ec889d0a8f264d3ed0936670860479
um: Fix potential integer overflow during physmem setup

[ Upstream commit a98b7761f697e590ed5d610d87fa12be66f23419 ]

This issue happens when the real map size is greater than LONG_MAX,
which can be easily triggered on UML/i386.

Fixes: fe205bdd1321 ("um: Print minimum physical memory requirement")
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20240916045950.508910-3-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/um/kernel/physmem.c