From 171cd567ce1d07849fcb7cdf45f6f78dc27b642b Mon Sep 17 00:00:00 2001 From: Jincheng Miao Date: Wed, 7 May 2014 17:48:02 +0800 Subject: [PATCH] Fix kpatch.ko build on Ubuntu Saucy. The error likes: make -C /lib/modules/3.11.0-12-generic/build M=/home/ryan/kpatch/kmod/core kpatch.ko make[3]: Entering directory `/usr/src/linux-headers-3.11.0-12-generic' CC [M] /home/ryan/kpatch/kmod/core/core.o /home/ryan/kpatch/kmod/core/core.c:42:32: fatal error: linux/preempt_mask.h: No such file or directory #include I feel sorry to introduce this problem from my laster commit 6c2d6444. Some old kernel doesn't have header file preempt_mask.h, and the safe way is using hardirq.h to find in_nmi(). Signed-off-by: Jincheng Miao --- kmod/core/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/core/core.c b/kmod/core/core.c index d790571..a90b280 100644 --- a/kmod/core/core.c +++ b/kmod/core/core.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include "kpatch.h"