Re: kevent has bug?

看板FB_current作者時間12年前 (2014/04/04 07:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串10/11 (看更多)
From: Konstantin Belousov <kostikbel@gmail.com> Date: Thu, 3 Apr 2014 16:48:14 +0300 > On Thu, Apr 03, 2014 at 06:26:56PM +0900, Kohji Okuno wrote: >> > The done_ev_add case is indeed missed in my patch, thank you for noting. >> > The case of EV_ADD does not need the KN_SCAN workaround, IMO, since the >> > race is possible just by the nature of adding the knote. > >> I think, we should add KN_SCAN after knote_attach() in >> kqueue_register(), too. What do you think about this? > See above, I noted this case in the previous mail. This may be elaborated. > > First, I think it is technically incorrect to allow the event > notification before the f_attach() method is finished. So the KN_SCAN > flag could be set only after f_attach() call, but due to both kq and > knlist not locked there, we still have the same race. And this race is > in fact acceptable, since it is the race between application calling > EV_ADD, and external event occuring, which cannot be avoided. Until the > kevent(EV_ADD) syscall returned, we do not have an obligation to report > the event from the kqfd. Having the race somewhat bigger by not setting > KN_SCAN is fine in my opinion. Hi, Thank you for your detailed commnet. And I uderstood about your opinion. By the way, do you commit your change to HEAD? Regards, Kohji Okuno _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1JFUWlxT (FB_current)
文章代碼(AID): #1JFUWlxT (FB_current)