summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorXichao Zhao <zhao.xichao@vivo.com>2025-08-25 15:36:09 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-29 14:01:20 +0100
commit8aa0a4abb75ca71c710c172617988273596cbe37 (patch)
tree97fc232be9432d3c1bcbc37000eef7b113c9264f /fs
parentef250c3edd995d7bb5a5e5122ffad1c28a8686eb (diff)
downloadlinux-8aa0a4abb75ca71c710c172617988273596cbe37.tar.gz
linux-8aa0a4abb75ca71c710c172617988273596cbe37.tar.bz2
linux-8aa0a4abb75ca71c710c172617988273596cbe37.zip
exec: Fix incorrect type for ret
[ Upstream commit 5e088248375d171b80c643051e77ade6b97bc386 ] In the setup_arg_pages(), ret is declared as an unsigned long. The ret might take a negative value. Therefore, its type should be changed to int. Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20250825073609.219855-1-zhao.xichao@vivo.com Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 7144c541818f..2979b458b650 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -746,7 +746,7 @@ int setup_arg_pages(struct linux_binprm *bprm,
unsigned long stack_top,
int executable_stack)
{
- unsigned long ret;
+ int ret;
unsigned long stack_shift;
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma = bprm->vma;