From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [PATCH batadv] batman-adv: dat: initialize purge work before hash allocation
Date: Sun, 04 Oct 2026 10:29:23 +0200 [thread overview]
Message-ID: <13341984.O9o76ZdvQC@sven-desktop> (raw)
In-Reply-To: <20261004-dat-uninitialized-worker-v1-1-c34745e83f1d@narfation.org>
[-- Attachment #1: Type: text/plain, Size: 827 bytes --]
On Sunday, 4 October 2026 10:21:58 CEST Sven Eckelmann wrote:
> batadv_dat_init() only initializes bat_priv->dat.work after the hash table
> was allocated successfully. batadv_dat_free() unconditionally calls
> disable_delayed_work_sync() on it.
>
> This is currently not a problem: if batadv_mesh_init() fails,
> batadv_dat_free() is never called. But as this might change in the future,
> initialize the delayed work before anything in batadv_dat_init() can fail
> to make sure that batadv_dat_free() always operates on an initialized work
> item.
I think I will reject this patch because it is a little bit too defensive.
Instead, I will simply reply to Sashiko that this isn't reachable. Similar to
the batadv_v_ogm_free()'s mutex_lock() which isn't reachable when the alloc in
batadv_v_ogm_init fails.
Regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-10-04 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 8:21 [PATCH batadv] batman-adv: dat: initialize purge work before hash allocation Sven Eckelmann
2026-10-04 8:29 ` Sven Eckelmann [this message]
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=13341984.O9o76ZdvQC@sven-desktop \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/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