in sk_attach_filter:
if((err = sk_chk_filter(fprog->filter, fprog->len)))
seems to indicate that sk_chk_filter is intended to return
0 on error, != 0 on success.
The following return (err); however would return 0 in the
error case.
sk_chk_filter itself follows the 0 on error semantics at its end
return (BPF_CLASS(filter[flen - 1].code) == BPF_RET);
but has a few return -EINVAL; in its body...
Tom