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
1eaa7f24
Commit
1eaa7f24
authored
Apr 08, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotate fs/namei.c with user pointer annotations.
parent
43c2489b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
fs/namei.c
fs/namei.c
+12
-12
No files found.
fs/namei.c
View file @
1eaa7f24
...
...
@@ -108,7 +108,7 @@
* POSIX.1 2.4: an empty pathname is invalid (ENOENT).
* PATH_MAX includes the nul terminator --RR.
*/
static
inline
int
do_getname
(
const
char
*
filename
,
char
*
page
)
static
inline
int
do_getname
(
const
char
__user
*
filename
,
char
*
page
)
{
int
retval
;
unsigned
long
len
=
PATH_MAX
;
...
...
@@ -129,7 +129,7 @@ static inline int do_getname(const char *filename, char *page)
return
retval
;
}
char
*
getname
(
const
char
*
filename
)
char
*
getname
(
const
char
__user
*
filename
)
{
char
*
tmp
,
*
result
;
...
...
@@ -941,7 +941,7 @@ struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
* that namei follows links, while lnamei does not.
* SMP-safe
*/
int
__user_walk
(
const
char
*
name
,
unsigned
flags
,
struct
nameidata
*
nd
)
int
__user_walk
(
const
char
__user
*
name
,
unsigned
flags
,
struct
nameidata
*
nd
)
{
char
*
tmp
=
getname
(
name
);
int
err
=
PTR_ERR
(
tmp
);
...
...
@@ -1402,7 +1402,7 @@ int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
return
error
;
}
asmlinkage
long
sys_mknod
(
const
char
*
filename
,
int
mode
,
dev_t
dev
)
asmlinkage
long
sys_mknod
(
const
char
__user
*
filename
,
int
mode
,
dev_t
dev
)
{
int
error
=
0
;
char
*
tmp
;
...
...
@@ -1471,7 +1471,7 @@ int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
return
error
;
}
asmlinkage
long
sys_mkdir
(
const
char
*
pathname
,
int
mode
)
asmlinkage
long
sys_mkdir
(
const
char
__user
*
pathname
,
int
mode
)
{
int
error
=
0
;
char
*
tmp
;
...
...
@@ -1568,7 +1568,7 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
return
error
;
}
asmlinkage
long
sys_rmdir
(
const
char
*
pathname
)
asmlinkage
long
sys_rmdir
(
const
char
__user
*
pathname
)
{
int
error
=
0
;
char
*
name
;
...
...
@@ -1643,7 +1643,7 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
* writeout happening, and we don't want to prevent access to the directory
* while waiting on the I/O.
*/
asmlinkage
long
sys_unlink
(
const
char
*
pathname
)
asmlinkage
long
sys_unlink
(
const
char
__user
*
pathname
)
{
int
error
=
0
;
char
*
name
;
...
...
@@ -1714,7 +1714,7 @@ int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname)
return
error
;
}
asmlinkage
long
sys_symlink
(
const
char
*
oldname
,
const
cha
r
*
newname
)
asmlinkage
long
sys_symlink
(
const
char
__user
*
oldname
,
const
char
__use
r
*
newname
)
{
int
error
=
0
;
char
*
from
;
...
...
@@ -1796,7 +1796,7 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
* with linux 2.0, and to avoid hard-linking to directories
* and other special files. --ADM
*/
asmlinkage
long
sys_link
(
const
char
*
oldname
,
const
cha
r
*
newname
)
asmlinkage
long
sys_link
(
const
char
__user
*
oldname
,
const
char
__use
r
*
newname
)
{
struct
dentry
*
new_dentry
;
struct
nameidata
nd
,
old_nd
;
...
...
@@ -2057,7 +2057,7 @@ static inline int do_rename(const char * oldname, const char * newname)
return
error
;
}
asmlinkage
long
sys_rename
(
const
char
*
oldname
,
const
cha
r
*
newname
)
asmlinkage
long
sys_rename
(
const
char
__user
*
oldname
,
const
char
__use
r
*
newname
)
{
int
error
;
char
*
from
;
...
...
@@ -2076,7 +2076,7 @@ asmlinkage long sys_rename(const char * oldname, const char * newname)
return
error
;
}
int
vfs_readlink
(
struct
dentry
*
dentry
,
char
*
buffer
,
int
buflen
,
const
char
*
link
)
int
vfs_readlink
(
struct
dentry
*
dentry
,
char
__user
*
buffer
,
int
buflen
,
const
char
*
link
)
{
int
len
;
...
...
@@ -2157,7 +2157,7 @@ static char *page_getlink(struct dentry * dentry, struct page **ppage)
return
(
char
*
)
page
;
}
int
page_readlink
(
struct
dentry
*
dentry
,
char
*
buffer
,
int
buflen
)
int
page_readlink
(
struct
dentry
*
dentry
,
char
__user
*
buffer
,
int
buflen
)
{
struct
page
*
page
=
NULL
;
char
*
s
=
page_getlink
(
dentry
,
&
page
);
...
...
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