Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
964bd183
Commit
964bd183
authored
Jul 26, 2008
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] get rid of __user_path_lookup_open
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
516e0cc5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
18 deletions
+10
-18
fs/exec.c
fs/exec.c
+10
-4
fs/namei.c
fs/namei.c
+0
-13
include/linux/namei.h
include/linux/namei.h
+0
-1
No files found.
fs/exec.c
View file @
964bd183
...
...
@@ -106,11 +106,17 @@ static inline void put_binfmt(struct linux_binfmt * fmt)
*/
asmlinkage
long
sys_uselib
(
const
char
__user
*
library
)
{
struct
file
*
file
;
struct
file
*
file
;
struct
nameidata
nd
;
int
error
;
error
=
__user_path_lookup_open
(
library
,
LOOKUP_FOLLOW
,
&
nd
,
FMODE_READ
|
FMODE_EXEC
);
char
*
tmp
=
getname
(
library
);
int
error
=
PTR_ERR
(
tmp
);
if
(
!
IS_ERR
(
tmp
))
{
error
=
path_lookup_open
(
AT_FDCWD
,
tmp
,
LOOKUP_FOLLOW
,
&
nd
,
FMODE_READ
|
FMODE_EXEC
);
putname
(
tmp
);
}
if
(
error
)
goto
out
;
...
...
fs/namei.c
View file @
964bd183
...
...
@@ -1193,19 +1193,6 @@ static int path_lookup_create(int dfd, const char *name,
nd
,
open_flags
,
create_mode
);
}
int
__user_path_lookup_open
(
const
char
__user
*
name
,
unsigned
int
lookup_flags
,
struct
nameidata
*
nd
,
int
open_flags
)
{
char
*
tmp
=
getname
(
name
);
int
err
=
PTR_ERR
(
tmp
);
if
(
!
IS_ERR
(
tmp
))
{
err
=
__path_lookup_intent_open
(
AT_FDCWD
,
tmp
,
lookup_flags
,
nd
,
open_flags
,
0
);
putname
(
tmp
);
}
return
err
;
}
static
struct
dentry
*
__lookup_hash
(
struct
qstr
*
name
,
struct
dentry
*
base
,
struct
nameidata
*
nd
)
{
...
...
include/linux/namei.h
View file @
964bd183
...
...
@@ -65,7 +65,6 @@ extern int path_lookup(const char *, unsigned, struct nameidata *);
extern
int
vfs_path_lookup
(
struct
dentry
*
,
struct
vfsmount
*
,
const
char
*
,
unsigned
int
,
struct
nameidata
*
);
extern
int
__user_path_lookup_open
(
const
char
__user
*
,
unsigned
lookup_flags
,
struct
nameidata
*
nd
,
int
open_flags
);
extern
int
path_lookup_open
(
int
dfd
,
const
char
*
name
,
unsigned
lookup_flags
,
struct
nameidata
*
,
int
open_flags
);
extern
struct
file
*
lookup_instantiate_filp
(
struct
nameidata
*
nd
,
struct
dentry
*
dentry
,
int
(
*
open
)(
struct
inode
*
,
struct
file
*
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment