LearningLinuxKernel icon indicating copy to clipboard operation
LearningLinuxKernel copied to clipboard

贡献内核学习代码

Open ljrcore opened this issue 3 years ago • 1 comments

大家可以把自己平时学习Linux内核的实验代码按分类提交PR。

ljrcore avatar Jan 22 '21 10:01 ljrcore

兄弟,rbtree.c中exit函数,释放的有点。。尴尬。。

static void __exit my_exit(void) { struct mytype *data; struct rb_node *node; printk("The rbtree kernel is exiting!\n"); for (node = rb_first(&mytree); node; ) { data = rb_entry(node, struct mytype, node); if (data) { rb_erase(&data->node, &mytree); node = rb_next(node); kfree(data); } } }

yifengyou avatar May 04 '21 03:05 yifengyou