Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad dynrela location 0x9 for symbol aio_max_nr #358

Closed
jpoimboe opened this issue Aug 13, 2014 · 0 comments · Fixed by #362
Closed

bad dynrela location 0x9 for symbol aio_max_nr #358

jpoimboe opened this issue Aug 13, 2014 · 0 comments · Fixed by #362
Assignees

Comments

@jpoimboe
Copy link
Member

Getting the following error when loading the patch module based on the below patch:

[36330.863615] kpatch: bad dynrela location 0x9 for symbol aio_max_nr

Patch:

Index: src/fs/aio.c
===================================================================
--- src.orig/fs/aio.c
+++ src/fs/aio.c
@@ -1479,6 +1479,9 @@ long do_io_submit(aio_context_t ctx_id,
    int i = 0;
    struct blk_plug plug;

+   if (!jiffies)
+       printk("do_io_submit\n");
+
    if (unlikely(nr < 0))
        return -EINVAL;

@@ -1642,3 +1645,15 @@ SYSCALL_DEFINE5(io_getevents, aio_contex
    }
    return ret;
 }
+
+void kpatch_load_aio_max_nr(void)
+{
+   aio_max_nr = 0x40000;
+}
+void kpatch_unload_aio_max_nr(void)
+{
+   aio_max_nr = 0x10000;
+}
+#include "kpatch-macros.h"
+KPATCH_LOAD_HOOK(kpatch_load_aio_max_nr);
+KPATCH_UNLOAD_HOOK(kpatch_unload_aio_max_nr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants