mirror of
https://github.com/dynup/kpatch
synced 2024-12-13 00:44:34 +00:00
f5de932b8d
When patching a kernel module, if we can't find a needed dynrela symbol, we currently assume it's exported. However, it's also possible that it's provided by another .o in the patch module. Add support for that. Fixes #445.
36 lines
924 B
Diff
36 lines
924 B
Diff
Index: src/fs/nfsd/export.c
|
|
===================================================================
|
|
--- src.orig/fs/nfsd/export.c
|
|
+++ src/fs/nfsd/export.c
|
|
@@ -1241,6 +1241,8 @@ static void exp_flags(struct seq_file *m
|
|
}
|
|
}
|
|
|
|
+extern char *kpatch_string(void);
|
|
+
|
|
static int e_show(struct seq_file *m, void *p)
|
|
{
|
|
struct cache_head *cp = p;
|
|
@@ -1250,6 +1252,7 @@ static int e_show(struct seq_file *m, vo
|
|
if (p == SEQ_START_TOKEN) {
|
|
seq_puts(m, "# Version 1.1\n");
|
|
seq_puts(m, "# Path Client(Flags) # IPs\n");
|
|
+ seq_puts(m, kpatch_string());
|
|
return 0;
|
|
}
|
|
|
|
Index: src/net/netlink/af_netlink.c
|
|
===================================================================
|
|
--- src.orig/net/netlink/af_netlink.c
|
|
+++ src/net/netlink/af_netlink.c
|
|
@@ -3228,4 +3228,9 @@ panic:
|
|
panic("netlink_init: Cannot allocate nl_table\n");
|
|
}
|
|
|
|
+char *kpatch_string(void)
|
|
+{
|
|
+ return "# kpatch\n";
|
|
+}
|
|
+
|
|
core_initcall(netlink_proto_init);
|