mirror of https://github.com/dynup/kpatch
20 lines
427 B
Diff
20 lines
427 B
Diff
diff -Nupr src/kernel/reboot.c src/kernel/reboot.c
|
|
--- src/kernel/reboot.c 2020-03-11 11:23:30.502684349 +0000
|
|
+++ src/kernel/reboot.c 2020-03-11 11:30:24.412330397 +0000
|
|
@@ -393,8 +393,15 @@ SYSCALL_DEFINE4(reboot, int, magic1, int
|
|
return ret;
|
|
}
|
|
|
|
+void kpatch_bar(void)
|
|
+{
|
|
+ if (!jiffies)
|
|
+ printk("kpatch_foo\n");
|
|
+}
|
|
+
|
|
static void deferred_cad(struct work_struct *dummy)
|
|
{
|
|
+ kpatch_bar();
|
|
kernel_restart(NULL);
|
|
}
|
|
|