From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Ming Lei <ming.lei@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 2/4] firmware loader: simplify holding module for request_firmware
Date: Tue, 7 Jan 2014 09:23:42 -0800 [thread overview]
Message-ID: <20140107172342.GA31842@core.coreip.homeip.net> (raw)
In-Reply-To: <CACVXFVNMofvYpsiFFxFaCtN7XHAEtBmJEHCW2mJRS4x+O0+utg@mail.gmail.com>
On Tue, Jan 07, 2014 at 10:53:57PM +0800, Ming Lei wrote:
> Hi Dmitry,
>
> On Tue, Jan 7, 2014 at 3:56 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > Hi Ming,
> >
> > On Thu, Jun 06, 2013 at 08:01:48PM +0800, Ming Lei wrote:
> >> module reference doesn't cover direct loading path, so this patch
> >> simply holds the module in the whole life time of request_firmware()
> >> to fix the problem.
> >
> > This does not make sense to me. If request_firmware() is executing that
> > means some other module references it and module refcount already
> > reflects that.
>
> Yes, you are right, holding this module references in both
> request_firmware() and request_firmware_direct() shouldn't
> be necessary.
>
> >
> > We needed to pin module before Tejun's work ensuring that currently open
> > sysfs entries won't keep related kobjects pinned after kernel marked
> > them inactive. We can probably delete __module_get()/module_put() from
> > firmware_class.c now.
>
> But holding the reference for request_firmware_nowait() is needed.
Ah, yes, of course.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2014-01-07 17:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 12:01 [PATCH v1 0/4] firmware loader: cleanup and introduce search paths option Ming Lei
2013-06-06 12:01 ` [PATCH v1 1/4] firmware loader: don't export cache_firmware and uncache_firmware Ming Lei
2013-06-06 12:01 ` [PATCH v1 2/4] firmware loader: simplify holding module for request_firmware Ming Lei
2014-01-07 7:56 ` Dmitry Torokhov
2014-01-07 14:53 ` Ming Lei
2014-01-07 17:23 ` Dmitry Torokhov [this message]
2013-06-06 12:01 ` [PATCH v1 3/4] firmware loader: allow distribution to choose default search paths Ming Lei
2013-06-06 19:47 ` Greg Kroah-Hartman
2013-06-07 1:24 ` Ming Lei
2013-06-07 4:20 ` Greg Kroah-Hartman
2013-06-07 15:01 ` Ming Lei
2013-06-06 12:01 ` [RFC PATCH v1 4/4] firmware loader: don't allow to request firmware via relative path Ming Lei
2013-06-06 19:48 ` Greg Kroah-Hartman
2013-06-07 1:30 ` Ming Lei
2013-06-07 4:21 ` Greg Kroah-Hartman
2013-06-07 6:04 ` Takashi Iwai
2013-06-07 14:54 ` Ming Lei
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=20140107172342.GA31842@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@canonical.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