Files
LDD-LinuxDeviceDrivers/study/debug/modules/oops/kerneloops.c
T
2017-04-08 21:02:18 +08:00

25 lines
386 B
C

// http://blog.csdn.net/tommy_wxie/article/details/12521535
// http://blog.chinaunix.net/uid-20651662-id-1906954.html
//
#include <linux/kerel.h>
#include <linux/module.h>
static int __init hello_init(void)
{
int *p = 0;
*p = 1;
return 0;
}
static void __exit hello_exit(void)
{
return;
}
module_init(hello_init);
module_exit(hello_exit);
MODULE_LICENSE("GPL");