lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXEt6DJufw7Jv+nWYzt=SrBsiTmRrXeRZFYdA5zC+3M6kA@mail.gmail.com>
Date: Mon, 13 Jan 2025 15:18:05 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: James Bottomley <James.Bottomley@...senpartnership.com>, Jeremy Kerr <jk@...abs.org>, 
	linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org, 
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] efivarfs: Fix a NULL vs IS_ERR() bug

On Mon, 13 Jan 2025 at 07:16, Dan Carpenter <dan.carpenter@...aro.org> wrote:
>
> The kernel_file_open() function doesn't return NULL, it retursn error
> pointers.  Fix the error checking to match.
>
> Fixes: eb11e99adef8 ("efivarfs: add variable resync after hibernation")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>  fs/efivarfs/super.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks - I'll fold this in rather than apply it on top though.

> diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
> index 961264f628dc..968e4af7b7e4 100644
> --- a/fs/efivarfs/super.c
> +++ b/fs/efivarfs/super.c
> @@ -492,7 +492,7 @@ static int efivarfs_pm_notify(struct notifier_block *nb, unsigned long action,
>         /* O_NOATIME is required to prevent oops on NULL mnt */
>         file = kernel_file_open(&path, O_RDONLY | O_DIRECTORY | O_NOATIME,
>                                 current_cred());
> -       if (!file)
> +       if (IS_ERR(file))
>                 return NOTIFY_DONE;
>
>         rescan_done = true;
> --
> 2.45.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ