]> 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)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 10 Oct 2024 10:02:13 +0000 (12:02 +0200)
commita98b7761f697e590ed5d610d87fa12be66f23419
treeda0d44f9436a4b65743a73436dd014bb35d74cbb
parent855f6e18dff26fb13968a73998b0d0ff38865b51
um: Fix potential integer overflow during physmem setup

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>
arch/um/kernel/physmem.c