From: Shaya Potter <spotter@cs.columbia.edu>
To: linux-fsdevel@vger.kernel.org
Subject: sys_uselib in exec.c
Date: Tue, 23 Mar 2004 21:05:10 -0500 [thread overview]
Message-ID: <1080093909.2030.3.camel@zaphod> (raw)
the code there is (2.6.1)
125 error = __user_walk(library, LOOKUP_FOLLOW|LOOKUP_OPEN,
&nd);
126 if (error)
127 goto out;
128
129 error = -EINVAL;
130 if (!S_ISREG(nd.dentry->d_inode->i_mode))
131 goto exit;
132
133 error = permission(nd.dentry->d_inode, MAY_READ | MAY_EXEC,
&nd);
134 if (error)
135 goto exit;
136
137 file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
138 error = PTR_ERR(file);
139 if (IS_ERR(file))
140 goto out;
where exit does a path_release(&nd) and return's error while out just
returns error.
if dentry_open fails, we don't call path_release(&nd). Is this correct?
thanks,
shaya
next reply other threads:[~2004-03-24 2:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-24 2:05 Shaya Potter [this message]
2004-03-24 5:29 ` sys_uselib in exec.c Maneesh Soni
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=1080093909.2030.3.camel@zaphod \
--to=spotter@cs.columbia.edu \
--cc=linux-fsdevel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox