diff options
author | csjp <csjp@FreeBSD.org> | 2008-07-05 20:11:28 +0000 |
---|---|---|
committer | csjp <csjp@FreeBSD.org> | 2008-07-05 20:11:28 +0000 |
commit | 4f71d026f8087303d3275d6eb52644273d89fa85 (patch) | |
tree | 74143742684e31feda258eda605fa03ea431ec16 /sys/net/bpf_zerocopy.h | |
parent | f53bcee721b132e008c9544f7d685a087fbe6f06 (diff) | |
download | FreeBSD-src-4f71d026f8087303d3275d6eb52644273d89fa85.zip FreeBSD-src-4f71d026f8087303d3275d6eb52644273d89fa85.tar.gz |
Make sure we are clearing the ZBUF_FLAG_IMMUTABLE any time a free buffer
is reclaimed by the kernel. This fixes a bug resulted in the kernel
over writing packet data while user-space was still processing it when
zerocopy is enabled. (Or a panic if invariants was enabled).
Discussed with: rwatson
Diffstat (limited to 'sys/net/bpf_zerocopy.h')
-rw-r--r-- | sys/net/bpf_zerocopy.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/bpf_zerocopy.h b/sys/net/bpf_zerocopy.h index 92186a8..c541a15 100644 --- a/sys/net/bpf_zerocopy.h +++ b/sys/net/bpf_zerocopy.h @@ -42,6 +42,7 @@ void bpf_zerocopy_append_mbuf(struct bpf_d *d, caddr_t buf, u_int offset, void *src, u_int len); void bpf_zerocopy_buffull(struct bpf_d *); void bpf_zerocopy_bufheld(struct bpf_d *); +void bpf_zerocopy_buf_reclaimed(struct bpf_d *); int bpf_zerocopy_canfreebuf(struct bpf_d *); int bpf_zerocopy_canwritebuf(struct bpf_d *); void bpf_zerocopy_free(struct bpf_d *d); |