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
Kirill Smelkov
linux
Commits
edb1bea5
Commit
edb1bea5
authored
Mar 14, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Mar 14, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix for leaks in nfsd
Several exits in exp_export() forget to call path_release(). Fixed.
parent
5e689743
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
fs/nfsd/export.c
fs/nfsd/export.c
+7
-12
No files found.
fs/nfsd/export.c
View file @
edb1bea5
...
...
@@ -281,7 +281,7 @@ exp_export(struct nfsctl_export *nxp)
if
((
nxp
->
ex_flags
&
NFSEXP_FSID
)
&&
(
fsid_exp
=
exp_get_fsid
(
clp
,
nxp
->
ex_dev
))
&&
fsid_exp
!=
exp
)
goto
out_unlock
;
goto
finish
;
if
(
exp
!=
NULL
)
{
/* just a flags/id/fsid update */
...
...
@@ -293,7 +293,7 @@ exp_export(struct nfsctl_export *nxp)
exp
->
ex_fsid
=
nxp
->
ex_dev
;
exp_fsid_hash
(
clp
,
exp
);
err
=
0
;
goto
out_unlock
;
goto
finish
;
}
/* We currently export only dirs and regular files.
...
...
@@ -329,8 +329,8 @@ exp_export(struct nfsctl_export *nxp)
strcpy
(
exp
->
ex_path
,
nxp
->
ex_path
);
exp
->
ex_client
=
clp
;
exp
->
ex_parent
=
parent
;
exp
->
ex_
dentry
=
nd
.
dentry
;
exp
->
ex_
mnt
=
nd
.
mnt
;
exp
->
ex_
mnt
=
mntget
(
nd
.
mnt
)
;
exp
->
ex_
dentry
=
dget
(
nd
.
dentry
)
;
exp
->
ex_flags
=
nxp
->
ex_flags
;
exp
->
ex_dev
=
dev
;
exp
->
ex_ino
=
ino
;
...
...
@@ -350,16 +350,12 @@ exp_export(struct nfsctl_export *nxp)
err
=
0
;
/* Unlock hashtable */
finish:
path_release
(
&
nd
);
out_unlock:
exp_writeunlock
();
out:
return
err
;
/* Release the dentry */
finish:
path_release
(
&
nd
);
goto
out_unlock
;
}
/*
...
...
@@ -478,8 +474,7 @@ exp_rootfh(struct svc_client *clp, char *path, struct knfsd_fh *f, int maxsize)
fh_put
(
&
fh
);
out:
if
(
path
)
path_release
(
&
nd
);
path_release
(
&
nd
);
return
err
;
}
...
...
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