]> git.hungrycats.org Git - linux/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>
Thu, 5 Dec 2024 12:54:26 +0000 (13:54 +0100)
commitd1a211e5210d31da8f49fc0021bf7129b726468c
tree5734d26e345fb283ff7f17b0b9632e911f6749a5
parentec305f303bf070b4f6896b7a76009f702956d402
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