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:	Wed, 28 Jan 2015 16:24:54 +0100
From:	Johan Hovold <johan@...nel.org>
To:	Luis Henriques <luis.henriques@...onical.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	Johan Hovold <johan@...nel.org>,
	Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH 3.14 02/77] gpio: sysfs: fix gpio device-attribute leak

On Wed, Jan 28, 2015 at 02:30:08PM +0000, Luis Henriques wrote:
> On Tue, Jan 27, 2015 at 05:26:40PM -0800, Greg Kroah-Hartman wrote:

> > @@ -994,6 +991,8 @@ void gpiod_unexport(struct gpio_desc *de
> >  
> >  		dev = class_find_device(&gpio_class, NULL, desc, match_export);
> >  		if (dev) {
> > +			device_remove_file(dev, &dev_attr_edge);
> > +			device_remove_file(dev, &dev_attr_direction);
> >  			gpio_setup_irq(desc, dev, 0);
> >  			clear_bit(FLAG_EXPORT, &desc->flags);
> >  		} else
> > 
> 
> I believe there's a mistake in this backport: the changes to the
> gpiod_unexport() function are being applied to the wrong code block;
> they should be in:
> 
> 	if (dev) {
> 		device_unregister(dev);
> 		put_device(dev);
> 	}
> 
> The backport to the 3.10 kernel have the same problem.

You're right, thanks for catching this.

I'll send a v2.

Johan
--
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