Re: [PATCH] statmount: fix security option retrieval

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

 



On Wed, 2024-11-20 at 09:17 +0100, Christian Brauner wrote:
> Fix the inverted check for security_sb_show_options().
> 
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/c8eaa647-5d67-49b6-9401-705afcb7e4d7@stanley.mountain
> Fixes: aefff51e1c29 ("statmount: retrieve security mount options")
> Cc: Cc: <stable@xxxxxxxxxxxxxxx> # mainline only
> Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
> ---
>  fs/namespace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/namespace.c b/fs/namespace.c
> index 6b0a17487d0f..eb34a5160f64 100644
> --- a/fs/namespace.c
> +++ b/fs/namespace.c
> @@ -5116,7 +5116,7 @@ static int statmount_opt_sec_array(struct kstatmount *s, struct seq_file *seq)
>  	buf_start = seq->buf + start;
>  
>  	err = security_sb_show_options(seq, sb);
> -	if (!err)
> +	if (err)
>  		return err;
>  
>  	if (unlikely(seq_has_overflowed(seq)))

Doh!

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux