Skip to content

Instantly share code, notes, and snippets.

@md-jamal
Created May 4, 2019 12:55
Show Gist options
  • Save md-jamal/fd7d275005e77923351953f92c0777f9 to your computer and use it in GitHub Desktop.
Save md-jamal/fd7d275005e77923351953f92c0777f9 to your computer and use it in GitHub Desktop.
#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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment