Skip to content

Commit ef6dfc4

Browse files
tititiou36Ingo Molnar
authored andcommitted
x86/signal: Fix the value returned by strict_sas_size()
Functions used with __setup() return 1 when the argument has been successfully parsed. Reverse the returned value so that 1 is returned when kstrtobool() is successful (i.e. returns 0). My understanding of these __setup() functions is that returning 1 or 0 does not change much anyway - so this is more of a cleanup than a functional fix. I spot it and found it spurious while looking at something else. Even if the output is not perfect, you'll get the idea with: $ git grep -B2 -A10 retu.*kstrtobool | grep __setup -B10 Fixes: 3aac3eb ("x86/signal: Implement sigaltstack size validation") Signed-off-by: Christophe JAILLET <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/73882d43ebe420c9d8fb82d0560021722b243000.1673717552.git.christophe.jaillet@wanadoo.fr
1 parent d55dcb7 commit ef6dfc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ static bool strict_sigaltstack_size __ro_after_init = false;
360360

361361
static int __init strict_sas_size(char *arg)
362362
{
363-
return kstrtobool(arg, &strict_sigaltstack_size);
363+
return kstrtobool(arg, &strict_sigaltstack_size) == 0;
364364
}
365365
__setup("strict_sas_size", strict_sas_size);
366366

0 commit comments

Comments
 (0)