From: Sven Eckelmann <sven@narfation.org>
To: sw@simonwunderlich.de, netdev-bot+sashiko@kernel.org
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
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 [thread overview]
Message-ID: <8807006.NyiUUSuA9g@sven-desktop> (raw)
In-Reply-To: <179554084613.3135.2138652598368843379@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1992 bytes --]
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
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-11-24 20:16 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 17:18 [PATCH net-next 00/15] pull request for net-next: batman-adv 2026-11-23 Simon Wunderlich
2026-11-23 17:18 ` [PATCH net-next 01/15] batman-adv: document refcount of returned objects Simon Wunderlich
2026-11-23 17:23 ` netdev-bot+sinfo
2026-11-23 18:13 ` Sven Eckelmann
2026-11-24 17:20 ` netdev-bot+sashiko
2026-11-23 17:18 ` [PATCH net-next 02/15] batman-adv: mcast: use mla_lock also during mcast_free Simon Wunderlich
2026-11-23 17:18 ` [PATCH net-next 03/15] batman-adv: mark functions inheriting critical sections Simon Wunderlich
2026-11-23 17:18 ` [PATCH net-next 04/15] batman-adv: bla: register own backbone gw when claiming for local node Simon Wunderlich
2026-11-24 17:20 ` netdev-bot+sashiko
2026-11-24 19:19 ` Sven Eckelmann
2026-11-23 17:18 ` [PATCH net-next 05/15] batman-adv: tt: unhash local entries with hlist_del_init_rcu() Simon Wunderlich
2026-11-23 17:18 ` [PATCH net-next 06/15] batman-adv: tt: refresh local entry in single flags_lock section Simon Wunderlich
2026-11-24 17:20 ` netdev-bot+sashiko
2026-11-24 19:22 ` Sven Eckelmann
2026-11-23 17:18 ` [PATCH net-next 07/15] batman-adv: tt: don't remove unhashed local entries Simon Wunderlich
2026-11-24 17:20 ` netdev-bot+sashiko
2026-11-24 19:24 ` Sven Eckelmann
2026-11-23 17:18 ` [PATCH net-next 08/15] batman-adv: tt: don't queue local events for unhashed entries Simon Wunderlich
2026-11-23 17:18 ` [PATCH net-next 09/15] batman-adv: tt: remove unannounced local entries via pending state Simon Wunderlich
2026-11-23 17:18 ` [PATCH net-next 10/15] batman-adv: tt: keep local entry unchanged when ADD can't be queued Simon Wunderlich
2026-11-24 17:20 ` netdev-bot+sashiko
2026-11-24 19:30 ` Sven Eckelmann
2026-11-23 17:18 ` [PATCH net-next 11/15] batman-adv: tt: requeue DEL of pending local entry after failed allocation Simon Wunderlich
2026-11-24 17:20 ` netdev-bot+sashiko
2026-11-24 19:46 ` Sven Eckelmann
2026-11-23 17:18 ` [PATCH net-next 12/15] batman-adv: tt: extract removal of pending local entry Simon Wunderlich
2026-11-24 17:20 ` netdev-bot+sashiko
2026-11-24 20:16 ` Sven Eckelmann [this message]
2026-11-23 17:18 ` [PATCH net-next 13/15] batman-adv: tt: commit only the announced local changes Simon Wunderlich
2026-11-24 17:20 ` netdev-bot+sashiko
2026-11-24 20:33 ` Sven Eckelmann
2026-11-23 17:18 ` [PATCH net-next 14/15] batman-adv: tt: avoid list_lock for unchanged local clients Simon Wunderlich
2026-11-23 17:18 ` [PATCH net-next 15/15] batman-adv: tt: drop ADD+DEL events of never announced clients Simon Wunderlich
2026-11-24 17:20 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8807006.NyiUUSuA9g@sven-desktop \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sw@simonwunderlich.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox