From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: "Linus Lüssing" <linus.luessing@c0d3.blue>,
syzbot+881d65229ca4f9ae8c84@syzkaller.appspotmail.com
Subject: Re: [PATCH] batman-adv: Release references to inactive interfaces
Date: Fri, 17 Oct 2025 16:02:59 +0200 [thread overview]
Message-ID: <2676395.Lt9SDvczpP@ripper> (raw)
In-Reply-To: <6d8c06e0-4e36-415c-942c-7100c21b2de4@I-love.SAKURA.ne.jp>
[-- Attachment #1: Type: text/plain, Size: 1580 bytes --]
On Friday, 17 October 2025 13:18:20 CEST Tetsuo Handa wrote:
> Is this patch recognized?
Who should recognize the patch?
https://git.open-mesh.org/linux-merge.git/commit/?id=f12b69d8f22824a07f17c1399c99757072de73e0
Regards,
Sven
>
> On 2025/09/28 3:01, Sven Eckelmann wrote:
> > Trying to dump the originators or the neighbors via netlink for a meshif
> > with an inactive primary interface is not allowed. The dump functions were
> > checking this correctly but they didn't handle non-existing primary
> > interfaces and existing _inactive_ interfaces differently.
> >
> > (Primary) batadv_hard_ifaces hold a references to a net_device. And
> > accessing them is only allowed when either being in a RCU/spinlock
> > protected section or when holding a valid reference to them. The netlink
> > dump functions use the latter.
> >
> > But because the missing specific error handling for inactive primary
> > interfaces, the reference was never dropped. This reference counting error
> > was only detected when the interface should have been removed from the
> > system:
> >
> > unregister_netdevice: waiting for batadv_slave_0 to become free. Usage count = 2
> >
> > Fixes: 50eddf397ac3 ("batman-adv: netlink: reduce duplicate code by returning interfaces")
> > Reported-by: syzbot+881d65229ca4f9ae8c84@syzkaller.appspotmail.com
> > Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
> > Signed-off-by: Sven Eckelmann <sven@narfation.org>
> > ---
> > net/batman-adv/originator.c | 14 ++++++++++++--
> > 1 file changed, 12 insertions(+), 2 deletions(-)
>
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2025-10-17 14:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-27 18:01 [PATCH] batman-adv: Release references to inactive interfaces Sven Eckelmann
2025-10-17 11:18 ` Tetsuo Handa
2025-10-17 14:02 ` 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=2676395.Lt9SDvczpP@ripper \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=linus.luessing@c0d3.blue \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=syzbot+881d65229ca4f9ae8c84@syzkaller.appspotmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.