Skip to content

Commit

Permalink
Allow executables larger than 2GB
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Feb 8, 2008
1 parent 531d7d4 commit abe8be3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit abe8be3

Please sign in to comment.