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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0j_FCn=G0tUhBnYTtcxE-GL-LDyq9fOa8Dk4WV7uXBHcg@mail.gmail.com>
Date:   Mon, 16 Nov 2020 15:19:43 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Zhang Rui <rui.zhang@...el.com>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>
Subject: Re: [PATCH] ACPI: fan: Initialize performance state sysfs attribute

On Wed, Nov 11, 2020 at 12:52 AM Guenter Roeck <linux@...ck-us.net> wrote:
>
> The following warning is reported if lock debugging is enabled.
>
> DEBUG_LOCKS_WARN_ON(1)
> WARNING: CPU: 1 PID: 1 at kernel/locking/lockdep.c:4617 lockdep_init_map_waits+0x141/0x222
> ...
> Call Trace:
>  __kernfs_create_file+0x7a/0xd8
>  sysfs_add_file_mode_ns+0x135/0x189
>  sysfs_create_file_ns+0x70/0xa0
>  acpi_fan_probe+0x547/0x621
>  platform_drv_probe+0x67/0x8b
>  ...
>
> Dynamically allocated sysfs attributes need to be initialized to avoid
> the warning.
>
> Fixes: d19e470b6605 ("ACPI: fan: Expose fan performance state information")
> Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> Signed-off-by: Guenter Roeck <linux@...ck-us.net>
> ---
>  drivers/acpi/fan.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
> index 62873388b24f..9cbe58e394d0 100644
> --- a/drivers/acpi/fan.c
> +++ b/drivers/acpi/fan.c
> @@ -351,6 +351,7 @@ static int acpi_fan_get_fps(struct acpi_device *device)
>                 struct acpi_fan_fps *fps = &fan->fps[i];
>
>                 snprintf(fps->name, ACPI_FPS_NAME_LEN, "state%d", i);
> +               sysfs_attr_init(&fps->dev_attr.attr);
>                 fps->dev_attr.show = show_state;
>                 fps->dev_attr.store = NULL;
>                 fps->dev_attr.attr.name = fps->name;
> --

Applied as 5.11 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ