mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Generate notification when closing host fd.
Thanks ianlewis@ for discovering the bug/fix! PiperOrigin-RevId: 368740744
This commit is contained in:
@@ -460,6 +460,9 @@ func (i *inode) DecRef(ctx context.Context) {
|
||||
if err := unix.Close(i.hostFD); err != nil {
|
||||
log.Warningf("failed to close host fd %d: %v", i.hostFD, err)
|
||||
}
|
||||
// We can't rely on fdnotifier when closing the fd, because the event may race
|
||||
// with fdnotifier.RemoveFD. Instead, notify the queue explicitly.
|
||||
i.queue.Notify(waiter.EventHUp | waiter.ReadableEvents | waiter.WritableEvents)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user