From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.215.171 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796434571; b=OYFeeIi0V2VyuHlNorjM44cE/94LWy/Jx7q1UPis1xL3JSgk93q1AA9pQKdjPiS7EWbN aGbryLBgmBr0YiSjtyJK8zMFX+TurD82+IWyIfUJLtl0LLV6iiLf1i/tLSJOphynQ3gmF ohoc4klCn5Ow2lEoTNS+3TLpiuwr52x0MKiRkjKcF3NnRWdlFlx49z96HDCQ698cclpXB LiLPbRIWhhk63e3a9sgSBJMdlruRvH7HHFMhQH7Y4APo1fpan3ZbCR62HH71bbvLbJ43F TPepyTA9ISWxIGe2nWhF7cjWjlmFEw9LhQp6ThNUqFUOrVQ2uyveSnMS1+hWmTRG74w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796434571; 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: Content-Transfer-Encoding:MIME-Version; bh=w0RohEltw9HbNKzo9BiV6X0RN8dUzCi1tV5PCqnZfUk=; b=ytadamcm2XcWva2N5Sqawet05AqN5RZ2Jv0zg7EucklmO6Ir+3DU2TOt+LMSABygKo7t E0z1IEpp9Yjt2yPddekEXMwEZtv2/x4JqmhC8pR+5tsUh9l7cUNhlcI+xSbI8Bn0npZij nO1/Uh5mRqP/wOKsIveUxoVUGzqAOMhRNaSB9PDmoq0+Zt+pAg69W7/32TwnMS+4ZN+1v zgFx0A2hjHLnYpJJVJp4l3JAC+fQuDnDfxA0fRjwg/WDTz5FGnAtDVGkcAQxirrm0pTPn QmpsaM6lKzXAepyelNj+VyXhqgiiVwjLjJMnUPqHr/M7xlOHjw1mhFF1dR2Mddw3SAg== 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=20260707 header.b=gsdx4iHt; arc=none smtp.remote-ip=209.85.215.171 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 8B944606A32C for ; Sat, 5 Dec 2026 01:36:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8B944606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=gsdx4iHt Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-cded697ba49so715632a12.1 for ; Fri, 04 Dec 2026 17:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796434571; x=1797039371; 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=w0RohEltw9HbNKzo9BiV6X0RN8dUzCi1tV5PCqnZfUk=; b=gsdx4iHt1wm1UnkpgbJLV+YVtzLDc04Ba1ZgWxVEaiwrGBdGg85Fdf0DgV7fUB5rkL EDVOs/RL85tLRaPRBsJLtcivCu9QyEJPopd4MS+azcgwGl8uQfmlgljwm5PsLXpcfQWO 4HkME7ggsSciSbTAD6/4Xql+gFycacFGpkJcL3RiGxDQMlnkY+BQj9BuBZq4BGDKEWgv gWnmv1ksjR/RtmUa9oGCxc62jdvhHaeRxZ7RESb7YHxFXq5bQcGxTbDT82b3RJI47Vd7 oS7VKMvLSXHh/mSVn9TEgl+lLC/5hvg2wpNxaq/hdCzOvcacZ8qK7Qn600nfRQRf85iD 7lAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796434571; x=1797039371; 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=w0RohEltw9HbNKzo9BiV6X0RN8dUzCi1tV5PCqnZfUk=; b=kJS4deAoGxyn6KzEyAy9aNdM3LMQd58kc3LFt2O9NyLc3O4kTilJSgJogurkUlesVX A7scnCAYAETo8ClMvB7gOdcW6Xx0bVzq1HcOT7ka/lDozRAQ71A6/eBbijNlgVwRbTE5 T+6gqARcJoD01I+1aZEtiDEYrOPy54aM9c0MkpMknVxHRfGVT7n35QgIy8KzPComHyUt BVUO0cEi631J1R6ZUnd5wUEAgeht5fXu/p6VjQ43InlKojtJ65O5w3t7Jzr0PsWqKKNU 2u+JtWfjZVrWS4wzBokjO4X2WMw/bWJ53bFxbYC7Mtkp2Jsf3W7+bC3ye9UpA3rMOD63 4n8Q== X-Gm-Message-State: APuU4Z/sI7p+KNiv6dy9h3F1H1jNgq+SUKyz8ERxum3XqbDBVEzAfWcu yvSRBiwGipwcs3sB5/pqX5j2NWBgLnrMsXMJwIBMQb302oiI1mbt90xS X-Gm-Gg: AZFdTZfacX70c28uuQHNG8GRAMyKQ99lc3zIMzJvuJ3TKo76T/mfFUfoprE7OK5vBvx dwxZhQdCXXJzCIYkdgPTZpUi8NxIIi/txZwM9gogPLg0lxjA1o6j1jewB7HPWApwZyQu1QoN6/W 7MDSR3q5E/H6IxCdDEt7mXY64ncthSiSy5C3jIPIfKfWB8xeDo0YsuZE/VB7jtkhtXTD75hNEGv SkJ9ewnDayOioLUN9W+Mfxanm3qt12CUrBoiphIaYHPrar+AnuPhSNVqfdHahrMQpHY5RrJBcL1 KrGEjC6nDpWuhxvYelgG08Stiys1s9hq1FVu5lqt6pbt81IBjnQPDQKyhLDl11UXs45Q/3ZGudF 8Q4SvBo7JYBQE43TpkkcZfeu5T/BEjDY3rOp9d/hjo6R2RKtC3BDA5XFDjaOsZrRbgwBJlfDqI4 3cbh/cSwkU9qRsVpZpEhPgOxXWVn9otddRLPuDN3dDIAX2gCrzmYeCMB7JlNikB2r0qfieDxV3G kpjnMR7MxFSxtSNOZAna2Wnh8mE/+Bf4pmjlcvATpEmSGmDvQZZJanK752dwWqQ9SNVAHNxzpmz S+FmBfEqMPqEI/OegfcDsHqqCdp/jNkI8ZIK8hbuIn4TLFcwcwTli+S7UPWwJHo75fx3UtlzUYG C92ZWxmbr7kFy9BkCAt/aDGC4swvUwIU14SA= X-Received: by 2002:a05:6a21:a87:b0:3fb:6e73:ce4e with SMTP id adf61e73a8af0-41561431985mr3648818637.23.1796434570548; Fri, 04 Dec 2026 17:36:10 -0800 (PST) Received: from localhost ([153.61.198.253]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ce1237b8355sm2209283a12.18.2026.12.04.17.36.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 17:36:10 -0800 (PST) Content-Type: text/plain; charset=UTF-8 Date: Sat, 05 Dec 2026 01:36:09 +0000 Message-Id: Cc: , , , , , , , Subject: Re: [PATCH bpf v2 0/3] tcp, bpf: fix CA state on open and the TCP_CONGESTION name check From: "Alexei Starovoitov" To: "Paul Moses" In-Reply-To: <0qI4bliEJoe1Gzuxoccq94xz28S015yDsjw2nfkjEAyABbd6OQ3d8MEGJ5WX6zuDQhbfOH2IxT36YERbqvYrlYwHeaRGXNsWeurXQahMGH0=@1g4.org> References: <0qI4bliEJoe1Gzuxoccq94xz28S015yDsjw2nfkjEAyABbd6OQ3d8MEGJ5WX6zuDQhbfOH2IxT36YERbqvYrlYwHeaRGXNsWeurXQahMGH0=@1g4.org> Content-Transfer-Encoding: 8bit X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 On Fri, Dec 04, 2026 at 01:26 PM Paul Moses wrote: > Sorry, I should have been more clear why it's needed. > > 1. Listener selects ca_noswitch → listener owns the only struct_ops map reference. > 2. Link and map fd are closed. > 3. Child inherits icsk_ca_ops = ca_noswitch but takes no reference. > 4. LSM hook switches child to cubic → tcp_cleanup_congestion_control() drops the > listener’s map reference. > 5. Map is freed. > 6. Listener close touches the dangling icsk_ca_ops That's the bug that [2] fixes. Its commit log has it: "TCP_CONGESTION: puts icsk->icsk_ca_ops, which the child holds no reference on." The put in step 4 happens in inet_csk_clone_lock(), before tcp_ca_openreq_child() runs. Patch 2 writes icsk_ca_initialized and icsk_ca_priv only. It doesn't get or put icsk_ca_ops. Steps 1-6 are the same with and without patch 2. So [2] is needed on its own. Patch 2 still doesn't depend on it. Pls drop the "Backport prereq" note from patch 2 when you resend.