crash in bpf catchpacket() code

Chris Torek torek at elf.torek.net
Sun Aug 10 19:01:09 UTC 2014


>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


More information about the freebsd-hackers mailing list