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: <20200329073304.GA3911175@kroah.com>
Date:   Sun, 29 Mar 2020 09:33:04 +0200
From:   Greg KH <greg@...ah.com>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Kelsey Skunberg <skunberg.kelsey@...il.com>,
        linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
        Kelsey Skunberg <kelsey.skunberg@...il.com>,
        rbilovol@...co.com, stable <stable@...r.kernel.org>,
        ddutile@...hat.com, ruslan.bilovol@...il.com,
        linux-kernel-mentees@...ts.linuxfoundation.org, bodong@...lanox.com
Subject: Re: [Linux-kernel-mentees] [PATCH v2] PCI: sysfs: Change bus_rescan
 and dev_rescan to rescan

On Sat, Mar 28, 2020 at 03:06:33PM -0500, Bjorn Helgaas wrote:
> On Thu, Mar 26, 2020 at 07:35:24AM +0100, Greg KH wrote:
> > On Wed, Mar 25, 2020 at 05:10:33PM -0500, Bjorn Helgaas wrote:
> > > -static DEVICE_ATTR_WO(dev_rescan);
> > > +static struct device_attribute dev_attr_dev_rescan = __ATTR(rescan, 0200, NULL,
> > > +							    dev_rescan_store);
> > 
> > Oops, this should just be DEVICE_ATTR(), no need for __ATTR() as this
> > isn't a kobject-only file.
> > 
> > So how about:
> > 
> > static DEVICE_ATTR(rescan, 0200, NULL, dev_rescan_store);
> 
> I don' think DEVICE_ATTR() works in this case because it uses the
> first argument ("rescan") to build both the C symbol for the
> device_attribute struct and the sysfs filename.
> 
> There are two instances in this file.  The two sysfs "rescan" files
> are not a problem, but the two "dev_attr_rescan_name" C symbols *are*.
> We could resolve that by putting the bus attributes in a different
> source file than the dev attributes, but it doesn't seem worth it now.
> 
> I tentatively have the patch below on pci/misc.  I dropped the
> tested-by and reviewed-by because I didn't want to put words in your
> mouths :)

Ah, yeah, you are right __ATTR() is what you need to use here.

Your patch looks good:

Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ