mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: Greg KH <greg@kroah.com>,
	linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
	Randy Dunlap <rdunlap@xenotime.net>,
	linux-doc@vger.kernel.org,
	Johannes Berg <johannes.berg@intel.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Ming Lei <tom.leiming@gmail.com>
Subject: Re: [PATCH] firmware: Update hotplug script, remove sysfs files
Date: Mon, 28 Jun 2010 00:56:03 -0700	[thread overview]
Message-ID: <20100628075603.GA25287@core.coreip.homeip.net> (raw)
In-Reply-To: <AANLkTikN_PvSmHlDfqNH1YQ5_RDCJ7k_zzzTiMs0mqP9@mail.gmail.com>

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@kroah.com> wrote:
> > On Fri, Jun 25, 2010 at 05:55:11PM +0900, Magnus Damm wrote:
> >> From: Magnus Damm <damm@opensource.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

      reply	other threads:[~2010-06-28  7:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25  8:55 Magnus Damm
2010-06-25 18:22 ` Greg KH
2010-06-28  6:17   ` Magnus Damm
2010-06-28  7:56     ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100628075603.GA25287@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=johannes.berg@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=rdunlap@xenotime.net \
    --cc=tom.leiming@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®