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: <CAMuHMdW4fv4LN6oDS6qgYodf74_NvbzMxQfRbtnS-mn_D+u7Kg@mail.gmail.com>
Date:   Mon, 8 Nov 2021 14:31:41 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Borislav Petkov <bp@...en8.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linux-sh list <linux-sh@...r.kernel.org>
Subject: Re: [PATCH v0 35/42] sh: Check notifier registration return value

Hi Borislav,

On Mon, Nov 8, 2021 at 1:50 PM Borislav Petkov <bp@...en8.de> wrote:
> From: Borislav Petkov <bp@...e.de>
>
> Avoid homegrown notifier registration checks.
>
> No functional changes.
>
> Signed-off-by: Borislav Petkov <bp@...e.de>

Thanks for your patch!

> --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
> +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
> @@ -1277,11 +1277,14 @@ static struct notifier_block sh7724_post_sleep_notifier = {
>
>  static int __init sh7724_sleep_setup(void)
>  {
> -       atomic_notifier_chain_register(&sh_mobile_pre_sleep_notifier_list,
> -                                      &sh7724_pre_sleep_notifier);
> +       if (atomic_notifier_chain_register(&sh_mobile_pre_sleep_notifier_list,
> +                                          &sh7724_pre_sleep_notifier))
> +               pr_warn("SH7724 pre-sleep notifier already registered\n");
> +
> +       if (atomic_notifier_chain_register(&sh_mobile_post_sleep_notifier_list,
> +                                          &sh7724_post_sleep_notifier))
> +               pr_warn("SH7724 pre-sleep notifier already registered\n");

Do you think these can actually fail?

>
> -       atomic_notifier_chain_register(&sh_mobile_post_sleep_notifier_list,
> -                                      &sh7724_post_sleep_notifier);
>         return 0;
>  }
>  arch_initcall(sh7724_sleep_setup);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ