Skip to contentSkip to conversation

Added Panic to Hello Module

PATCH New Sumya Hoque 1 participant 1 message Feb 12, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Added Panic to Hello Module

[  333.971507] ---[ end Kernel panic - not syncing: 6Nooooooo!!!!! the module is Panincking ]--- 
---
 linux_custom_modules/hello.c | 2 ++
 1 file changed, 2 insertions(+)
linux_custom_modules/hello.c +2 -0
index b60c7b5f6ee9..5a5b7a3dbd54 100644
@@ -1,11 +1,13 @@
 #include <linux/module.h>
 #include <linux/printk.h>
 #include <linux/kernel.h>
+#include <linux/panic.h>
 char *my_name = "World";
 module_param(my_name, charp, 0000);
 int hello(void)
 {
 	printk(KERN_INFO "Loading module... Hello %s\n", my_name);
+	panic(KERN_INFO "Nooooooo!!!!! the module is Panincking\n");
 	return 0;
 }
 
Signature · 1 line
2.34.1