summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorOndrej Mosnacek <omosnace@redhat.com>2023-10-31 15:32:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-28 20:20:10 +0300
commit64d84030ff5ebd48d87c4ea136894d42a40347d8 (patch)
treef66227c2af2426de7e1c0a5121bdece4b3c41e95 /include/linux
parentff4d0309780c9c40121206b446605ba18c31e675 (diff)
downloadlinux-64d84030ff5ebd48d87c4ea136894d42a40347d8.tar.xz
lsm: fix default return value for vm_enough_memory
commit 866d648059d5faf53f1cd960b43fe8365ad93ea7 upstream. 1 is the return value that implements a "no-op" hook, not 0. Cc: stable@vger.kernel.org Fixes: 98e828a0650f ("security: Refactor declaration of LSM hooks") Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/lsm_hook_defs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
index ac962c4cb44b..38f18fb0ec53 100644
--- a/include/linux/lsm_hook_defs.h
+++ b/include/linux/lsm_hook_defs.h
@@ -48,7 +48,7 @@ LSM_HOOK(int, 0, quota_on, struct dentry *dentry)
LSM_HOOK(int, 0, syslog, int type)
LSM_HOOK(int, 0, settime, const struct timespec64 *ts,
const struct timezone *tz)
-LSM_HOOK(int, 0, vm_enough_memory, struct mm_struct *mm, long pages)
+LSM_HOOK(int, 1, vm_enough_memory, struct mm_struct *mm, long pages)
LSM_HOOK(int, 0, bprm_creds_for_exec, struct linux_binprm *bprm)
LSM_HOOK(int, 0, bprm_creds_from_file, struct linux_binprm *bprm, struct file *file)
LSM_HOOK(int, 0, bprm_check_security, struct linux_binprm *bprm)