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: <20131203142828.GA3521@kroah.com>
Date:	Tue, 3 Dec 2013 06:28:28 -0800
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Frank Haverkamp <haver@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, arnd@...db.de,
	cody@...ux.vnet.ibm.com, schwidefsky@...ibm.com,
	utz.bacher@...ibm.com, mmarek@...e.cz, rmallon@...il.com,
	jsvogt@...ibm.com, MIJUNG@...ibm.com, cascardo@...ux.vnet.ibm.com,
	michael@...ra.de
Subject: Re: [PATCH 5/6] GenWQE Sysfs interfaces

On Tue, Dec 03, 2013 at 01:53:13PM +0100, Frank Haverkamp wrote:
> Hi Greg,
> 
> thanks for taking your time to review our code once more.
> 
> Am Mittwoch, den 27.11.2013, 11:22 -0800 schrieb Greg KH:
> > On Wed, Nov 06, 2013 at 01:45:42PM +0100, Frank Haverkamp wrote:
> > > +/**
> > > + * genwqe_init_sysfs() - Setup sysfs entries of the card device
> > > + */
> > > +int genwqe_init_sysfs(struct genwqe_dev *cd)
> > > +{
> > > +	int rc;
> > > +
> > > +	rc = sysfs_create_group(&cd->dev->kobj, &genwqe_attribute_group);
> > > +	if (rc)
> > > +		return -ENXIO;
> > > +
> > > +	return 0;
> > > +}
> > 
> > Why isn't this group the "default" one for the device?  That way you
> > don't have to explicitly create/remove it, the driver core handles it
> > all automatically for you, and you don't race with userspace when it is
> > created/announced.
> 
> I found the ..._with_groups variant of device_create:
>         cd->dev = device_create_with_groups(cd->class_genwqe,
>                                             &cd->pci_dev->dev,
>                                             cd->devnum_genwqe, cd,
>                                             genwqe_attribute_groups,
>                                             GENWQE_DEVNAME "%u_card",
>                                             cd->card_idx);
> 
> This works nicely for me too. Is that what you had in mind?

Yes, that's what it was created for :)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ