File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 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)
6161
6262 obj = kmem_cache_alloc (gctx_cachep , GFP_KERNEL );
6363 if (!obj ) { /* pedantic warning printk below... */
64- pr_warn ("kmem_cache_alloc() failed\n" );
64+ pr_warn ("[Pedantic] kmem_cache_alloc() failed\n" );
6565 return - ENOMEM ;
6666 }
6767
@@ -84,8 +84,8 @@ static void our_ctor(void *new)
8484 struct task_struct * p = current ;
8585
8686 /* 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 '?')
8989 */
9090 pr_info ("in ctor: just alloced mem object is @ 0x%px\n" , ctx ); /* %pK in production */
9191 memset (ctx , 0 , sizeof (struct myctx ));
@@ -137,8 +137,7 @@ static int __init slab_custom_init(void)
137137{
138138 pr_info ("inserted\n" );
139139 create_our_cache ();
140- use_our_cache ();
141- return 0 ; /* success */
140+ return use_our_cache ();
142141}
143142
144143static void __exit slab_custom_exit (void )
You can’t perform that action at this time.
0 commit comments