From: Will Sowerbutts Date: Sun, 22 Feb 2015 17:58:45 +0000 (+0000) Subject: Kernel: Bug fix: _execve() did not dereference executable's inode when successful. X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=bcb86cf085b71f927d2d5d8393c2d2c096bf1f32;p=FUZIX.git Kernel: Bug fix: _execve() did not dereference executable's inode when successful. --- diff --git a/Kernel/syscall_exec16.c b/Kernel/syscall_exec16.c index e84c72a7..f39d20fa 100644 --- a/Kernel/syscall_exec16.c +++ b/Kernel/syscall_exec16.c @@ -214,6 +214,7 @@ arg_t _execve(void) brelse(abuf); brelse(ebuf); + i_deref(ino); // Shove argc and the address of argv just below envp #ifdef CONFIG_CALL_R2L /* Arguments are stacked the 'wrong' way around */ diff --git a/Kernel/syscall_exec32.c b/Kernel/syscall_exec32.c index 13c96a30..7d018e1d 100644 --- a/Kernel/syscall_exec32.c +++ b/Kernel/syscall_exec32.c @@ -239,6 +239,7 @@ arg_t _execve(void) kfree(abuf); kfree(ebuf); + i_deref(ino); /* Shove argc and the address of argv just below envp */ uputl((uint32_t) nargv, nenvp - 1);