--- libaitio/src/bpf.c 2013/06/25 08:53:22 1.1.2.8 +++ libaitio/src/bpf.c 2013/06/25 08:55:02 1.1.2.9 @@ -226,7 +226,8 @@ nextZCbuf(void ** __restrict zcache, struct bpf_zbuf * if (buf) buf = ((caddr_t) *zcache) + sizeof(struct bpf_zbuf_header); ackZCbuf(bzh); - } + } else + io_SetErr(EAGAIN, "kernel owns the buffer"); } else if (*zcache == zbuf->bz_bufa) { bzh = (struct bpf_zbuf_header *) zbuf->bz_bufb; if (chkZCbuf(bzh)) { @@ -235,7 +236,8 @@ nextZCbuf(void ** __restrict zcache, struct bpf_zbuf * if (buf) buf = ((caddr_t) *zcache) + sizeof(struct bpf_zbuf_header); ackZCbuf(bzh); - } + } else + io_SetErr(EAGAIN, "kernel owns the buffer"); } return rlen;