Re: Non-__init functions calling __init functions

From: Andrzej Krzysztofowicz (ankry@green.mif.pg.gda.pl)
Date: Thu Mar 20 2003 - 11:32:08 EST


> From: "Andrzej Krzysztofowicz" <ankry@green.mif.pg.gda.pl>
> > From: "Stuart MacDonald" <stuartm@connecttech.com>
> > > This is always a bug isn't it?
> >
> > ... unless they are guaranteed to be called in the init context only.
>
> In which case those functions should also be marked __init so they can
> be reclaimed, correct? So it's the reciprocal bug.

Not always possible.

__init A() {
...
}

__exit B() {
...
}

C() {
...
A();
...
#ifdef MODULE
B();
#endif
...
}

C cannot be marked __init for #define MODULE case. Even if it is called only
by some __init code. I can imagine other similar situations.

However it is not your case probably.

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Gdansk University of Technology
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:31 EST