mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Don't hold nic.mu when calling n.linkResQueue.cancel.
Reported-by: syzbot+0a308dd93b1cc6f98dcb@syzkaller.appspotmail.com PiperOrigin-RevId: 495756802
This commit is contained in:
committed by
gVisor bot
parent
54dafa76c2
commit
bc440b67fc
@@ -299,7 +299,6 @@ func (n *nic) enable() tcpip.Error {
|
||||
// stack.
|
||||
func (n *nic) remove() tcpip.Error {
|
||||
n.mu.Lock()
|
||||
defer n.mu.Unlock()
|
||||
|
||||
n.disableLocked()
|
||||
|
||||
@@ -307,10 +306,13 @@ func (n *nic) remove() tcpip.Error {
|
||||
ep.Close()
|
||||
}
|
||||
|
||||
n.mu.Unlock()
|
||||
|
||||
// Shutdown GRO.
|
||||
n.gro.close()
|
||||
|
||||
// drain and drop any packets pending link resolution.
|
||||
// Drain and drop any packets pending link resolution.
|
||||
// We must not hold n.mu here.
|
||||
n.linkResQueue.cancel()
|
||||
|
||||
// Prevent packets from going down to the link before shutting the link down.
|
||||
|
||||
Reference in New Issue
Block a user