kernel: recover module_init/exit() functions
commit62ca65099634cb23212caf71001ea8d5dabd03fe
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Mar 2013 08:43:34 +0000 (25 11:43 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Mar 2013 08:43:34 +0000 (25 11:43 +0300)
tree244d6cfced5f2a8be1f5a2dfccdd47915b4d0ef2
parent422ec4c3203310aa9836fd6f28f3d7f157cf83ad
kernel: recover module_init/exit() functions

It's quite complicated to record which functions are the module_init/exit()
functions.

I first find a static symbol, then I look in that scope until I find an
__inittest() or __exittest() function.  Those functions do:

static inline int __inittest(void) { return xyz_init; }

This still doesn't help find the caller because the module->init pointer is
passed as a function parameter to another function and Smatch doesn't
track it that far yet.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_kernel.c