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: <413f33a6-8e6e-29e4-d249-b941d59017fe@roeck-us.net>
Date:   Mon, 2 Jan 2017 20:25:17 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Alexey Khoroshilov <khoroshilov@...ras.ru>,
        Jean Delvare <jdelvare@...e.com>
Cc:     linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
        ldv-project@...uxtesting.org
Subject: Re: hwmon: w83781d: Unused sysfs group w83781d_group_other

On 01/02/2017 01:49 PM, Alexey Khoroshilov wrote:
> Hello,
>
> w83781d.c contains a definition of sysfs group:
>
> static const struct attribute_group w83781d_group_other = {
> 	.attrs = w83781d_attributes_other,
> };
>
> the only usage of which is:
>
> static void w83781d_remove_files(struct device *dev)
> {
> 	...
> 	sysfs_remove_group(&dev->kobj, &w83781d_group_other);
> }
>
> So, it seems the group should be either created in w83781d_create_files() or removed completely.
> What do you think?
>

If you look very closely, you'll see that the attributes are created individually
using  device_create_file(). Given that, removing the group might not be such a
good idea.

Yes, this is messy. If you have the time, feel free to convert the driver to use
hwmon_device_register_with_groups() or, even better, hwmon_device_register_with_info().

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ