From 3c0944530d5df502834f9567eedcd4c2eb2ce34b Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Fri, 11 Apr 2025 03:57:23 +0800 Subject: [PATCH] Add error checking to the kernel Makefile to ensure that the atomic_inc_not_zero or atomic_long_inc_not_zero functions are found in kernel/cred.c --- kernel/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/Makefile b/kernel/Makefile index 5c714059..db4401c6 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -132,6 +132,8 @@ ifeq ($(shell grep -q "atomic_inc_not_zero" $(srctree)/kernel/cred.c; echo $$?), ATOMIC_INC_FUNC = atomic_inc_not_zero else ifeq ($(shell grep -q "atomic_long_inc_not_zero" $(srctree)/kernel/cred.c; echo $$?),0) ATOMIC_INC_FUNC = atomic_long_inc_not_zero +else +$(error -- KSU_SUSFS: Neither atomic_inc_not_zero nor atomic_long_inc_not_zero found in kernel/cred.c) endif ifneq ($(shell grep -Eq "^static inline const struct cred \*get_cred_rcu" $(srctree)/include/linux/cred.h; echo $$?),0)