mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
fasync: release the FileAsync mutex before sending the signal
Reported-by: syzbot+dd952ecd2e4147d69edb@syzkaller.appspotmail.com Reported-by: syzbot+d9a2afb847ffabe49fbe@syzkaller.appspotmail.com PiperOrigin-RevId: 537942317
This commit is contained in:
@@ -85,12 +85,12 @@ type FileAsync struct {
|
||||
recipientT *kernel.Task
|
||||
}
|
||||
|
||||
// NotifyEvent implements waiter.EventListener.NotifyEvent.
|
||||
func (a *FileAsync) NotifyEvent(mask waiter.EventMask) {
|
||||
func (a *FileAsync) recipient() *kernel.Task {
|
||||
a.mu.Lock()
|
||||
defer a.mu.Unlock()
|
||||
if !a.registered {
|
||||
return
|
||||
// No recipient has been registered.
|
||||
return nil
|
||||
}
|
||||
t := a.recipientT
|
||||
tg := a.recipientTG
|
||||
@@ -100,8 +100,13 @@ func (a *FileAsync) NotifyEvent(mask waiter.EventMask) {
|
||||
if tg != nil {
|
||||
t = tg.Leader()
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
||||
// NotifyEvent implements waiter.EventListener.NotifyEvent.
|
||||
func (a *FileAsync) NotifyEvent(mask waiter.EventMask) {
|
||||
t := a.recipient()
|
||||
if t == nil {
|
||||
// No recipient has been registered.
|
||||
return
|
||||
}
|
||||
c := t.Credentials()
|
||||
|
||||
Reference in New Issue
Block a user