Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Aug 2015 18:22:31 +0000 (UTC)
From:      Luiz Otavio O Souza <loos@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286243 - head/sys/net
Message-ID:  <201508031822.t73IMVri042758@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508031822.t73IMVri042758>