Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Simon Wunderlich
Sat, 14 Nov 2026 09:15
[PATCH net-next 12/15] batman-adv: dat: increase hash generation when purging entries
Author: Simon Wunderlich
Date: Sat, 14 Nov 2026 09:15
Date: Sat, 14 Nov 2026 09:15
33 lines
10049 bytes
10049 bytes
From: Sven Eckelmann <sven@narfation.org> If batadv_dat_cache_dump() is preempted during a netlink dump and resumes in the middle of a hash bucket while __batadv_dat_purge() concurrently removes an entry, the dump offset will be shifted. Without incrementing the hash generation counter, netlink won't set NLM_F_DUMP_INTR and the userspace will not be informed about the inconsistent dump. Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://sashiko.dev/#/bug/linux-83da443f-ce69-4393-a29f-e02b70d1ec96 Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> --- net/batman-adv/distributed-arp-table.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index 37de9787104d5..d558d2300d607 100644 --- a/net/batman-adv/distributed-arp-table.c +++ b/net/batman-adv/distributed-arp-table.c @@ -248,6 +248,7 @@ static void __batadv_dat_purge(struct batadv_priv *bat_priv, continue; hlist_del_rcu(&dat_entry->hash_entry); + atomic_inc(&bat_priv->dat.hash->generation); batadv_dat_entry_put(dat_entry); } spin_unlock_bh(list_lock); -- 2.47.3
Re: [PATCH net-next 12/15] batman-adv: dat: increase hash generation when purging entries
Author: Sven Eckelmann
Date: Sun, 15 Nov 2026 09:50
Date: Sun, 15 Nov 2026 09:50
44 lines
9644 bytes
9644 bytes
--nextPart10948139.nUPlyArG6x
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="utf-8"; protected-headers="v1"
From: Sven Eckelmann <sven@narfation.org>
Date: Sun, 15 Nov 2026 10:50:02 +0100
Message-ID: <8759436.T7Z3S40VBb@sven-desktop>
In-Reply-To: <sashiko-outbox-215358@kernel.org>
MIME-Version: 1.0
On Sunday, 15 November 2026 10:24:45 CET sashiko-bot@kernel.org wrote:
[...]
>
> [Severity: Low]
> Inconsistent netlink dump detection for the DAT cache was introduced without
> updating bat_priv->dat.hash->generation in __batadv_dat_purge(). Should this
> include:
>
> Fixes: 6f81652a4713 ("batman-adv: Add inconsistent dat netlink dump detection")
No, "Fixes" (for old kernels) should not be added without "Cc: stable@....".
And patches with these tags which should go through net-next.
It was decided that this is so irrelevant for most situations and fixed
primarily for getting rid of these constant "This problem wasn't introduced by
this patch, but...." reports by Sashiko. No need to increase the load on the
stable-kernel team for such a change.
Regards,
Sven
--nextPart10948139.nUPlyArG6x
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/OW8cVND3cr0xT1ywUCavmASgAKCRBND3cr0xT1
yxUHAP0SFX9XcPbQw/S7jXOHEiEHcuBlvb3h37+TT8raM6TsnAEAlZpJ7BLTmoer
0QaxcP3q2bhGKie94xKiP7hPsq57wwE=
=+9WZ
-----END PGP SIGNATURE-----
--nextPart10948139.nUPlyArG6x--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads