diff options
author | rwatson <rwatson@FreeBSD.org> | 2008-02-02 20:35:05 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2008-02-02 20:35:05 +0000 |
commit | b3df56a7f6c5ba056c57c32e556a5e82edc9a880 (patch) | |
tree | 0aa15b84aaaa70bc4796c3f243bcbc12dc64ff30 /sys/net/bpf.c | |
parent | 9dfc4839d1bf390b26c2b3d1de5a655ba15ce797 (diff) | |
download | FreeBSD-src-b3df56a7f6c5ba056c57c32e556a5e82edc9a880.zip FreeBSD-src-b3df56a7f6c5ba056c57c32e556a5e82edc9a880.tar.gz |
Add comment that bpfread() has multi-threading issues.
Fix minor white space nit.
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r-- | sys/net/bpf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 63e868e..66ee80a 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. */ |