From: Andi Kleen Date: Fri, 8 Feb 2008 12:20:23 +0000 (-0800) Subject: Allow executables larger than 2GB X-Git-Tag: v2.6.25-rc1~158 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=abe8be3abe4c2043bd766f32d7eba62c12dbb0b3;p=linux-2.6-omap-h63xx.git Allow executables larger than 2GB This allows us to use executables >2GB. Based on a patch by Dave Anderson Signed-off-by: Andi Kleen Cc: Dave Anderson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/exec.c b/fs/exec.c index 9f9c27224d7..9ff6069094d 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) {