Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Linux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E-EXK4 - Operating System Group
projects
Linux
Commits
964bd183
Commit
964bd183
authored
16 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
[PATCH] get rid of __user_path_lookup_open
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
516e0cc5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fs/exec.c
+10
-4
10 additions, 4 deletions
fs/exec.c
fs/namei.c
+0
-13
0 additions, 13 deletions
fs/namei.c
include/linux/namei.h
+0
-1
0 additions, 1 deletion
include/linux/namei.h
with
10 additions
and
18 deletions
fs/exec.c
+
10
−
4
View file @
964bd183
...
@@ -106,11 +106,17 @@ static inline void put_binfmt(struct linux_binfmt * fmt)
...
@@ -106,11 +106,17 @@ static inline void put_binfmt(struct linux_binfmt * fmt)
*/
*/
asmlinkage
long
sys_uselib
(
const
char
__user
*
library
)
asmlinkage
long
sys_uselib
(
const
char
__user
*
library
)
{
{
struct
file
*
file
;
struct
file
*
file
;
struct
nameidata
nd
;
struct
nameidata
nd
;
int
error
;
char
*
tmp
=
getname
(
library
);
int
error
=
PTR_ERR
(
tmp
);
error
=
__user_path_lookup_open
(
library
,
LOOKUP_FOLLOW
,
&
nd
,
FMODE_READ
|
FMODE_EXEC
);
if
(
!
IS_ERR
(
tmp
))
{
error
=
path_lookup_open
(
AT_FDCWD
,
tmp
,
LOOKUP_FOLLOW
,
&
nd
,
FMODE_READ
|
FMODE_EXEC
);
putname
(
tmp
);
}
if
(
error
)
if
(
error
)
goto
out
;
goto
out
;
...
...
This diff is collapsed.
Click to expand it.
fs/namei.c
+
0
−
13
View file @
964bd183
...
@@ -1193,19 +1193,6 @@ static int path_lookup_create(int dfd, const char *name,
...
@@ -1193,19 +1193,6 @@ static int path_lookup_create(int dfd, const char *name,
nd
,
open_flags
,
create_mode
);
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
,
static
struct
dentry
*
__lookup_hash
(
struct
qstr
*
name
,
struct
dentry
*
base
,
struct
nameidata
*
nd
)
struct
dentry
*
base
,
struct
nameidata
*
nd
)
{
{
...
...
This diff is collapsed.
Click to expand it.
include/linux/namei.h
+
0
−
1
View file @
964bd183
...
@@ -65,7 +65,6 @@ extern int path_lookup(const char *, unsigned, struct nameidata *);
...
@@ -65,7 +65,6 @@ extern int path_lookup(const char *, unsigned, struct nameidata *);
extern
int
vfs_path_lookup
(
struct
dentry
*
,
struct
vfsmount
*
,
extern
int
vfs_path_lookup
(
struct
dentry
*
,
struct
vfsmount
*
,
const
char
*
,
unsigned
int
,
struct
nameidata
*
);
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
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
,
extern
struct
file
*
lookup_instantiate_filp
(
struct
nameidata
*
nd
,
struct
dentry
*
dentry
,
int
(
*
open
)(
struct
inode
*
,
struct
file
*
));
int
(
*
open
)(
struct
inode
*
,
struct
file
*
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment