lkml.org 
[lkml]   [2015]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2015-01-28 22:01    [W:0.074 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site