Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=62.96.220.36 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796129054; b=KA8O6AomkuYvtps+Jyl/baAFwpQKU4nUUtOevxsxGAFBSdf/w8vyKG0evj45oaltNt2s giUSZ8ti4toFfHRrG2SMjLipmPSJRRlKBOF6jq+UuRHpS3m47KajYNCjqzwEDT5hPxuVe li2THs1SLZu3CmHEOhJerH0ZVPv8PTWErVYZKyDKWB4LmDJGpoakiFs/mzjXvZKWM+CWV IQpK6Fmfz68pOGeC0FPH2dYuo1WnIB8zSZKbGDvRMIJRSzf9HmYiR5/v55Xbn0LSKeHge nN3yRdUhx+71qGgLOw/54wW1t72NsKvJQ7BbxL7C3TJzKK0Z5fgLrmHmWeCaRHVEgJg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796129054; h=DMARC-Filter:Received:X-Virus-Scanned:Received:Received:DKIM-Filter: DKIM-Signature:Received:Received:From:To:CC:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-Type:X-ClientProxiedBy; bh=wXrTlxjWT1dbq5Ml7D/jHtcCVGqvpm6hR60SYLNy3B0=; b=gps/aSX5YH30cC0R4ED/FsEElJ8o+5bH9np9g5/bkymqL1/vRHTg34iBKgCgyABu/vj7 SjixDb2d3QU3tPjfzJi+X3RNJ3ekUutkvFueYJQa2BgXsLJZxlM8P3XBpzTtf61f6OI6J adCq4XngTsx9aCyzOusI/XTfSsBET0bmDgMh8cvAgoY+fD6KBaBt2lUOaYnvtnoRzTLvT m+3gHs9iTrTX9lB7tygW4ZB/U3dmuXWIVEWM5ITKZ4Xi0gUq+l454GzZJbiZ6gLqiIm2b 1Zd6Gh4MGqwXvZS+IMmg9+5ObtWgHqgqufJmRhyyskG7l5T6Xr/Fr6koauHZANyE/WQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=secunet.com; spf=pass smtp.mailfrom=secunet.com; dkim=pass header.d=secunet.com header.i=@secunet.com header.a=rsa-sha256 header.s=202301 header.b=Ac2LVkLL; arc=none smtp.remote-ip=62.96.220.36 Received: from mx1.secunet.com (mx1.secunet.com [62.96.220.36]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7399760A2625 for ; Tue, 1 Dec 2026 12:44:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7399760A2625 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=secunet.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=secunet.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.a=rsa-sha256 header.s=202301 header.b=Ac2LVkLL Received: from localhost (localhost [127.0.0.1]) by mx1.secunet.com (Postfix) with ESMTP id 28CA9207C6; Tue, 1 Dec 2026 13:44:13 +0100 (CET) X-Virus-Scanned: by secunet Received: from mx1.secunet.com ([127.0.0.1]) by localhost (mx1.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fOJsS0r37zOL; Tue, 1 Dec 2026 13:44:12 +0100 (CET) Received: from EXCH-01.secunet.de (rl1.secunet.de [10.32.0.231]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.secunet.com (Postfix) with ESMTPS id 9075720684; Tue, 1 Dec 2026 13:44:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.secunet.com 9075720684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secunet.com; s=202301; t=1796129052; bh=wXrTlxjWT1dbq5Ml7D/jHtcCVGqvpm6hR60SYLNy3B0=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=Ac2LVkLLPnLQteIxbryu00xLCCuDrQxz7u+2ncGWoG8RgCQq56wYMl8dzUQeVE9lZ MGfnGbQKUJrGwQAP4C4rOeMmORXOvqKprvmgpWQ0BpXWi4vXKvcTsw0CUeKIE9zOjm g9yGxCCWcHoJvxQx50KN1AiI8nOGUYJEQhFHiCV5SnnKTyUTTyD1BULKyvyueHP8ps 7xq9ODnfsBNp2UvgEZOF9xSGsXUw9IMflvK175tZilBHeZ1tqJpizqSYyOxGb54sKz cnO2HjMEGHcIdDHecC+oABBUMNH0Eq00tY5Ho+ceh4cHeLPg2qYh3mGgCXeBN6YZf3 6up7i9/uXJsdw== Received: from gauss4 (10.182.7.102) by EXCH-01.secunet.de (10.32.0.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.49; Tue, 1 Dec 2026 13:44:12 +0100 Received: (nullmailer pid 1165803 invoked by uid 1000); Tue, 01 Dec 2026 12:43:56 -0000 From: Steffen Klassert To: David Miller , Jakub Kicinski CC: Herbert Xu , Steffen Klassert , Subject: [PATCH 12/22] xfrm: espintcp: read the socket error queue for MSG_ERRQUEUE Date: Tue, 1 Dec 2026 13:41:38 +0100 Message-ID: <20261201124252.1163254-13-steffen.klassert@secunet.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261201124252.1163254-1-steffen.klassert@secunet.com> References: <20261201124252.1163254-1-steffen.klassert@secunet.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EXCH-03.secunet.de (10.32.0.183) To EXCH-01.secunet.de (10.32.0.171) From: "Baek Kyu, Kim" An ESP-in-TCP socket can have a TX timestamp queued and report POLLERR, but recvmsg(MSG_ERRQUEUE) returns EAGAIN because espintcp_recvmsg() reads the IKE queue instead. If an IKE message is pending, the same call consumes that message as though it were an error-queue result. Handle MSG_ERRQUEUE through inet_recv_error() before reading the IKE queue. This exposes queued error metadata and leaves IKE messages for normal receive calls. Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)") Signed-off-by: Baek Kyu, Kim Signed-off-by: Steffen Klassert --- net/xfrm/espintcp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/xfrm/espintcp.c b/net/xfrm/espintcp.c index 4052ae5bbb2e..3e23900d6446 100644 --- a/net/xfrm/espintcp.c +++ b/net/xfrm/espintcp.c @@ -148,6 +148,9 @@ static int espintcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int copied; int off = 0; + if (unlikely(flags & MSG_ERRQUEUE)) + return inet_recv_error(sk, msg, len); + skb = __skb_recv_datagram(sk, &ctx->ike_queue, flags, &off, &err); if (!skb) { if (err == -EAGAIN && sk->sk_shutdown & RCV_SHUTDOWN) -- 2.53.0