Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Aug 2014 13:01:07 -0600 (MDT)
From:      Chris Torek <torek@elf.torek.net>
To:        adrian@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: crash in bpf catchpacket() code
Message-ID:  <201408101901.s7AJ17Lu006439@elf.torek.net>
In-Reply-To: <CAJ-VmonfSfsU1zwN5t-zgwbFeQm7zV1ikihYHzryjv3nWseBmQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>Would you mind submitting a PR for this? You've done all the great
>work needed to chase this down; I'd hate for it to be forgotten!

Sent.  I expanded a bit more on some thoughts about the other
mtx_sleep case in the code (in the zero copy stuff); the patch
I gave may leave a bug there, and is probably sub-optimal (I was
going for a minimal change that would keep our system from
crashing :-) ).

(Although a "goto restart" after mtx_sleep'ing would also be not
exactly optimal, as we'd redo a bunch of effectively constant
work.  Anyway the root of the bug appears to be that mtx_sleep
drops our bpf_d descriptor lock and the code assumes we hold it
throughout.)

Chris



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