aboutsummaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2008-02-02 20:35:05 +0000
committerRobert Watson <rwatson@FreeBSD.org>2008-02-02 20:35:05 +0000
commit31b32e6dc3c5b7441d55ab156020fc266c04fd63 (patch)
tree0aa15b84aaaa70bc4796c3f243bcbc12dc64ff30 /sys/net
parente805c0019d67bfa279d3de9621c9617a9ab60f0c (diff)
downloadsrc-31b32e6dc3c5b7441d55ab156020fc266c04fd63.tar.gz
src-31b32e6dc3c5b7441d55ab156020fc266c04fd63.zip
Add comment that bpfread() has multi-threading issues.
Fix minor white space nit.
Notes
Notes: svn path=/head/; revision=175903
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 63e868e6f3f4..66ee80ae8195 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -562,6 +562,10 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag)
* Move data from hold buffer into user space.
* We know the entire buffer is transferred since
* we checked above that the read buffer is bpf_bufsize bytes.
+ *
+ * XXXRW: More synchronization needed here: what if a second thread
+ * issues a read on the same fd at the same time? Don't want this
+ * getting invalidated.
*/
error = uiomove(d->bd_hbuf, d->bd_hlen, uio);
@@ -574,7 +578,6 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag)
return (error);
}
-
/*
* If there are processes sleeping on this descriptor, wake them up.
*/