projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
1cdc323
)
PIPE - Fix a panic introduced by the last commit.
author
Matthew Dillon <dillon@apollo.backplane.com>
Tue, 8 Sep 2009 18:28:14 +0000 (11:28 -0700)
committer
Matthew Dillon <dillon@apollo.backplane.com>
Tue, 8 Sep 2009 18:28:14 +0000 (11:28 -0700)
* Forgot to release a token on the Re-tests.
Reported-by: Tobias Weingartner <weingart@tepid.org>
sys/kern/sys_pipe.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/kern/sys_pipe.c
b/sys/kern/sys_pipe.c
index
67eea50
..
bc7812a
100644
(file)
--- a/
sys/kern/sys_pipe.c
+++ b/
sys/kern/sys_pipe.c
@@
-597,8
+597,10
@@
pipe_read(struct file *fp, struct uio *uio, struct ucred *cred, int fflags)
* Retest EOF - acquiring a new token can temporarily release
* tokens already held.
*/
- if (rpipe->pipe_state & PIPE_REOF)
+ if (rpipe->pipe_state & PIPE_REOF) {
+ lwkt_reltoken(&wlock);
break;
+ }
/*
* If there is no more to read in the pipe, reset its
@@
-908,6
+910,7
@@
pipe_write(struct file *fp, struct uio *uio, struct ucred *cred, int fflags)
* tokens already held.
*/
if (wpipe->pipe_state & PIPE_WEOF) {
+ lwkt_reltoken(&rlock);
error = EPIPE;
break;
}