Re: [for-next][PATCH 15/16] ftrace: Add freeing algorithm to free ftrace_mod_maps

From: Joel Fernandes
Date: Mon Oct 09 2017 - 02:07:20 EST


Hi Steve,

On Sun, Oct 8, 2017 at 11:42 AM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>> > "Joel Fernandes (Google)" <joel.opensrc@xxxxxxxxx> wrote:
>> > Also could you let me know what is the correct behavior of the filters
>> > after a module being traced is unloaded, are the filters supposed to
>> > be setup again after the module is unloaded, before the module can be
>> > loaded again?
>>
>> Actually I learnt that it doesn't get preserved and wrote a patch to fix that, let me know
>> what you think, thanks. (its only lightly tested - checked that the filters are preserved,
>> will do more testing tomorrow):
>
> They should not be preserved, it's too non-deterministic.
>
> I'm wondering why the setting of the ip to zero didn't keep it from
> showing up again. I'll have to investigate that.
>

I found that the entries weren't being cleared for the init functions
as the records weren't available at module unload time.
Posted a patch to fix this: https://lkml.org/lkml/2017/10/8/196

thanks,

- Joel