]> www.infradead.org Git - users/jedix/linux-maple.git/commit
um: remove PATH_MAX use
authorJohannes Berg <johannes.berg@intel.com>
Thu, 24 Oct 2024 07:52:51 +0000 (09:52 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 24 Oct 2024 07:52:51 +0000 (09:52 +0200)
commitd61ac4a7496a7981947b8b894d40b0e35c316fa5
tree1bdc5db2ed51c38baf2e07e129816d106643af90
parent3f17fed2149192c7d3b76a45a6a87b4ff22cd586
um: remove PATH_MAX use

Evidently, PATH_MAX isn't always defined, at least not via <limits.h>.
Simply remove the use and replace it by a constant 4k. As stat::st_size
is zero for /proc/self/exe we can't even size it automatically, and it
seems unlikely someone's going to try to run UML with such a path.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410240553.gYNIXN8i-lkp@intel.com/
Fixes: 031acdcfb566 ("um: restore process name")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/os-Linux/main.c