NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/49506: panic in bpf
The following reply was made to PR kern/49506; it has been noted by GNATS.
From: "Kamil Rytarowski" <n54%gmx.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: ozaki-r%netbsd.org@localhost
Subject: Re: kern/49506: panic in bpf
Date: Fri, 26 Dec 2014 06:40:39 +0100
Ryota Ozaki wrote:
> Hi,
>
> I think the below patch fixes the problem, but I cannot reproduce
> the panic and confirm the patch is correct. Kamil, do you have
> time to test it? or someone else?
>
> Thanks,
> ozaki-r
>
> diff --git a/sys/net/bpf.c b/sys/net/bpf.c
> index f66e783..e4d4164 100644
> --- a/sys/net/bpf.c
> +++ b/sys/net/bpf.c
> @@ -1388,7 +1388,7 @@ static inline void
> bpf_deliver(struct bpf_if *bp, void *(*cpfn)(void *, const void *, size_t),
> void *pkt, u_int pktlen, u_int buflen, const bool rcv)
> {
> - const bpf_ctx_t *bc = NULL;
> + const bpf_ctx_t *bc = bpf_default_ctx();
> uint32_t mem[BPF_MEMWORDS];
> bpf_args_t args = {
> .pkt = (const uint8_t *)pkt,
>
Thanks!
I'm going to test your patch. I will see whether I'm still able to reproduce the problem in my new network environment.
Home |
Main Index |
Thread Index |
Old Index