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 <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
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)