mirror of https://github.com/dynup/kpatch
20 lines
425 B
Diff
20 lines
425 B
Diff
diff -Nupr src.orig/kernel/sys.c src/kernel/sys.c
|
|
--- src.orig/kernel/sys.c 2017-09-22 15:27:21.601055773 -0400
|
|
+++ src/kernel/sys.c 2017-09-22 15:27:32.170099540 -0400
|
|
@@ -554,8 +554,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);
|
|
}
|
|
|