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
This commit is contained in:
@@ -132,6 +132,8 @@ ifeq ($(shell grep -q "atomic_inc_not_zero" $(srctree)/kernel/cred.c; echo $$?),
|
|||||||
ATOMIC_INC_FUNC = atomic_inc_not_zero
|
ATOMIC_INC_FUNC = atomic_inc_not_zero
|
||||||
else ifeq ($(shell grep -q "atomic_long_inc_not_zero" $(srctree)/kernel/cred.c; echo $$?),0)
|
else ifeq ($(shell grep -q "atomic_long_inc_not_zero" $(srctree)/kernel/cred.c; echo $$?),0)
|
||||||
ATOMIC_INC_FUNC = atomic_long_inc_not_zero
|
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
|
endif
|
||||||
|
|
||||||
ifneq ($(shell grep -Eq "^static inline const struct cred \*get_cred_rcu" $(srctree)/include/linux/cred.h; echo $$?),0)
|
ifneq ($(shell grep -Eq "^static inline const struct cred \*get_cred_rcu" $(srctree)/include/linux/cred.h; echo $$?),0)
|
||||||
|
|||||||
Reference in New Issue
Block a user