Thread (1 message) 1 message, 1 author, 1d ago

Re: [PATCH net-next 5/9] batman-adv: tt: only queue local del event after successful unlink

From: Sven Eckelmann <sven@narfation.org>
Date: 2026-10-02 16:24:36
Also in: batman, sashiko-reviews

On Thursday, 1 October 2026 11:55:18 CEST sashiko-bot@kernel.org wrote:
[...]
quoted
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index 354d9416c1b75..c904d67791f8f 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
[ ... ]
quoted
@@ -1496,8 +1496,6 @@ batadv_tt_local_remove_now(struct batadv_priv *bat_priv,
 	struct batadv_tt_common_entry *common = &tt_local_entry->common;
 	struct hlist_node *tt_removed_node;
 
-	batadv_tt_local_event(bat_priv, tt_local_entry, BATADV_TT_CLIENT_DEL);
-
 	/* remove exactly this object when still present in hash */
 	tt_removed_node = batadv_hash_remove(bat_priv->tt.local_hash,
 					     batadv_compare_tt_entry,
@@ -1505,6 +1503,8 @@ batadv_tt_local_remove_now(struct batadv_priv *bat_priv,
 	if (!tt_removed_node)
 		return;
 
+	batadv_tt_local_event(bat_priv, tt_local_entry, BATADV_TT_CLIENT_DEL);
+
[Severity: High]
Does moving this event queueing after the hash removal create a lockless
window where a concurrent ADD can be incorrectly cancelled by the delayed DEL
event?
Previously, you're partner instance complained about the opposite order:
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260831135117.574836-1-sw%40simonwunderlich.de?part=8

Will postpone further changes (and not modify this PR) until a better way for 
consistency guarantee between announcements and hash states is implemented:
https://www.open-mesh.org/issues/475

Regards,
	Sven

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help