On Sat, Oct 02, 2021 at 09:10:13AM +0200, Martin Pieuchot wrote:
> ok?

OK bluhm@

> +             /* Maxium number of events per iteration */

Maximum

> +int
> +pselcollect(struct proc *p, struct kevent *kevp, fd_set *pobits[3],
> +    int *ncollected)
> +{
> +#ifdef DIAGNOSTIC
> +     /* Filter out and lazily delete spurious events */
> +     if ((unsigned long)kevp->udata != p->p_kq_serial) {
> +             DPRINTFN(0, "select fd %u mismatched serial %lu\n",
> +                 (int)kevp->ident, p->p_kq_serial);
> +             kevp->flags = EV_DISABLE|EV_DELETE;
> +             kqueue_register(p->p_kq, kevp, p);
> +             return (0);
> +     }
> +#endif

Why is it DIAGNOSTIC?  Either it should not happen, then call panic().
Or it is a valid corner case, then remove #ifdef DIAGNOSTIC.

Different behavior with and without DIAGNOSTIC seems bad.

Reply via email to