public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [PATCH] batman-adv: Avoid double-rtnl_lock ELP metric worker
Date: Wed, 18 Feb 2026 16:39:16 +0100	[thread overview]
Message-ID: <2032168.PYKUYFuaPT@ripper> (raw)
In-Reply-To: <20260216-double-rtnl-lock-throughput-v1-1-513f66d3b36e@narfation.org>

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

On Monday, 16 February 2026 20:05:55 CET Sven Eckelmann wrote:
> batadv_v_elp_get_throughput() might be called when the RTNL lock is already
> held. This could be problematic when the work queue item is canceled via
> cancel_delayed_work_sync() in batadv_v_elp_iface_disable(). In this case,
> an rtnl_lock() would cause a deadlock.
> 
> To avoid this, rtnl_trylock() was used in this function to skip the
> retrieval of the ethtool information in case the RTNL lock was already
> held.
> 
> But for cfg80211 interfaces, batadv_get_real_netdev() was called - which
> also uses rtnl_lock(). The approach for __ethtool_get_link_ksettings() must
> also be used instead and the lockless version __batadv_get_real_netdev()
> has to called.
> 
> Fixes: 405d49a20a20 ("batman-adv: Drop unmanaged ELP metric worker")
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
>  net/batman-adv/bat_v_elp.c      | 10 +++++++++-
>  net/batman-adv/hard-interface.c |  8 ++++----
>  net/batman-adv/hard-interface.h |  1 +
>  3 files changed, 14 insertions(+), 5 deletions(-)


Via github [1]:

Reported-by: Christian Schmidbauer <github@grische.xyz>
Tested-by: Sören Skaarup <freifunk_nordm4nn@gmx.de>

Regards,
	Sven

[1] https://github.com/freifunkMUC/site-ffm/issues/776#issuecomment-3920865984

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

      reply	other threads:[~2026-02-18 15:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 19:05 [PATCH] batman-adv: Avoid double-rtnl_lock ELP metric worker Sven Eckelmann
2026-02-18 15:39 ` 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=2032168.PYKUYFuaPT@ripper \
    --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