mirror of
https://github.com/dynup/kpatch
synced 2025-02-03 10:41:33 +00:00
11ce8102c2
Kernel version: 3.10.0-327.36.3.el7.x86_64
25 lines
713 B
Diff
25 lines
713 B
Diff
diff -Nupr src.orig/fs/aio.c src/fs/aio.c
|
|
--- src.orig/fs/aio.c 2016-11-30 19:51:03.826178250 +0000
|
|
+++ src/fs/aio.c 2016-11-30 19:52:59.946178250 +0000
|
|
@@ -1675,6 +1675,20 @@ SYSCALL_DEFINE3(io_cancel, aio_context_t
|
|
return ret;
|
|
}
|
|
|
|
+static int aio_max_nr_orig;
|
|
+void kpatch_load_aio_max_nr(void)
|
|
+{
|
|
+ aio_max_nr_orig = aio_max_nr;
|
|
+ aio_max_nr = 0x40000;
|
|
+}
|
|
+void kpatch_unload_aio_max_nr(void)
|
|
+{
|
|
+ aio_max_nr = aio_max_nr_orig;
|
|
+}
|
|
+#include "kpatch-macros.h"
|
|
+KPATCH_LOAD_HOOK(kpatch_load_aio_max_nr);
|
|
+KPATCH_UNLOAD_HOOK(kpatch_unload_aio_max_nr);
|
|
+
|
|
/* io_getevents:
|
|
* Attempts to read at least min_nr events and up to nr events from
|
|
* the completion queue for the aio_context specified by ctx_id. If
|