mirror of
https://github.com/dynup/kpatch
synced 2025-02-13 07:57:11 +00:00
17 lines
526 B
Diff
17 lines
526 B
Diff
This is a test for #658: a kernel panic seen when patching an exported
|
|
function (e.g., kmalloc) which is used by patch_init().
|
|
---
|
|
diff -Nupr src.orig/mm/slub.c src/mm/slub.c
|
|
--- src.orig/mm/slub.c 2016-12-11 14:17:54.000000000 -0500
|
|
+++ src/mm/slub.c 2017-02-08 21:02:17.946870598 -0500
|
|
@@ -3719,6 +3719,9 @@ void *__kmalloc(size_t size, gfp_t flags
|
|
struct kmem_cache *s;
|
|
void *ret;
|
|
|
|
+ if (!jiffies)
|
|
+ printk("kpatch kmalloc\n");
|
|
+
|
|
if (unlikely(size > KMALLOC_MAX_CACHE_SIZE))
|
|
return kmalloc_large(size, flags);
|
|
|