Allow executables larger than 2GB
[sfrench/cifs-2.6.git] / fs / exec.c
index 9f9c27224d7cddcf7bc293ffef30ec7a2d414736..9ff6069094d81353239e38c56f37a5da72bf1f69 100644 (file)
--- 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) {