Skip to content

Commit 5e08824

Browse files
Xichao Zhaokees
authored andcommitted
exec: Fix incorrect type for ret
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>
1 parent c17b750 commit 5e08824

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ int setup_arg_pages(struct linux_binprm *bprm,
599599
unsigned long stack_top,
600600
int executable_stack)
601601
{
602-
unsigned long ret;
602+
int ret;
603603
unsigned long stack_shift;
604604
struct mm_struct *mm = current->mm;
605605
struct vm_area_struct *vma = bprm->vma;

0 commit comments

Comments
 (0)