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
969b7f25
Commit
969b7f25
authored
Jan 03, 2006
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SUNRPC: Fix a potential race in rpc_pipefs.
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
566dd606
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
net/sunrpc/rpc_pipe.c
net/sunrpc/rpc_pipe.c
+6
-3
No files found.
net/sunrpc/rpc_pipe.c
View file @
969b7f25
...
@@ -70,8 +70,11 @@ rpc_timeout_upcall_queue(void *data)
...
@@ -70,8 +70,11 @@ rpc_timeout_upcall_queue(void *data)
struct
inode
*
inode
=
&
rpci
->
vfs_inode
;
struct
inode
*
inode
=
&
rpci
->
vfs_inode
;
down
(
&
inode
->
i_sem
);
down
(
&
inode
->
i_sem
);
if
(
rpci
->
ops
==
NULL
)
goto
out
;
if
(
rpci
->
nreaders
==
0
&&
!
list_empty
(
&
rpci
->
pipe
))
if
(
rpci
->
nreaders
==
0
&&
!
list_empty
(
&
rpci
->
pipe
))
__rpc_purge_upcall
(
inode
,
-
ETIMEDOUT
);
__rpc_purge_upcall
(
inode
,
-
ETIMEDOUT
);
out:
up
(
&
inode
->
i_sem
);
up
(
&
inode
->
i_sem
);
}
}
...
@@ -113,8 +116,6 @@ rpc_close_pipes(struct inode *inode)
...
@@ -113,8 +116,6 @@ rpc_close_pipes(struct inode *inode)
{
{
struct
rpc_inode
*
rpci
=
RPC_I
(
inode
);
struct
rpc_inode
*
rpci
=
RPC_I
(
inode
);
cancel_delayed_work
(
&
rpci
->
queue_timeout
);
flush_scheduled_work
();
down
(
&
inode
->
i_sem
);
down
(
&
inode
->
i_sem
);
if
(
rpci
->
ops
!=
NULL
)
{
if
(
rpci
->
ops
!=
NULL
)
{
rpci
->
nreaders
=
0
;
rpci
->
nreaders
=
0
;
...
@@ -127,6 +128,8 @@ rpc_close_pipes(struct inode *inode)
...
@@ -127,6 +128,8 @@ rpc_close_pipes(struct inode *inode)
}
}
rpc_inode_setowner
(
inode
,
NULL
);
rpc_inode_setowner
(
inode
,
NULL
);
up
(
&
inode
->
i_sem
);
up
(
&
inode
->
i_sem
);
cancel_delayed_work
(
&
rpci
->
queue_timeout
);
flush_scheduled_work
();
}
}
static
struct
inode
*
static
struct
inode
*
...
@@ -166,7 +169,7 @@ rpc_pipe_open(struct inode *inode, struct file *filp)
...
@@ -166,7 +169,7 @@ rpc_pipe_open(struct inode *inode, struct file *filp)
static
int
static
int
rpc_pipe_release
(
struct
inode
*
inode
,
struct
file
*
filp
)
rpc_pipe_release
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
{
struct
rpc_inode
*
rpci
=
RPC_I
(
filp
->
f_dentry
->
d_
inode
);
struct
rpc_inode
*
rpci
=
RPC_I
(
inode
);
struct
rpc_pipe_msg
*
msg
;
struct
rpc_pipe_msg
*
msg
;
down
(
&
inode
->
i_sem
);
down
(
&
inode
->
i_sem
);
...
...
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