Article View: linux.kernel.netdev
Article #3801Re: [PATCH net-next v3 1/2] tls: annotate lockless access to sk->sk_err
From: Jakub Kicinski
Date: Fri, 16 Oct 2026 02:04
Date: Fri, 16 Oct 2026 02:04
18 lines
6027 bytes
6027 bytes
On Sat, 10 Oct 2026 07:46:28 -0700 Quanye Yang via B4 Relay wrote:
> + if (has_copied) {
> + int err = READ_ONCE(sk->sk_err);
> +
> + if (err)
> + return -err;
> + } else {
> + int err = sock_error(sk);
> +
> + if (err)
> + return err;
the int err declaration force you to add ugly empty
lines, just decl skerr at the top level of the func
and use it here and in the chunk below
--
pw-bot: cr
Technical Details
Message-ID:
<20261015190414.000e83dd@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347055-linux-kernel-netdev=dewy.ruReferences:
<20261010-tls-fix-sk-kcsan-err-v3-0-e28aadeb31ad@proton.me> <20261010-tls-fix-sk-kcsan-err-v3-1-e28aadeb31ad@proton.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-347055-linux-kernel-netdev=dewy.ru From: kuba@kernel.org (Jakub Kicinski) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v3 1/2] tls: annotate lockless access to sk->sk_err Date: Thu, 15 Oct 2026 19:04:14 -0700 Organization: Usenet Network Message-ID: <20261015190414.000e83dd@kernel.org> References: <20261010-tls-fix-sk-kcsan-err-v3-0-e28aadeb31ad@proton.me> <20261010-tls-fix-sk-kcsan-err-v3-1-e28aadeb31ad@proton.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="2665392"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:fFj0badn4ZxkCTg9oCq8evHmhQc= sha256:iob2xlLBsveYjy2YubL963LnsxkHdEWIQfjp1O8UF2g= sha1:YGdgyNE1RdesyZMTTcWziC4F2QI= sha256:7JsffQyILbAX5dSzDST+gs1vEk8B9Jf3h0M6uIZbCgA= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 59F22110432; Fri, 16 Oct 2026 05:04:33 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -1.34 X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3ePHMGhpeASw; Fri, 16 Oct 2026 05:04:31 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-347055-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id A49A51103E6; Fri, 16 Oct 2026 05:04:20 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 8214F31557; Fri, 16 Oct 2026 02:04:17 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A3A5382F35; Fri, 16 Oct 2026 02:04:16 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YrQh5WU6" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A83B422D7A1; Fri, 16 Oct 2026 02:04:15 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792116256; cv=none; b=ApHh2Z4+dW7o8uuEkdCRQbdkuJzXhtNR7oJiJ3mxH3e8M/Yx6te7cQ9eoKnWNSkmGNnZr5JyG1FijMchJPlDIhLBTRoyQ4Lvvp48+bE6/FUSzmPACP56C7BLQXBLjBHHbniue0e9IuMIOc7cU+BRtMsjMqOZOrY5eIc21w2hCgU= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792116256; c=relaxed/simple; bh=Ek1V+N7g1D2a4bZSwwuQseWVPWHykaYNi0E7PzhBNKY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZsT/57WNW03mF7kowuDw/VqTnplgdr9Ao+F2ZSrMJ3vShZawtBghN2EIsrIlGiomQVGL6uk6yCT6waRxpFGRu6VwGVa8ojM3RLs0w1leIFLD43AeaQSqjhYcwDRlRLx31kkIO213gpiq5s2uLDIC8/MlF+6d5Nv5WQMptB6OvYw= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YrQh5WU6; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D514A1F000C4; Fri, 16 Oct 2026 02:04:14 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792116255; bh=1Fukj1dfV1IvigqoxcDUAtpNDbjYsN/ZWbsZDQKeTMI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=YrQh5WU6+oNMTDVjYV1QtxM+nzrJ5Wnz9YbF+6PQZKa2BV1Qm/PZVPTqGyaoSgJbR 3GfL6KfeVrGfEy016lQADy+4pQ8lY+arXD9lh++6AZb+PUUMKZQnYyh+T57vXytWao gbOid5qjeG63pey29xVn3D/6+Wsqfpj5BZb+AsAiDNNk7CdNzlgaVTglDXK17EY+Xb 2J7selcd/zCvatRe4d+an0M+lPQhKF3rLt3rs1AEp0/fw81DKsXC97UnmTZ+1Dwd97 OHSK+cQ1L8l24jszIJHNZEobv/D6oLv+XnmSjSlNupukLjlPy1GtyZLLgv3LeScAsM +qKXuW7YCp1IA== X-Cc: quanyeyang@proton.me, John Fastabend <john.fastabend@gmail.com>, Sabrina Dubroca <sd@queasysnail.net>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Jakub Sitnicki <jakub@cloudflare.com>, Jiayuan Chen <jiayuan.chen@linux.dev>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org X-In-Reply-To: <20261010-tls-fix-sk-kcsan-err-v3-1-e28aadeb31ad@proton.me> X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>