diff options
author | Andi Kleen <andi@firstfloor.org> | 2008-02-08 07:20:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:34 -0500 |
commit | abe8be3abe4c2043bd766f32d7eba62c12dbb0b3 (patch) | |
tree | f4c9100fd70abd8cfc9128bd16e84c19c4ae45f2 /fs/exec.c | |
parent | 531d7d4256f3726b93f7a91f97132a944ab28148 (diff) |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -119,7 +119,7 @@ asmlinkage long sys_uselib(const char __user * library) | |||
119 | if (error) | 119 | if (error) |
120 | goto exit; | 120 | goto exit; |
121 | 121 | ||
122 | file = nameidata_to_filp(&nd, O_RDONLY); | 122 | file = nameidata_to_filp(&nd, O_RDONLY|O_LARGEFILE); |
123 | error = PTR_ERR(file); | 123 | error = PTR_ERR(file); |
124 | if (IS_ERR(file)) | 124 | if (IS_ERR(file)) |
125 | goto out; | 125 | goto out; |
@@ -658,7 +658,8 @@ struct file *open_exec(const char *name) | |||
658 | int err = vfs_permission(&nd, MAY_EXEC); | 658 | int err = vfs_permission(&nd, MAY_EXEC); |
659 | file = ERR_PTR(err); | 659 | file = ERR_PTR(err); |
660 | if (!err) { | 660 | if (!err) { |
661 | file = nameidata_to_filp(&nd, O_RDONLY); | 661 | file = nameidata_to_filp(&nd, |
662 | O_RDONLY|O_LARGEFILE); | ||
662 | if (!IS_ERR(file)) { | 663 | if (!IS_ERR(file)) { |
663 | err = deny_write_access(file); | 664 | err = deny_write_access(file); |
664 | if (err) { | 665 | if (err) { |