Kernel: Bug fix: _execve() did not dereference executable's inode when successful.
authorWill Sowerbutts <will@sowerbutts.com>
Sun, 22 Feb 2015 17:58:45 +0000 (17:58 +0000)
committerWill Sowerbutts <will@sowerbutts.com>
Sun, 22 Feb 2015 18:01:12 +0000 (18:01 +0000)
Kernel/syscall_exec16.c
Kernel/syscall_exec32.c

index e84c72a..f39d20f 100644 (file)
@@ -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 */
index 13c96a3..7d018e1 100644 (file)
@@ -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);