File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ static int use_our_cache(void)
61
61
62
62
obj = kmem_cache_alloc (gctx_cachep , GFP_KERNEL );
63
63
E95B
if (!obj ) { /* pedantic warning printk below... */
64
- pr_warn ("kmem_cache_alloc() failed\n" );
64
+ pr_warn ("[Pedantic] kmem_cache_alloc() failed\n" );
65
65
return - ENOMEM ;
66
66
}
67
67
@@ -84,8 +84,8 @@ static void our_ctor(void *new)
84
84
struct task_struct * p = current ;
85
85
86
86
/* TIP: to see how exactly we got here, insert this call:
87
- * dump_stack();
88
- * (read it bottom-up ignoring call frames that begin with '?')
87
+ * dump_stack();
88
+ * (read it bottom-up ignoring call frames that begin with '?')
89
89
*/
90
90
pr_info ("in ctor: just alloced mem object is @ 0x%px\n" , ctx ); /* %pK in production */
91
91
memset (ctx , 0 , sizeof (struct myctx ));
@@ -137,8 +137,7 @@ static int __init slab_custom_init(void)
137
137
{
138
138
pr_info ("inserted\n" );
139
139
create_our_cache ();
140
- use_our_cache ();
141
- return 0 ; /* success */
140
+ return use_our_cache ();
142
141
}
143
142
144
143
static void __exit slab_custom_exit (void )
You can’t perform that action at this time.
0 commit comments