Article View: linux.kernel.netdev
Article #5853Re: [PATCH net] net: free the policies if a socket's clone fails late
From: "Alexei Starovoitov"
Date: Wed, 21 Oct 2026 03:00
Date: Wed, 21 Oct 2026 03:00
13 lines
11306 bytes
11306 bytes
On Tue, Oct 20, 2026 at 07:20 PM Jakub Kicinski <kuba@kernel.org> wrote:
> On Sat, 17 Oct 2026 01:39:12 +0000 Alexei Starovoitov wrote:
>> - if (bpf_sk_storage_clone(sk, newsk))
>> + if (bpf_sk_storage_clone(sk, newsk)) {
>> + xfrm_sk_free_policy(newsk);
>> goto free;
>> + }
>
> why not add a new jump target and add the unwind at the end
> of the function?
Don't care. Fix it yourself then.
Technical Details
Message-ID:
<DMA6IGX5XTOI.1DVKS3WN0K6NQ@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-349743-linux-kernel-netdev=dewy.ruReferences:
<20261017013912.396296-1-alexei.starovoitov@gmail.com> <20261020192044.7c3a58a1@kernel.org>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-349743-linux-kernel-netdev=dewy.ru
From: alexei.starovoitov@gmail.com ("Alexei Starovoitov")
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: free the policies if a socket's clone fails
late
Date: Wed, 21 Oct 2026 03:00:09 +0000
Organization: Usenet Network
Message-ID: <DMA6IGX5XTOI.1DVKS3WN0K6NQ@gmail.com>
References: <20261017013912.396296-1-alexei.starovoitov@gmail.com> <20261020192044.7c3a58a1@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="4023157"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:6IuAqn7oIJAGPasZASIIG/v9QW0= sha256:0W1ldsWZK4iMBHnc1Dg1JRJzKUWOH91lpwWoE/OZ+i4=
sha1:VevQIMZwNLAdWoQldpGp1c3ETqw= sha256:btz3UiCMgz+0/yQKjg8nTjTATgUL011o22ax95zOIpY=
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 90726110EF9; Wed, 21 Oct 2026 06:03:17 +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 iG3Z1riLuYHc;
Wed, 21 Oct 2026 06:03:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-349743-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 06B6D110EC3; Wed, 21 Oct 2026 06:03:06 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id EA1A9373A4; Wed, 21 Oct 2026 03:00:16 +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=1792551616;
b=FCLkIyneohvzKIrGqgwYjo4lajUWwM+uQu6XennL2ByxqhW5CSEdBmdWUy6Vy/ACD0gm
yOi+nIWczM6BH0WYUlYRTvcpgHaGI1k+EVqqoluB4n21u8xTel6P1orrkFPW8UPhAWTaI
qqZklPZ/nUvt4MnitcgDu4xQaINQ0VXFBAh1Ga4d8F5OGzMtsoR0JienE/Q/kU2iaex1/
nFmPiR6xaoE1FIW5/ArLGVGQByJd2fzMh8ZDngbvAuXMWp5sfw+ohHOQqNRS5zBC1N1h6
rJ9tdKa96XKq+Hwz4wuT+3IDyHYxchU7EPe7veqvSJYtMp4Axz2FBnP5dlvHP8Voryw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792551616;
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:From:To:Cc:Subject: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=odoVy4PHyyHu7+w2et+fTKefs40eChZdvSs2ZlLln/E=;
b=clHXLZWC1UOlrnjQ0cb0ioKvOxqhsXfNCunQbOWDwftyQHawmNHERrFJXT0SfptwIkZ4
lbSxy2Xz78l3/r4XRYjrUVxq+6IcYbDCnxKTfiU4NsT87ug7jYqtUUw3LKdoLJDSrEWCE
zVnP6WVFVE35eUzVTWIOOEu9Dre1Bcq+zJl0c5YsdqcVq6c2ffRnGyN44wF+mgkHUErFS
qZbDfBmpMakG/9SjrG9xqpoZwiVqXosbEWiJCuf2MMvBADmUSOcruUbXNqvwxIfBnB9WC
gBPX/SR2nAouMgNc75RuBhgCybXhCm1pIqxMIiaifySn6GPhD0/KOdyd/Nstf+Hie6w==
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=TbQ1ir+n;
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 C1286606A322;
Wed, 21 Oct 2026 03:00:16 +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=TbQ1ir+n
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.179
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1792551615;
b=rZx5KNYrKkwCnm1EfHo97OpZeVIyT3bZpG45Ji1X9RUXu2fepSLPLe4kyNGfEpF+om7f
BqtSBtuLyCU5kVKqfzSOHM+jmXCJX3/RaPp4RaEeGXeE7Rjp8lJva/B9D8lYIJ4qgP0P0
kRk88sTmTpP5GYSFfMoxus5rXWI0ltinpxSOW0L5JCteWkpB3KRKK9EO0b0QpnNkV7xbt
QJReLlRH/sIrfPrXd2Uqwnv9LWFwc72rx/ZJrHiciMEwVNKIEYJEH3OdD0QEY6CqoIkow
Uf1Ej8EixKRSA7swdyuQxI30sJ2dmvEgdXB6lJqapirPRmTJDeFd8tW7WMAeRmpYgZw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792551615;
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:From:To:Cc:Subject:In-Reply-To:References:X-Mailer:
Content-Transfer-Encoding:MIME-Version;
bh=odoVy4PHyyHu7+w2et+fTKefs40eChZdvSs2ZlLln/E=;
b=0dTntPSqDt2d1EajtKPkRk+jB84pJvo2vUMWmWrXo1Gz2OO39SNGHIQL4LYr1ujFOszM
G1PGBA6Y4J5ksFLg70/DTCWteKBB8pA9v8CsrSM4sfyOLcszl1imDpwuZ9NRZSS/jUbhI
18Wd15p7JD3hyK2WmRXn6UoOxswYOS4Db0KqMMr22mQpfeVzNx6vjZWLO5sgRHPJHArV2
eAbhLCht/0B6le8xD7fRGNCo53BTxvkE9FROiiT6XnxeLaf2Y+Iu58LP4zoFeQFcONns5
psZ3p1FfryIvQ9UBT34zo2rROXx9QVYM98RzfR5NZEz77lijvHGsobRQWYzwZTVEdWw==
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=TbQ1ir+n;
arc=none smtp.remote-ip=209.85.214.179
X-Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179])
(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 96F99606A31D
for <netdev@vger.kernel.org>; Wed, 21 Oct 2026 03:00:15 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 96F99606A31D
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-pl1-f179.google.com with SMTP id d9443c01a7336-2e977109392so1727805ad.0
for <netdev@vger.kernel.org>; Tue, 20 Oct 2026 20:00:15 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792551615; x=1793156415; darn=vger.kernel.org;
h=mime-version:content-transfer-encoding:references:in-reply-to
:subject:cc:to:from:message-id:date:content-type:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=odoVy4PHyyHu7+w2et+fTKefs40eChZdvSs2ZlLln/E=;
b=TbQ1ir+nzL8W1ncS5tWnowahK+SYP73smf9/7BYeWmtUMPtyv70RLUAh226zlZa7jb
sbpre9MRmjA7gVVTUzMb1aNUnP1OOsDTE0qcxY1PHaLuptja1sM33Yl6gmhrJUPWBR2W
DNfDqtDrl19ucJwn9azmYnYigKw+g5wRLpSMERY0EZOcrDe9+wMhieJ6rZuuR6ZKkKCJ
ITkeYGiBawsb9Nj19QoXs5ZPuVOzHUkWVEV1JZVMR1s6LSRe+99zqTkPgU+01SAO3ZE0
i57HlV2ecbliJRYvn/+CiVcI48hE20kSj5sshghfanzaj4A9hixtCCQduFOORM/k449s
rkwg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792551615; x=1793156415;
h=mime-version:content-transfer-encoding:references:in-reply-to
:subject:cc:to:from:message-id:date:content-type:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=odoVy4PHyyHu7+w2et+fTKefs40eChZdvSs2ZlLln/E=;
b=0DhCbfCnZ4Wx6b8FIZdBb9lJn02ZNHifYTYr+tvOzEKHufldMpkCffBsQCS9jkC/M3
eWkHyUikxKQlvOhR1d6ZPu5CHeJcCXZ7R9Nfs8RZx+XJhTSgirmKMERVTFkHU5a9qqTd
bpxxFwm1uSWFmrCxNJOKImY9vg490zVjpvrX3pKoBMWn1BJUX9VyCo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00:10 -0700 (PDT)
X-Received: from localhost ([153.61.198.250])
by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ea3b41096bsm5236935ad.26.2026.10.20.20.00.09
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Tue, 20 Oct 2026 20:00:09 -0700 (PDT)
X-Cc: <netdev@vger.kernel.org>, <bpf@vger.kernel.org>, <daniel@iogearbox.net>,
<andrii@kernel.org>, <eddyz87@gmail.com>, <memxor@gmail.com>,
<josef@toxicpanda.com>, <mason@kernel.org>, <steffen.klassert@secunet.com>,
<herbert@gondor.apana.org.au>
X-In-Reply-To: <20261020192044.7c3a58a1@kernel.org>
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