Date: Wed, 31 Jan 2007 11:16:31 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 113755 for review Message-ID: <200701311116.l0VBGVfE021628@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113755 Change 113755 by rwatson@rwatson_cinnamon on 2007/01/31 11:16:23 Reintroduce dropped size bound on the size of individual zero-copy buffer regions. Affected files ... .. //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#6 edit Differences ... ==== //depot/projects/zcopybpf/src/sys/net/bpf_zerocopy.c#6 (text+ko) ==== @@ -196,6 +196,13 @@ return (EINVAL); } + /* Length must not exceed per-buffer resource limit. */ + if ((len / PAGE_SIZE) > BPF_MAX_PAGES) { + // printf("zbuf_setup: len %d greater than max %d\n", len, + // BPF_MAX_PAGES * PAGE_SIZE); + return (EINVAL); + } + error = 0; zb = malloc(sizeof(*zb), M_BPF, M_ZERO | M_WAITOK); zb->zb_uaddr = uaddr;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701311116.l0VBGVfE021628>