lkml.org 
[lkml]   [2016]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 7/8] mm/zsmalloc: add __init,__exit attribute
Hello Ganesh,

On (07/04/16 17:21), Ganesh Mahendran wrote:
> > On (07/04/16 14:49), Ganesh Mahendran wrote:
> > [..]
> >> -static void zs_unregister_cpu_notifier(void)
> >> +static void __exit zs_unregister_cpu_notifier(void)
> >> {
> >
> > this __exit symbol is called from `__init zs_init()' and thus is
> > free to crash.
>
> I change code to force the code goto notifier_fail where the
> zs_unregister_cpu_notifier will be called.
> I tested with zsmalloc module buildin and built as a module.

sorry, not sure I understand what do you mean by this.


> Please correct me, if I miss something.

you have an __exit section function being called from
__init section:

static void __exit zs_unregister_cpu_notifier(void)
{
}

static int __init zs_init(void)
{
zs_unregister_cpu_notifier();
}

it's no good.

-ss

\
 
 \ /
  Last update: 2016-07-05 03:41    [W:0.084 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site