diff options
| author | Xichao Zhao <zhao.xichao@vivo.com> | 2025-08-25 10:36:09 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-29 16:06:59 +0300 |
| commit | 813d3d18cfe4759796f096dbd85f9591a6b8aed7 (patch) | |
| tree | 1cc84740c6cb288a2dbde98cff7f121eb4663e7f /fs/exec.c | |
| parent | 4a243110dc884d8e1fe69eecbc2daef10d8e75d7 (diff) | |
| download | linux-813d3d18cfe4759796f096dbd85f9591a6b8aed7.tar.xz | |
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/exec.c')
| -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 ee71a315cc51..a7dfac338a22 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -748,7 +748,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; |
