On 01/10/15(Thu) 11:11, Hrvoje Popovski wrote:
> On 1.10.2015. 0:43, Stuart Henderson wrote:
> > In /sys/ddb/db_trap.c line 72, change if(panicstr != NULL) to if(1), it
> > should give you a backtrace and short ps (showing only the active process
> > on each cpu). These are now done automatically for panics, but not for
> > other ddb entries (which includes uvm faults).
>
>
> tnx ..
>
> here's screenshot
> http://kosjenka.srce.hr/~hrvoje/zaprocvat/crash2.jpg
Thanks for all your tests so far and your great reports.
Could you let me know if the diff below helps? I fear you're losing a
race between bpf_detachd() and the moment we grab the KERNEL_LOCK inside
_bpf_mtap().
Index: net//bpf.c
===================================================================
RCS file: /cvs/src/sys/net/bpf.c,v
retrieving revision 1.129
diff -u -p -r1.129 bpf.c
--- net//bpf.c 29 Sep 2015 10:58:51 -0000 1.129
+++ net//bpf.c 1 Oct 2015 09:22:51 -0000
@@ -1166,7 +1166,10 @@ bpf_tap(caddr_t arg, u_char *pkt, u_int
microtime(&tv);
KERNEL_LOCK();
- bpf_catchpacket(d, pkt, pktlen, slen, bcopy, &tv);
+ if (d->bd_bif != NULL) {
+ bpf_catchpacket(d, pkt, pktlen, slen,
+ bcopy, &tv);
+ }
KERNEL_UNLOCK();
if (d->bd_fildrop)
@@ -1250,8 +1253,10 @@ _bpf_mtap(caddr_t arg, struct mbuf *m, u
microtime(&tv);
KERNEL_LOCK();
- bpf_catchpacket(d, (u_char *)m, pktlen, slen,
- cpfn, &tv);
+ if (d->bd_bif != NULL) {
+ bpf_catchpacket(d, (u_char *)m, pktlen, slen,
+ cpfn, &tv);
+ }
KERNEL_UNLOCK();
if (d->bd_fildrop)