B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: sashiko-reviews@lists.linux.dev
Cc: marek.lindner@mailbox.org, antonio@mandelbit.com,
	sw@simonwunderlich.de, b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [PATCH batadv v2 5/8] batman-adv: tt: only update flags for TT events
Date: Thu, 08 Oct 2026 17:02:35 +0200	[thread overview]
Message-ID: <13182561.O9o76ZdvQC@sven-desktop> (raw)
In-Reply-To: <sashiko-outbox-164321@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

On Thursday, 8 October 2026 16:43:32 CEST sashiko-bot@kernel.org wrote:
[...]
> [Severity: High]
> Does this code introduce a permanent loss of concurrent TT events due to a
> TOCTOU race in batadv_tt_tvlv_container_update()?
> 
> Looking at batadv_tt_tvlv_container_update(), it reads
> bat_priv->tt.local_changes locklessly to determine tt_diff_entries_num and
> allocates memory for the TT diff payload:
> 
> net/batman-adv/translation-table.c:batadv_tt_tvlv_container_update() {
>     ...
> 	tt_diff_entries_num = READ_ONCE(bat_priv->tt.local_changes);
>     ...
> }
> 
> Between this read and acquiring bat_priv->tt.changes_list_lock, a concurrent
> call to __batadv_tt_local_event() can add a new TT event to
> bat_priv->tt.changes_list and increment local_changes.

Pre-existing issue and not introduced by this change.
https://www.open-mesh.org/issues/483

Regards,
	Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  parent reply	other threads:[~2026-10-08 15:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 14:30 [PATCH batadv v2 0/8] batman-adv: tt: shashiko 20260930 follow ups Sven Eckelmann
2026-10-08 14:30 ` [PATCH batadv v2 1/8] batman-adv: tt: only transmit local ROAM flag together with DEL Sven Eckelmann
2026-10-08 14:30 ` [PATCH batadv v2 2/8] batman-adv: tt: clear ROAM flag when re-adding a pending local client Sven Eckelmann
2026-10-08 14:30 ` [PATCH batadv v2 3/8] batman-adv: tt: send ROAM_ADV on each roamed back client Sven Eckelmann
2026-10-08 14:30 ` [PATCH batadv v2 4/8] batman-adv: tt: ignore ROAM flag of received ADD changes Sven Eckelmann
2026-10-08 14:30 ` [PATCH batadv v2 5/8] batman-adv: tt: only update flags for TT events Sven Eckelmann
     [not found]   ` <sashiko-outbox-164321@kernel.org>
2026-10-08 15:02     ` Sven Eckelmann [this message]
2026-10-08 14:30 ` [PATCH batadv v2 6/8] batman-adv: tt: don't queue local events for unhashed entries Sven Eckelmann
     [not found]   ` <sashiko-outbox-164327@kernel.org>
2026-10-08 15:13     ` Sven Eckelmann
2026-10-08 14:30 ` [PATCH batadv v2 7/8] batman-adv: tt: avoid list_lock for unchanged local clients Sven Eckelmann
2026-10-08 14:30 ` [PATCH batadv v2 8/8] batman-adv: tt: drop ADD+DEL events of never announced clients Sven Eckelmann

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=13182561.O9o76ZdvQC@sven-desktop \
    --to=sven@narfation.org \
    --cc=antonio@mandelbit.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=marek.lindner@mailbox.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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