#include <linux/module.h> #include <linux/slab.h> #include <linux/list.h> MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Satoru Takeuchi <satoru.takeuchi@gmail.com>"); MODULE_DESCRIPTION("an example of list data structure"); static LIST_HEAD(mylist); struct mylist_entry { struct list_head list; int n; }; static void mylist_add(int n) { struct mylist_entry *e = kmalloc(sizeof(*e), GFP_KERNEL); e->n = n;