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]
Date:	Sun, 24 Feb 2013 20:00:25 -0800
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Lars Poeschel <larsi@....tu-dresden.de>
Cc:	poeschel@...onage.de, thierry.reding@...onic-design.de,
	rob@...dley.net, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org
Subject: Re: [PATCH RFC] pwm: add sysfs interface

On Tue, Feb 19, 2013 at 03:27:41PM +0100, Lars Poeschel wrote:
> +static int pwmchip_export(struct pwm_chip *chip)
> +{
> +	int status;
> +	struct device *dev;
> +
> +	mutex_lock(&sysfs_lock);
> +	dev = device_create(&pwm_class, chip->dev, MKDEV(0, 0), chip,
> +				"pwmchip%d", chip->base);
> +	if (!IS_ERR(dev))
> +		status = sysfs_create_group(&dev->kobj, &pwmchip_attr_group);
> +	else
> +		status = PTR_ERR(dev);

You can't create sysfs files after the device has been exposed to
userspace.  Please use the default group functionality for the class,
which fixes this problem.

thanks,

greg k-h
--
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