svn commit: r286243 - head/sys/net

Luiz Otavio O Souza loos at FreeBSD.org
Mon Aug 3 18:22:32 UTC 2015


Author: loos
Date: Mon Aug  3 18:22:31 2015
New Revision: 286243
URL: https://svnweb.freebsd.org/changeset/base/286243

Log:
  Add a KASSERT() to make sure we wont rotate the buffers twice (rotate the
  buffers while the hold buffer is in use).
  
  Suggested by:	ed, ghelmer
  MFC with:	r286142

Modified:
  head/sys/net/bpf.c

Modified: head/sys/net/bpf.c
==============================================================================
--- head/sys/net/bpf.c	Mon Aug  3 17:47:02 2015	(r286242)
+++ head/sys/net/bpf.c	Mon Aug  3 18:22:31 2015	(r286243)
@@ -2412,6 +2412,7 @@ catchpacket(struct bpf_d *d, u_char *pkt
 			++d->bd_dcount;
 			return;
 		}
+		KASSERT(!d->bd_hbuf_in_use, ("hold buffer is in use"));
 		ROTATE_BUFFERS(d);
 		do_wakeup = 1;
 		curlen = 0;


More information about the svn-src-all mailing list