Re: race condition in knote deletion?

看板DFBSD_kernel作者時間15年前 (2011/02/02 09:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/7 (看更多)
: kn->kn_status |= KN_DELETING | KN_REPROCESS; : :So wouldn't another cpu running knote_release() while the 1st one :sleeps call knote_detach_and_drop() too :causing a crash when the 1st cpu resumes? Only the thread which set KN_PROCESSING can release the knote, so it shouldn't be possible. Other threads will see that KN_PROCESSING is already set and not try to do anything drastic to the knote. -Matt Matthew Dillon <dillon@backplane.com>
文章代碼(AID): #1DIBGM4t (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #1DIBGM4t (DFBSD_kernel)