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
This commit is contained in:
Luiz Otavio O Souza 2015-08-03 18:22:31 +00:00
parent 8f980c016b
commit 98fa5d858c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286243

View File

@ -2412,6 +2412,7 @@ catchpacket(struct bpf_d *d, u_char *pkt, u_int pktlen, u_int snaplen,
++d->bd_dcount;
return;
}
KASSERT(!d->bd_hbuf_in_use, ("hold buffer is in use"));
ROTATE_BUFFERS(d);
do_wakeup = 1;
curlen = 0;