Patch "x86/signal: Fix the value returned by strict_sas_size()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    x86/signal: Fix the value returned by strict_sas_size()

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     x86-signal-fix-the-value-returned-by-strict_sas_size.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3aaca7274c804ec5a1450d5ad3edb90b7facbe86
Author: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
Date:   Sat Jan 14 18:33:09 2023 +0100

    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@xxxxxxxxxx>
    Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/73882d43ebe420c9d8fb82d0560021722b243000.1673717552.git.christophe.jaillet@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index 9c7265b524c73..82c562e2cc982 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -923,7 +923,7 @@ static bool strict_sigaltstack_size __ro_after_init = false;
 
 static int __init strict_sas_size(char *arg)
 {
-	return kstrtobool(arg, &strict_sigaltstack_size);
+	return kstrtobool(arg, &strict_sigaltstack_size) == 0;
 }
 __setup("strict_sas_size", strict_sas_size);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux