[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVNMofvYpsiFFxFaCtN7XHAEtBmJEHCW2mJRS4x+O0+utg@mail.gmail.com>
Date: Tue, 7 Jan 2014 22:53:57 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 2/4] firmware loader: simplify holding module for request_firmware
Hi Dmitry,
On Tue, Jan 7, 2014 at 3:56 PM, Dmitry Torokhov
<dmitry.torokhov@...il.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.
Thanks,
--
Ming Lei
--
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