> On 30 Jan 2023, at 06:39, Visa Hankala <[email protected]> wrote:
> 
> Replace selwakeup() with KNOTE() in tun(4) and tap(4).
> 
> This patch makes the tun(4) and tap(4) event filters MP-safe.
> 
> This is similar to the change that just got committed to pppac(4)
> and pppx(4). However, tun(4) and tap(4) can be destroyed abruptly,
> so klist_invalidate() has to be kept in tun_clone_destroy().
> 
> The selwakeup() call in tun_dev_close() can be removed. If the device
> is closed peacefully, the klists get cleared automatically and waiters
> notified before the close routine is invoked. On abrupt detach,
> klist_invalidate() in tun_clone_destroy() should clear any lingering
> knotes.
> 
> OK?
> 

Does it make sense to introduce something like KNOTE_UNLOCKED()
to push lock acquisition within?

Reply via email to