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: <20100628075603.GA25287@core.coreip.homeip.net>
Date:	Mon, 28 Jun 2010 00:56:03 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Magnus Damm <magnus.damm@...il.com>
Cc:	Greg KH <greg@...ah.com>, linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Randy Dunlap <rdunlap@...otime.net>, linux-doc@...r.kernel.org,
	Johannes Berg <johannes.berg@...el.com>,
	Marcel Holtmann <marcel@...tmann.org>,
	Ming Lei <tom.leiming@...il.com>
Subject: Re: [PATCH] firmware: Update hotplug script, remove sysfs files

On Mon, Jun 28, 2010 at 03:17:22PM +0900, Magnus Damm wrote:
> On Sat, Jun 26, 2010 at 3:22 AM, Greg KH <greg@...ah.com> wrote:
> > On Fri, Jun 25, 2010 at 05:55:11PM +0900, Magnus Damm wrote:
> >> From: Magnus Damm <damm@...nsource.se>
> >>
> >> Update the in-kernel hotplug example script to work
> >> properly with recent kernels. Without this fix the
> >> script may load the firmware twice - both at "add"
> >> and "remove" time.
> >>
> >> The second load only triggers in the case when multiple
> >> firmware images are used. A good example is the b43
> >> driver which does not work properly without this fix.
> >>
> >> While at it, make sure sysfs files are removed.
> >
> > Hm, the documentation update applied, but this second part didn't.  Care
> > to redo it against the linux-next tree and resend it as a separate
> > patch?  I've split this up and applied the documentation part now, so
> > you don't have to redo that.
> 
> Thanks a lot for splitting up the patch. I don't mind redoing the
> second part of the patch, but I'm not sure if it's actually needed to
> prevent memory leaks. This piece of code serves as an example:
> 
> +error_unreg2:
> +       sysfs_remove_bin_file(&f_dev->kobj, &fw_priv->attr_data);
>  error_unreg:
>         device_unregister(f_dev);
> 
> Perhaps device_unregister() call above already removes the kobj which
> makes the added sysfs_remove_bin_file() unnecessary?
> 

It is so happens that device_unregister() does clean up leftover sysfs
attributes but we should not rely on that happen in the future. That
said I glanced at linux-next and it appears that we do clean up the
attributes properly now.

Thanks.

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