Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

um: Make host_task_size a local variable

Currently, host_task_size is a global variable, but it is only used
in linux_main() to compute stub_start and task_size. Make it a local
variable to limit its scope to where it is actually needed.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20251027054519.1996090-2-tiwei.bie@linux.dev
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Tiwei Bie and committed by
Johannes Berg
691ff591 3c9b904f

+1 -3
-1
arch/um/include/shared/as-layout.h
··· 44 44 45 45 extern unsigned long brk_start; 46 46 47 - extern unsigned long host_task_size; 48 47 extern unsigned long stub_start; 49 48 50 49 extern int linux_main(int argc, char **argv, char **envp);
+1 -2
arch/um/kernel/um_arch.c
··· 252 252 unsigned long task_size; 253 253 EXPORT_SYMBOL(task_size); 254 254 255 - unsigned long host_task_size; 256 - 257 255 unsigned long brk_start; 258 256 unsigned long end_iomem; 259 257 EXPORT_SYMBOL(end_iomem); ··· 304 306 { 305 307 unsigned long avail, diff; 306 308 unsigned long virtmem_size, max_physmem; 309 + unsigned long host_task_size; 307 310 unsigned long stack; 308 311 unsigned int i; 309 312 int add;