Skip to content

Commit 6b0a292

Browse files
Xichao Zhaogregkh
authored andcommitted
exec: Fix incorrect type for ret
[ Upstream commit 5e08824 ] 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>
1 parent 4fc43de commit 6b0a292

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ int setup_arg_pages(struct linux_binprm *bprm,
717717
unsigned long stack_top,
718718
int executable_stack)
719719
{
720-
unsigned long ret;
720+
int ret;
721721
unsigned long stack_shift;
722722
struct mm_struct *mm = current->mm;
723723
struct vm_area_struct *vma = bprm->vma;

0 commit comments

Comments
 (0)