um: Don't use vfprintf() for os_info()
authorBenjamin Berg <benjamin@sipsolutions.net>
Fri, 10 Nov 2023 11:03:41 +0000 (12:03 +0100)
committerRichard Weinberger <richard@nod.at>
Thu, 4 Jan 2024 22:45:17 +0000 (23:45 +0100)
commit236f9fe39b02c15fa5530b53e9cca48354394389
treec33819038c333eccbd673b048f7bc58ae7911872
parent9e16fb933fd1f2132c0d137f3666ebf20f93e33a
um: Don't use vfprintf() for os_info()

The threads allocated inside the kernel have only a single page of
stack. Unfortunately, the vfprintf function in standard glibc may use
too much stack-space, overflowing it.

To make os_info safe to be used by helper threads, use the kernel
vscnprintf function into a smallish buffer and write out the information
to stderr.

Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/os-Linux/util.c