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 2017-11-17 15:58:51.157211972 -0500 +++ src/mm/slub.c 2017-11-17 15:58:56.808211972 -0500 @@ -3731,6 +3731,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);