Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: panic with bpf-using tool



On Thu, Dec 7, 2017 at 6:54 PM, Thomas Klausner <tk%giga.or.at@localhost> wrote:
> I just started net/trafshow for fun and shortly afterwards the machine
> paniced (NetBSD 8.99.7/amd64):
>
> WARNING: SPL NOT LOWERED ON SYSCALL 1 235601568 EXIT 176106b0 7
> WARNING: SPL NOT LOWERED ON SYSCALL 1 235601568 EXIT 176106b0 7
> vpanic() at netbsd:vpanic+0x140
> snprintf() at netbsd:snprintf
> lockdebug_abort() at netbsd:lockdebug_abort+0x6e
> mutex_vector_exit() at netbsd:mutex_vector_exit+0xe4
> callout_halt() at netbsd:callout_halt+0xe6
> bpf_read() at netbsd:bpf_read+0x199
> dofileread() at netbsd:dofileread+0x8f
> sys_read() at netbsd:sys_read+0x5f
> syscall() at netbsd:syscall+0x1d8
> --- syscall (number 3) ---
> 7bb169e3e1fa:
> cpu9: End traceback...
>
> Any ideas?

Oops. Could you try the below patch?

Thanks,
  ozaki-r

diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index c4bd8306042..64c9d4900bd 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -662,7 +662,7 @@ bpf_read(struct file *fp, off_t *offp, struct uio *uio,

        mutex_enter(d->bd_mtx);
        if (d->bd_state == BPF_WAITING)
-               callout_halt(&d->bd_callout, d->bd_buf_mtx);
+               callout_halt(&d->bd_callout, d->bd_mtx);
        timed_out = (d->bd_state == BPF_TIMED_OUT);
        d->bd_state = BPF_IDLE;
        mutex_exit(d->bd_mtx);


Home | Main Index | Thread Index | Old Index