diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 265b37690421..e3932ea50ec8 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1792,14 +1792,14 @@ SYSCALL_DEFINE1(umask, int, mask) | |||
1792 | static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd) | 1792 | static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd) |
1793 | { | 1793 | { |
1794 | struct fd exe; | 1794 | struct fd exe; |
1795 | struct dentry *dentry; | 1795 | struct inode *inode; |
1796 | int err; | 1796 | int err; |
1797 | 1797 | ||
1798 | exe = fdget(fd); | 1798 | exe = fdget(fd); |
1799 | if (!exe.file) | 1799 | if (!exe.file) |
1800 | return -EBADF; | 1800 | return -EBADF; |
1801 | 1801 | ||
1802 | dentry = exe.file->f_path.dentry; | 1802 | inode = file_inode(exe.file); |
1803 | 1803 | ||
1804 | /* | 1804 | /* |
1805 | * Because the original mm->exe_file points to executable file, make | 1805 | * Because the original mm->exe_file points to executable file, make |
@@ -1807,11 +1807,11 @@ static int prctl_set_mm_exe_file(struct mm_struct *mm, unsigned int fd) | |||
1807 | * overall picture. | 1807 | * overall picture. |
1808 | */ | 1808 | */ |
1809 | err = -EACCES; | 1809 | err = -EACCES; |
1810 | if (!S_ISREG(dentry->d_inode->i_mode) || | 1810 | if (!S_ISREG(inode->i_mode) || |
1811 | exe.file->f_path.mnt->mnt_flags & MNT_NOEXEC) | 1811 | exe.file->f_path.mnt->mnt_flags & MNT_NOEXEC) |
1812 | goto exit; | 1812 | goto exit; |
1813 | 1813 | ||
1814 | err = inode_permission(dentry->d_inode, MAY_EXEC); | 1814 | err = inode_permission(inode, MAY_EXEC); |
1815 | if (err) | 1815 | if (err) |
1816 | goto exit; | 1816 | goto exit; |
1817 | 1817 | ||