]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/signal: Fix the value returned by strict_sas_size()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 14 Jan 2023 17:33:09 +0000 (18:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:32:53 +0000 (09:32 +0100)
commitd7e2be5da9a9aab504cba44706631dc36dbfd9ae
treea6ad846c39fd6f16ae7c19228a5bc21005e33935
parentf61744f7b45dc9fcdcfcbc23d24d4024a99b2b21
x86/signal: Fix the value returned by strict_sas_size()

[ Upstream commit ef6dfc4b238a435ab552207ec09e4a82b6426d31 ]

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: 3aac3ebea08f ("x86/signal: Implement sigaltstack size validation")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/73882d43ebe420c9d8fb82d0560021722b243000.1673717552.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/signal.c