Skip to content

Commit 866d648

Browse files
WOnder93pcmoore
authored andcommitted
lsm: fix default return value for vm_enough_memory
1 is the return value that implements a "no-op" hook, not 0. Cc: [email protected] Fixes: 98e828a ("security: Refactor declaration of LSM hooks") Signed-off-by: Ondrej Mosnacek <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent e508560 commit 866d648

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/lsm_hook_defs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ LSM_HOOK(int, 0, quota_on, struct dentry *dentry)
4848
LSM_HOOK(int, 0, syslog, int type)
4949
LSM_HOOK(int, 0, settime, const struct timespec64 *ts,
5050
const struct timezone *tz)
51-
LSM_HOOK(int, 0, vm_enough_memory, struct mm_struct *mm, long pages)
51+
LSM_HOOK(int, 1, vm_enough_memory, struct mm_struct *mm, long pages)
5252
LSM_HOOK(int, 0, bprm_creds_for_exec, struct linux_binprm *bprm)
5353
LSM_HOOK(int, 0, bprm_creds_from_file, struct linux_binprm *bprm, const struct file *file)
5454
LSM_HOOK(int, 0, bprm_check_security, struct linux_binprm *bprm)

0 commit comments

Comments
 (0)