On 13/10/21(Wed) 11:41, Alexander Bluhm wrote:
> 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.

Indeed.  It should not be in DIAGNOSTIC, that's a leftover from previous
iteration of the diff, I'll fix both points before committing.

Thanks for the review.

Reply via email to