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] [day] [month] [year] [list]
Message-ID: <CADD9qejrh=hEFrvQNvGcHW3SJFgOKM8daQ9eRasDwiJi9J2pNQ@mail.gmail.com>
Date: Tue, 27 Jan 2026 23:04:42 +0530
From: Malaya Kumar Rout <mrout@...hat.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Linux PM <linux-pm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] PM: hibernate: Drop NULL pointer checks before acomp_request_free()

On Tue, Jan 27, 2026 at 1:34 AM Rafael J. Wysocki <rafael@...nel.org> wrote:
>
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> Since acomp_request_free() checks its argument against NULL, the NULL
> pointer checks before calling it added by commit ("7966cf0ebe32 PM:
> hibernate: Fix crash when freeing invalid crypto compressor") are
> redundant, so drop them.
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
>  kernel/power/swap.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> --- a/kernel/power/swap.c
> +++ b/kernel/power/swap.c
> @@ -902,8 +902,8 @@ out_clean:
>                 for (thr = 0; thr < nr_threads; thr++) {
>                         if (data[thr].thr)
>                                 kthread_stop(data[thr].thr);
> -                       if (data[thr].cr)
> -                               acomp_request_free(data[thr].cr);
> +
> +                       acomp_request_free(data[thr].cr);
>
>                         if (!IS_ERR_OR_NULL(data[thr].cc))
>                                 crypto_free_acomp(data[thr].cc);
> @@ -1502,8 +1502,8 @@ out_clean:
>                 for (thr = 0; thr < nr_threads; thr++) {
>                         if (data[thr].thr)
>                                 kthread_stop(data[thr].thr);
> -                       if (data[thr].cr)
> -                               acomp_request_free(data[thr].cr);
> +
> +                       acomp_request_free(data[thr].cr);
>
>                         if (!IS_ERR_OR_NULL(data[thr].cc))
>                                 crypto_free_acomp(data[thr].cc);
>
>
>
Thanks, this makes sense to me. Dropping the redundant NULL checks
looks correct.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ