Re: [PATCH net] net/smc: fix missing sk_err when TCP handshake fails

From: patchwork-bot+netdevbpf

Date: Thu May 07 2026 - 11:53:48 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Wed, 6 May 2026 09:41:05 +0800 you wrote:
> In smc_connect_work(), when the underlying TCP handshake fails, the error
> code (rc) must be propagated to sk_err to ensure userspace can correctly
> retrieve the error status via SO_ERROR. Currently, the code only handles
> a restricted set of error codes (e.g., EPIPE, ECONNREFUSED). If other
> errors occurs, such as EHOSTUNREACH, sk_err remains unset (zero).
>
> This affects applications that rely on SO_ERROR to determine connect
> outcome. For example, higher versions of Go's netpoller treats
> SO_ERROR == 0 combined with a failed getpeername() as a spurious wakeup
> and re-enters epoll_wait(). Under ET mode, no further edge will be
> generated since the socket is already in a terminal state, causing the
> connect to hang indefinitely or until a user-specified timeout, if one
> is set.
>
> [...]

Here is the summary with links:
- [net] net/smc: fix missing sk_err when TCP handshake fails
https://git.kernel.org/netdev/net/c/9032f7676935

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html