Skip to content

Commit

Permalink
[S390] vdso: kernel parameter syntax
Browse files Browse the repository at this point in the history
The syntax of the vdso kernel parameter is documented as vdso=[on|off].
The implementation uses vdso=[0|1], an invalid parameter string disables
the vdso support. Fix the mismatch by adding vdso=[on|off] as additional
parameter syntax.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Jun 12, 2009
1 parent 8ebf975 commit 7aa79f9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions arch/s390/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,19 @@ unsigned int __read_mostly vdso_enabled = 1;

static int __init vdso_setup(char *s)
{
vdso_enabled = simple_strtoul(s, NULL, 0);
return 1;
unsigned long val;
int rc;

rc = 0;
if (strncmp(s, "on", 3) == 0)
vdso_enabled = 1;
else if (strncmp(s, "off", 4) == 0)
vdso_enabled = 0;
else {
rc = strict_strtoul(s, 0, &val);
vdso_enabled = rc ? 0 : !!val;
}
return !rc;
}
__setup("vdso=", vdso_setup);

Expand Down

0 comments on commit 7aa79f9

Please sign in to comment.