diff options
| author | Xichao Zhao <zhao.xichao@vivo.com> | 2025-08-25 15:36:09 +0800 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2025-08-25 09:33:33 -0700 |
| commit | 5e088248375d171b80c643051e77ade6b97bc386 (patch) | |
| tree | 91dd461f3c0f9a8295f60dc358afc53c497bddd2 | |
| parent | c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9 (diff) | |
| download | linux-5e088248375d171b80c643051e77ade6b97bc386.tar.gz linux-5e088248375d171b80c643051e77ade6b97bc386.tar.bz2 linux-5e088248375d171b80c643051e77ade6b97bc386.zip | |
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>
| -rw-r--r-- | fs/exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c index 2a1e5e4042a1..5d236bb87df5 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -599,7 +599,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; |
