Re: [PATCH] exec: Fix incorrect type for ret

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



LGTM

On 8/25/2025 11:36 AM, Xichao Zhao wrote:
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@xxxxxxxx>
---
  fs/exec.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

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;





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux