🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22065

Re: [PATCH net-next 12/15] batman-adv: tt: extract removal of pending local entry

#22065
From: Sven Eckelmann
Date: Tue, 24 Nov 2026 20:16
76 lines
10971 bytes
--nextPart2081065.usQuhbGJ8B
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"; protected-headers="v1"
From: Sven Eckelmann <sven@narfation.org>
To: sw@simonwunderlich.de, netdev-bot+sashiko@kernel.org
Date: Tue, 24 Nov 2026 21:16:15 +0100
Message-ID: <8807006.NyiUUSuA9g@sven-desktop>
In-Reply-To: <179554084613.3135.2138652598368843379@kernel.org>
MIME-Version: 1.0

On Tuesday, 24 November 2026 18:20:46 CET netdev-bot+sashiko@kernel.org wrote:
[...]
> > @@ -4550,6 +4588,43 @@ static void batadv_tt_local_transition_new(struct batadv_priv *bat_priv)
> >  	}
> >  }
> >  
> > +/**
> > + * batadv_tt_local_unhash_pending() - remove a pending entry from the local table
> > + * @bat_priv: the bat priv with all the mesh interface information
> > + * @tt_local: the local TT entry to remove
> > + *
> > + * Only an entry which is marked as BATADV_TT_CLIENT_PENDING and whose DEL was
> > + * queued is removed. An entry which still waits for its DEL (del_unqueued) must
> > + * stay in the local table until batadv_tt_local_purge_list() was able to queue
> > + * it.
> > + *
> > + * The caller must hold the hash bucket list_lock and the flags_lock of the
> > + * entry.
> > + *
> > + * Return: true if the entry was unhashed and the caller has to drop the
> > + * reference of the hash, false otherwise.
> > + */
[...]
> 
> [Severity: Low]
> This isn't a bug, but the kernel-doc of batadv_tt_local_unhash_pending()
> seems to leave out a requirement it inherits from batadv_tt_local_unhash().

Ok, will copy the requirements in a follow up patch:

diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index e08bf88b4b6d564a2a3b1564d1d5352b9df5947c..82eadd73b072550b712485485238d422ce0c2f6c 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -4744,10 +4744,10 @@ void batadv_tt_free(struct batadv_priv *bat_priv)
  * it.
  *
  * The caller must hold the hash bucket list_lock and the flags_lock of the
- * entry.
+ * entry. It must have checked that the entry is still part of the local table.
  *
  * Return: true if the entry was unhashed and the caller has to drop the
- * reference of the hash, false otherwise.
+ * reference of the hash after it released the flags_lock, false otherwise.
  */
 static bool
 batadv_tt_local_unhash_pending(struct batadv_priv *bat_priv,


Regards,
	Sven
--nextPart2081065.usQuhbGJ8B
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQS81G/PswftH/OW8cVND3cr0xT1ywUCawXwjwAKCRBND3cr0xT1
y8ZcAP9s4KgI0PjASQjQDQBQJyvKA5PozpXSDkrSfM3qslnmvQEAxdXZ66oqEuz2
QlzRiLl+4gP05c56znDXTPX07YUpzQ0=
=/ih1
-----END PGP SIGNATURE-----

--nextPart2081065.usQuhbGJ8B--
Technical Details
Message-ID: <8807006.NyiUUSuA9g@sven-desktop>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370729-linux-kernel-netdev=dewy.ru
References: <20261123171827.3294525-13-sw@simonwunderlich.de> <179554084613.3135.2138652598368843379@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370729-linux-kernel-netdev=dewy.ru
From: sven@narfation.org (Sven Eckelmann)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 12/15] batman-adv: tt: extract removal of pending local
 entry
Date: Tue, 24 Nov 2026 21:16:15 +0100
Organization: Usenet Network
Message-ID: <8807006.NyiUUSuA9g@sven-desktop>
References: <20261123171827.3294525-13-sw@simonwunderlich.de>
 <179554084613.3135.2138652598368843379@kernel.org>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart2081065.usQuhbGJ8B";
 micalg="pgp-sha512"; protocol="application/pgp-signature"
Injection-Info: usenet.network;
	logging-data="30068"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Q89Up0Np+C9bM3U31KuYrJ8sijI= sha256:U8BtTbOgCjUWoTO7Mg+0BJOsUR5TwljZGTCucUTGX0U=
	sha1:CQNVy9siSeUtXctEICiVbOkD2jk= sha256:jumjlxrO/XetWfjWbxE91kIShL3vZPLRLAKW5CNLPyQ=
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 BE75A125E2E; Tue, 24 Nov 2026 23:16:40 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 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, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	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 (1024-bit key)
	header.d=narfation.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 kIAhpj1B2pmi;
	Tue, 24 Nov 2026 23:16:37 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-370729-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=narfation.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 42BF6125E29; Tue, 24 Nov 2026 23:16:29 +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 B7FEA339D4; Tue, 24 Nov 2026 20:16:27 +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=1795551385;
	b=4KssbidUFVW+VVqhyNIg3uyZMiMxSI/mBHslqr5lLnx2ieOcpKF/aR/G9ycd2KRJ43DE
	 gHTOXAIGoBRyhpKenJKuXqsmlMNXKVoPYO5iBQwdZy9ENSNzmBHm5CAcL0gqpHIA2Msks
	 Me1yeUnIogHND9qJFbq538Qz+zAE56me8fGal5E/OJmsMJoC2445wG85q4Ez4pgjTzAIh
	 ofjwHLMzSEMA3Z/rP+M5+el+M/vfu24FJVlVesTg7Q5o+at5IaRAIsuN0AqJbhR20wmFq
	 ixquIBitJq9mDRllG4JrHh8Y3RegHZq+w849es+3pgepRy1XJ3elsLE6WDtQiArlW2g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795551385;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To:
	 Cc:Subject:Date:Message-ID:In-Reply-To:References:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Type;
	bh=SgFAIxmUxHx6nwXdXG+ldkr9MHmCx9LhmQjMWY/spG0=;
	b=x96j9AiOuUo8bmhi/IFSUAbDbBDF6KSiVRpRu4bi7EhcChWr8gjIb8H5efHcWjhBd7ZA
	 OT2T2PPPjyCLI2WBB0n6MLaiezPqI/F9OKFNrYVCMrdoPaSC81JDtd6YEA6ZLSK2yi8ko
	 Jb/ywuJbJui1uUMx1zcUlZMgEr4Y1dUpba3Vc1Y1EHZagruSmiP7TuS25wOeQTbx/BdO8
	 v+sH6/MF7LU5VSf2V3mcFr5M9xF82XkvR/n1TyLDmvIsA8zPFPjho0VyBQwDKI13u4RTi
	 50O7+RK6TyC+wvRRIImxoPXLP79SWYwKX10VLlgw7YXlcOeBvLVEbBOUQn6BpHpLF6g==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=PwJkcziC;
	dmarc=pass header.from=narfation.org;
	spf=pass smtp.mailfrom=narfation.org;
	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 9A227606A31E;
	Tue, 24 Nov 2026 20:16:25 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=PwJkcziC
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.160.73.56
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795551384;
	b=eAluDUXQ2jD2gaeKGD4p0fOyag9zSFOeYx4crOHRkHLbmSZyBmYdO1pD4q/fqgMoK5WU
	 ihWe+i3+JMmMHy3+E2T8FuuiF+wDCVeapyZ2VYPpn7qfQXYyRB3+Y1tG44y4AjZMINFov
	 8vQliBIGOEj/pmILyUtw5ApA4n36VB8z5I9RHzgtqVFfcvJAYPTJF/Ntbav4DkE/nw4or
	 z5flbu7qYf1QA/LRrvN+WOM9fV7KMsWIb82GqctfY/iUeuTCCiX1dcs8gV4CSV8ZeJ52d
	 SDEIbfGy+A1nGXPhaThDSorAwv6LZe5RP/yqBvDUHmoSy7Sr6PUL3rAVeX/BRgLRtIw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795551384;
	h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date:
	 Message-ID:In-Reply-To:References:MIME-Version:Content-Type;
	bh=SgFAIxmUxHx6nwXdXG+ldkr9MHmCx9LhmQjMWY/spG0=;
	b=gDcVxLK3JaThMu7GdmVCU+WpisYiQv1r7NY6YIQ1XKj58xqxIhftJSa/rG4aTPrihvKQ
	 zMXJGxtQxNpPCdtUyGGzJTxv4YyPGbzDAoFVrqOTR3/o22e9xYpnjfeLmSU6KpOabn/fH
	 FZarpIbVfs/IOft9SBiXQbLrY5e2QhBLf08aJ6TcPZnJnkzt/l3N7lJouvZP71kOp/nKS
	 IQi7fOAb9Fz5AWeLhzcBk9FEwALqQYAaCU5JmNxoYKD8kRB3FMVbR6JyeZZPOXJyMjJZH
	 0b72vepc/o50BO8jUIOCACoXuDmjUF4t9PkNiSQcv/TYxZAbpEsNkQFamRqfysZXHaA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=narfation.org;
	spf=pass smtp.mailfrom=narfation.org;
	dkim=pass header.d=narfation.org header.i=@narfation.org header.a=rsa-sha256 header.s=20121 header.b=PwJkcziC;
	arc=none smtp.remote-ip=213.160.73.56
X-Received: from dvalin.narfation.org (dvalin.narfation.org [213.160.73.56])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C222606A329
	for <netdev@vger.kernel.org>; Tue, 24 Nov 2026 20:16:22 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5C222606A329
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=narfation.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=narfation.org
X-Received: by dvalin.narfation.org (Postfix) id 30A1B20277;
	Tue, 24 Nov 2026 20:16:18 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narfation.org;
	s=20121; t=1795551380;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=SgFAIxmUxHx6nwXdXG+ldkr9MHmCx9LhmQjMWY/spG0=;
	b=PwJkcziCmpqUvZ/HiSYOCKPpIowJw/+L6uygO5ZzEB6NqmQCyC8LnNtlOPYFkEZ7PrlBO8
	vYH4avZaILBs1cEMLgsbM4G2qZU+pnxPfVNCSa4J9lNDxwUqRd1Vb59tZPqgPfk2meOncj
	Ovpj4lTPGA0Qmac+fjHSWJgR4+OnUFI=
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
 kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
 b.a.t.m.a.n@lists.open-mesh.org
X-In-Reply-To: <179554084613.3135.2138652598368843379@kernel.org>
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