Skip to content

Commit cb055b2

Browse files
btw616jmberg-intel
authored andcommitted
um: Do not propagate mem parameter to kernel
This parameter is UML specific and is unknown to kernel. It should not be propagated to kernel, otherwise it will be passed to user space as an environment option by kernel with a warning like: Unknown kernel command line parameters "mem=2G", will be passed to user space. Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com> Link: https://patch.msgid.link/20241011040441.1586345-3-tiwei.btw@antgroup.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent a34d105 commit cb055b2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/um/kernel/physmem.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ EXPORT_SYMBOL(phys_mapping);
139139
static int __init uml_mem_setup(char *line, int *add)
140140
{
141141
char *retptr;
142+
143+
*add = 0;
142144
physmem_size = memparse(line,&retptr);
143145
return 0;
144146
}

0 commit comments

Comments
 (0)