🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #6116

Re: [PATCH bpf] bpf, sockmap: use READ_ONCE/WRITE_ONCE for saved_data_ready in the verdict path

#6116
From: "Alexei Starovoitov"
Date: Wed, 21 Oct 2026 16:45
12 lines
11118 bytes
On Wed, Oct 21, 2026 at 08:56 AM Dudu Lu <phx0fer@gmail.com> wrote:
> sk_psock_stop_strp() uses WRITE_ONCE for the same field.  sock_map_link()
> / sock_map_unref() touch the same psock from another CPU without the
> lock, so KCSAN reports the race:
>
>   BUG: KCSAN: data-race in sock_map_link / sock_map_unref
>   BUG: KCSAN: data-race in sk_psock_start_verdict / sock_map_unref

sashiko is right. KCSAN will print both with this patch applied.

pw-bot: cr
Technical Details
Message-ID: <DMAO25C5MTPO.1PS8C0R1D0KP2@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350153-linux-kernel-netdev=dewy.ru
References: <20261021155629.68813-1-phx0fer@gmail.com>

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-350153-linux-kernel-netdev=dewy.ru
From: alexei.starovoitov@gmail.com ("Alexei Starovoitov")
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH bpf] bpf, sockmap: use READ_ONCE/WRITE_ONCE for
 saved_data_ready in the verdict path
Date: Wed, 21 Oct 2026 16:45:10 +0000
Organization: Usenet Network
Message-ID: <DMAO25C5MTPO.1PS8C0R1D0KP2@gmail.com>
References: <20261021155629.68813-1-phx0fer@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="8690"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:cZ8Inx44H4tQhWdx2B6pZAYN0wc= sha256:Kqi7iKExhw56+5ZBaaeDb+647Z5TUdyTnBhQdr9i2CI=
	sha1:rW/LKf8rKNQ8pLHCR4NbfDt5Cgo= sha256:yecT/hg1R0FPFt0WDUNxx2Owdu4V3LJhKkJVkgDkMtU=
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 8B2C71110A0; Wed, 21 Oct 2026 19:45:55 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, 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=gmail.com
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 REEUOGDiub9L;
	Wed, 21 Oct 2026 19:45:53 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-350153-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id DB0BA111072; Wed, 21 Oct 2026 19:45:42 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 5CD113524C; Wed, 21 Oct 2026 16:45:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792601114;
	b=11LduOElciyDzGG6au2WRX2BpBi83XNkNKtbu0WlXWri8//C66IhhCV7slXl3tywaNaH
	 RXn78ZFUJWSk/lEEcUnRCsaGmIubn6AHdYYcqezmpwIYhITuAEWixxOhmx+NETeo6jxw/
	 UHvEphA7QnnH7kj79f8JHTpsyksmqLRMgaM04WtbzRtcl02hXCAqBqYDp1UymT6gIWVan
	 Fl1Ol0bLaPRoq0qi0HgdZtPWElKSLuYLQt1x3th6JAOtr2Mc8UeSYMKwxW+l3ZlKdZZe6
	 XExW6DyM/5v4TeAczcjFmZGzZ1Fz+fwGaw7upWMXIDliDV7+f6T9C5csNaVqWwa9H2g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792601114;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:Content-Type:Date:Message-Id:Cc:Subject:From:To:In-Reply-To:
	 References:X-Mailer:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=Y299WPPaxWRE9ha0hJbAEz/L7is2XLFDnYowFbrmq1A=;
	b=IOLlsR7l66ZBqo5VF3xl8EukschNVoy4r4lY3a17kauURPmJ+hLKs8TRAw/0tuglfnBU
	 yriIh3NR9wCbBBhHjkAksikBlDJASi8V/UGBZgQeLCWKopdW7gOOaAdSxUYLVlkJ2mEXB
	 N2qg2GOP9pcn/u7wBXMRirr4aaPZ272BcShFeC/6caHqJKIRl/kEir1587E67UQ8pU4+N
	 62BI56iuwR/ILGyIGDIpgasFk9rLk03VzPoy47WNYGKzf4JqBgcZB4IoWHiVVeYepu3HR
	 Wi4BeSyC5tRUoh4KXpsfy8NDPvik22zIrGjNTz8/RVHD2LAfJRw9qX+X3D3dcM/YMUQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=nMsOImcV;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F58A606A32A;
	Wed, 21 Oct 2026 16:45:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=nMsOImcV
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792601113;
	b=JFRH8PQJVPDC1HBj6ecuo+nTr1+9JggW6LVW0aAglDntzOTsVWG1eLZ2eUTK5e5H66Sq
	 nhplt+umGO+9RbZg2RoR6mE7vuh1O+rm90SgyJFAqJaku5fMbfF0wB0erFK1qlub/5gKA
	 raCRDWWQFlSf1sFnydomIbum8sceaVA52V7wERNmjG/rKB9fekzv39/GaGNCT9j2/fNf9
	 iVAbLOIGY5A6ApvA0bvr3MAmrjHIcQO/uNFkAGCYj96/7FsTQf2klEoZjXmW1xrHvTX7H
	 uEIYYe1itcP0WfXFtYvFPScuO7kkZ1XDXJA++EWRc+BJ1G/APmvmu0q+Q/TU/MeqFng==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792601113;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Content-Type:Date:
	 Message-Id:Cc:Subject:From:To:In-Reply-To:References:X-Mailer:
	 Content-Transfer-Encoding:MIME-Version;
	bh=Y299WPPaxWRE9ha0hJbAEz/L7is2XLFDnYowFbrmq1A=;
	b=WatNp0xGlwePgLfutpDCnWHawL31qliEU9aw1/8fnJArKgg6KdMxIGaxy5me5vaSmjIy
	 hubXy/EGheYgyC00r4zCYSpvu09gXYdk086WQ/U1iCX5HhZtQeN01vtDag+nVUxb+8200
	 7lPvru7eKEwcle64K8jj/d42kJ2v8W20frBWMhKvLvxdt4HOnhgh/psVwI1LuCoqJlt9W
	 CcFmoUoqtV0S2teZAu65mW1MGMVzfmgYBnkVLKS5q8G2pCwfewEZt5TRDbopEm6odckGT
	 /StZMSnpJ0HZ7+MQhKAupU2PVegsPfLlZ99kUJY0ZkLWZqhC+/q34m6+RXXQSxb9EPw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=nMsOImcV;
	arc=none smtp.remote-ip=209.85.216.47
X-Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2C75606A31F
	for <netdev@vger.kernel.org>; Wed, 21 Oct 2026 16:45:12 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E2C75606A31F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-3ab752f6244so787628a91.2
        for <netdev@vger.kernel.org>; Wed, 21 Oct 2026 09:45:12 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792601112; x=1793205912; darn=vger.kernel.org;
        h=mime-version:content-transfer-encoding:references:in-reply-to:to
         :from:subject:cc:message-id:date:content-type:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=Y299WPPaxWRE9ha0hJbAEz/L7is2XLFDnYowFbrmq1A=;
        b=nMsOImcVkm/FZH/V0VjYQmpbt2YaIMt0P0dxfSN1jZ6h6rCtW5BuNgoERp+DqxUTeK
         W+y1TT8vcfcIem851lDwk5ixlioQhKsY4qlqP9HRAG/eaigUSRGZZRM0jjLYKlbu6mC7
         M843aU6fyX0neTfZUimBqUV1d7r+HTOx8ZnvbXphOsMblz0e+5aLp+7tf7hvs5VrjFRq
         4LA50+/PSvpFa4rN+8mADRHkfFuL9UMG0XRjJUpkxCz9JGYLd23ruh9jBpegPycYFugE
         XeqEvtNBYYb7ZnjoezBOTEQJOHKvnasTinHSYHr3GrApogq8luAek1jMLoGP4VLGQldm
         NW7w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792601112; x=1793205912;
        h=mime-version:content-transfer-encoding:references:in-reply-to:to
         :from:subject:cc:message-id:date:content-type:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=Y299WPPaxWRE9ha0hJbAEz/L7is2XLFDnYowFbrmq1A=;
        b=tlZCpcJ4LYhxy1uf1oZ6brO9ylvOSlZ81b+pbVYHskoVwJWv4u38ONjMK5+qoxRf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s+GLQ6eInqNMBQ79iObnfv7VxARulxn
X-Received: by 2002:a17:90b:17c5:b0:3ac:adce:60be with SMTP id 98e67ed59e1d1-3ad86f44ed6mr2508283a91.21.1792601112182;
        Wed, 21 Oct 2026 09:45:12 -0700 (PDT)
X-Received: from localhost ([153.61.198.247])
        by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cd6b8645bf7sm265815a12.28.2026.10.21.09.45.11
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Wed, 21 Oct 2026 09:45:11 -0700 (PDT)
X-Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>
X-In-Reply-To: <20261021155629.68813-1-phx0fer@gmail.com>
X-Mailer: mkdraft (claude review draft; edit before sending)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list