[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <50970260.3020004@gmail.com>
Date: Mon, 05 Nov 2012 11:03:44 +1100
From: Ryan Mallon <rmallon@...il.com>
To: Luca Clementi <luca.clementi@...il.com>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, Brian Swetland <swetland@...gle.com>
Subject: Re: [PATCH] Staging: Android: logger: module_exit implementationg
On 04/11/12 04:45, Luca Clementi wrote:
> On Fri, Nov 2, 2012 at 11:29 AM, Greg Kroah-Hartman
> <gregkh@...uxfoundation.org> wrote:
>> On Thu, Nov 01, 2012 at 11:15:52PM -0700, Luca Clementi wrote:
<snip>
>>> + vfree(current_log->buffer);
>>> + kfree(current_log->misc.name);
>>> + kfree(current_log);
>>> + }
>>> +
>>> + return;
>>> +}
>>> +
>>> +
>>> +module_init(logger_init);
>>
>> Is module_init() the same "level" as device_initcall()? Did you test
>> this out in an Android system?
>
> Honestly I haven't tested it on Android, but in include/linux/init.h there is:
>
> #define module_init(x) __initcall(x);
> ...
> #define __initcall(fn) device_initcall(fn)
>
> Which lead me to think that there is not much difference between the two call.
The different initcalls run at different times. Often modules run with
something other than module_init if there are other dependencies on the
module/subsystem (see i2c core/busses for example). You would need to
check why logger was using device_initcall and make sure that it works
correctly (e.g. doesn't miss some early logs) in order to make this
change. It should be done as a separate patch anyway to make it easier
to identify any issues with it later.
~Ryan
--
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