mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Use notify explicitly on unlock path.
There are circumstances under which the redpill call will not generate the appropriate action and notification. Replace this call with an explicit notification, which is guaranteed to transition as well as perform the futex wake. PiperOrigin-RevId: 200726934 Change-Id: Ie19e008a6007692dd7335a31a8b59f0af6e54aaa
This commit is contained in:
@@ -397,7 +397,7 @@ func (c *vCPU) unlock() {
|
||||
case vCPUUser | vCPUGuest | vCPUWaiter:
|
||||
// Force a transition: this must trigger a notification when we
|
||||
// return from guest mode.
|
||||
redpill()
|
||||
c.notify()
|
||||
case vCPUUser | vCPUWaiter:
|
||||
// Waiting for the lock to be released; the responsibility is
|
||||
// on us to notify the waiter and clear the associated bit.
|
||||
|
||||
Reference in New Issue
Block a user