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: <200811261425.04052.inaky@linux.intel.com>
Date:	Wed, 26 Nov 2008 14:25:03 -0800
From:	Inaky Perez-Gonzalez <inaky@...ux.intel.com>
To:	Evgeniy Polyakov <zbr@...emap.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH 19/39] i2400m: sysfs controls

On Wednesday 26 November 2008, Evgeniy Polyakov wrote:
> Hi.
>
> Spotted an issue.
>
> On Mon, Nov 24, 2008 at 01:50:42PM -0800, Inaky Perez-Gonzalez 
(inaky@...ux.intel.com) wrote:
> > +static
> > +ssize_t i2400m_reset_cold_store(struct device *dev,
> > +				struct device_attribute *attr,
> > +				const char *buf, size_t size)
> > +{
> > +	ssize_t result;
> > +	struct i2400m *i2400m = net_dev_to_i2400m(to_net_dev(dev));
> > +	unsigned val;
> > +
> > +	result = -EINVAL;
> > +	if (sscanf(buf, "%u\n", &val) != 1)
> > +		goto error_no_unsigned;
> > +	if (val != 1)
> > +		goto error_bad_value;
> > +	i2400m_schedule_work(i2400m, __i2400m_reset_cold_work, GFP_KERNEL);
> > +	if (result >= 1)
> > +		result = size;
>
> This never executes since result is always -EINVAL, isn't it?

Right -- the thing is scheduled by to the user it always returns -EINVAl.
Good catch, thanks -- fixing it.



-- 
Inaky
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ