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: <CAE-0n53L9c5fTC9vut6+at583qoi2ecs29uQZF=6fAmZX2r2qA@mail.gmail.com>
Date:   Thu, 20 Oct 2022 20:04:19 -0400
From:   Stephen Boyd <swboyd@...omium.org>
To:     Brian Norris <briannorris@...omium.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Benson Leung <bleung@...omium.org>,
        chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Samuel Holland <samuel@...lland.org>,
        Julius Werner <jwerner@...omium.org>,
        Guenter Roeck <linux@...ck-us.net>, stable@...r.kernel.org
Subject: Re: [PATCH] firmware: coreboot: Register bus in module init

Quoting Brian Norris (2022-10-19 18:10:53)
[...]
> [    0.114560]  do_initcall_level+0x134/0x160
> [    0.114571]  do_initcalls+0x60/0xa0
> [    0.114579]  do_basic_setup+0x28/0x34
> [    0.114588]  kernel_init_freeable+0xf8/0x150
> [    0.114596]  kernel_init+0x2c/0x12c
> [    0.114607]  ret_from_fork+0x10/0x20
> [    0.114624] Code: 5280002b 1100054a b900092a f9800011 (885ffc01)
> [    0.114631] ---[ end trace 0000000000000000 ]---
>
> Fixes: b81e3140e412 ("firmware: coreboot: Make bus registration symmetric")
> Cc: <stable@...r.kernel.org>
> Signed-off-by: Brian Norris <briannorris@...omium.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@...omium.org>

> diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c
> index c52bcaa9def6..9ca21feb9d45 100644
> --- a/drivers/firmware/google/coreboot_table.c
> +++ b/drivers/firmware/google/coreboot_table.c
> @@ -199,6 +194,32 @@ static struct platform_driver coreboot_table_driver = {
>                 .of_match_table = of_match_ptr(coreboot_of_match),
>         },
>  };
> -module_platform_driver(coreboot_table_driver);
> +
> +static int __init coreboot_table_driver_init(void)
> +{
> +       int ret;
> +
> +       ret = bus_register(&coreboot_bus_type);
> +       if (ret)
> +               return ret;
> +
> +       ret = platform_driver_register(&coreboot_table_driver);
> +       if (ret) {
> +               bus_unregister(&coreboot_bus_type);
> +               return ret;
> +       }
> +
> +       return 0;

This could be 'return ret' and two lines could be saved, but that is
super nitpick so whatever.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ