Files
linux-kernel-module-cheat/kernel_modules/dump_stack.c
Ciro Santilli 六四事件 法轮功 2b0a5724a7 readme: convert underscores to hyphens on all header IDs
GitHub converts differently than asciidoctor... the only way to keep
them consistent is to explicitly set IDs.
2019-11-14 00:00:00 +00:00

22 lines
363 B
C

/* https://cirosantilli.com/linux-kernel-module-cheat#dump-stack */
#include <linux/module.h>
#include <linux/kernel.h>
static int myinit(void)
{
pr_info("dump_stack myinit\n");
dump_stack();
pr_info("dump_stack after\n");
return 0;
}
static void myexit(void)
{
pr_info("panic myexit\n");
}
module_init(myinit)
module_exit(myexit)
MODULE_LICENSE("GPL");