From: Oleg Drokin <green@clusterfs.com>
To: linux-kernel@vger.kernel.org, braam@clusterfs.com
Subject: [9/9] Lustre VFS patches for 2.6
Date: Wed, 7 Jul 2004 15:47:33 +0300 [thread overview]
Message-ID: <20040707124733.GA25995@clusterfs.com> (raw)
Lustre needs to differentiate plain opens from opens for exec, in the latter
case it is possible that client will decide that it cannot execute a file
(after succesful open intent completion) e.g. due to wrong permissions and
that may cause server to leak open file reference as close will never be called.
fs/exec.c | 4 ++--
include/linux/fs.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
--- linus-2.6.7-bk-latest/include/linux/fs.h.orig 2004-07-07 12:33:21.246507224 +0300
+++ linus-2.6.7-bk-latest/include/linux/fs.h 2004-07-07 12:33:55.069365368 +0300
@@ -74,6 +74,7 @@ extern int leases_enable, dir_notify_ena
#define FMODE_READ 1
#define FMODE_WRITE 2
+#define FMODE_EXEC 4
#define RW_MASK 1
#define RWA_MASK 2
--- linus-2.6.7-bk-latest/fs/exec.c.orig 2004-07-07 12:33:05.466906088 +0300
+++ linus-2.6.7-bk-latest/fs/exec.c 2004-07-07 12:33:38.127940856 +0300
@@ -122,7 +122,7 @@ asmlinkage long sys_uselib(const char __
int error;
intent_init(&nd.intent.open, IT_OPEN);
- nd.intent.open.flags = FMODE_READ;
+ nd.intent.open.flags = FMODE_READ|FMODE_EXEC;
error = user_path_walk_it(library, &nd);
if (error)
goto out;
@@ -476,7 +476,7 @@ struct file *open_exec(const char *name)
struct file *file;
intent_init(&nd.intent.open, IT_OPEN);
- nd.intent.open.flags = FMODE_READ;
+ nd.intent.open.flags = FMODE_READ|FMODE_EXEC;
err = path_lookup_it(name, LOOKUP_FOLLOW, &nd);
file = ERR_PTR(err);
reply other threads:[~2004-07-07 12:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040707124733.GA25995@clusterfs.com \
--to=green@clusterfs.com \
--cc=braam@clusterfs.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.