Closed cfergeau closed 9 months ago
/lgtm /approve
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: praveenkumar Once this PR has been reviewed and has the lgtm label, please ask for approval from cfergeau. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
When ConnectVSockSync fails in watchWakeupNotifications(), the returned net.Conn contains a nil value, but is not a nil interface (ie checking it for
== nil
returns false). This means we'll try to callClose()
on the connection, which will cause a nil pointer dereference. See https://go.dev/doc/faq#nil_error and https://groups.google.com/g/golang-nuts/c/wnH302gBa4I for details about this behaviour.This bug is fixed by returning a nil interface when
vsockDevice.Connect(uint32(port))
returns an error.