summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2008-02-08 13:20:23 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 18:22:34 +0100
commitabe8be3abe4c2043bd766f32d7eba62c12dbb0b3 (patch)
treef4c9100fd70abd8cfc9128bd16e84c19c4ae45f2 /fs/exec.c
parentasm-*/posix_types.h: scrub __GLIBC__ (diff)
downloadlinux-abe8be3abe4c2043bd766f32d7eba62c12dbb0b3.tar.xz
linux-abe8be3abe4c2043bd766f32d7eba62c12dbb0b3.zip
Allow executables larger than 2GB
This allows us to use executables >2GB. Based on a patch by Dave Anderson Signed-off-by: Andi Kleen <ak@suse.de> Cc: Dave Anderson <anderson@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 9f9c27224d7c..9ff6069094d8 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -119,7 +119,7 @@ asmlinkage long sys_uselib(const char __user * library)
if (error)
goto exit;
- file = nameidata_to_filp(&nd, O_RDONLY);
+ file = nameidata_to_filp(&nd, O_RDONLY|O_LARGEFILE);
error = PTR_ERR(file);
if (IS_ERR(file))
goto out;
@@ -658,7 +658,8 @@ struct file *open_exec(const char *name)
int err = vfs_permission(&nd, MAY_EXEC);
file = ERR_PTR(err);
if (!err) {
- file = nameidata_to_filp(&nd, O_RDONLY);
+ file = nameidata_to_filp(&nd,
+ O_RDONLY|O_LARGEFILE);
if (!IS_ERR(file)) {
err = deny_write_access(file);
if (err) {