mirror of
https://github.com/dynup/kpatch
synced 2025-02-26 06:50:51 +00:00
Rebased against kernel-3.10.0-1160.el7. data-read-mostly.patch.disabled remains disabled as we hit several build errors like: "Found a jump label at __netif_receive_skb_core()+0x50, using key netstamp_needed. Jump labels aren't supported with this kernel. Use static_key_enabled() instead." Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
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 2020-09-03 11:48:30.725726836 -0400
|
|
+++ src/kernel/sys.c 2020-09-03 11:48:45.101771811 -0400
|
|
@@ -559,8 +559,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);
|
|
}
|
|
|