From 4f71d026f8087303d3275d6eb52644273d89fa85 Mon Sep 17 00:00:00 2001 From: csjp Date: Sat, 5 Jul 2008 20:11:28 +0000 Subject: 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 --- sys/net/bpf_zerocopy.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/net/bpf_zerocopy.h') 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); -- cgit v1.1