From: Sven Eckelmann <sven@narfation.org>
To: syzbot <syzbot+28b0702ada0bf7381f58@syzkaller.appspotmail.com>,
a@unstable.cc, b.a.t.m.a.n@lists.open-mesh.org,
davem@davemloft.net, kuba@kernel.org,
linux-kernel@vger.kernel.org, mareklindner@neomailbox.ch,
netdev@vger.kernel.org, sw@simonwunderlich.de,
syzkaller-bugs@googlegroups.com,
Pavel Skripkin <paskripkin@gmail.com>,
linus.luessing@c0d3.blue
Subject: Re: [syzbot] WARNING in batadv_nc_mesh_free
Date: Sat, 23 Oct 2021 09:41:04 +0200 [thread overview]
Message-ID: <2056331.oJahCzYEoq@sven-desktop> (raw)
In-Reply-To: <5e29e63c-d2b5-ae72-0e33-5a22e727be3c@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]
On Friday, 22 October 2021 22:58:15 CEST Pavel Skripkin wrote:
[...]
> > Oh, ok. Next clean up call in batadv_nc_mesh_free() caused GPF, since
> > fields are not initialized. Let's try to clean up one by one and do not
> > break dependencies.
> >
> > Quite ugly one, but idea is correct, I guess
> >
> > Also, make each *_init() call clean up all allocated stuff to not call
> > corresponding *_free() on error handling path, since it introduces
> > problems, as syzbot reported
Thanks for the patch + syzbot interactions. I just wanted to implement a
change - which would most likely have ended up the same way. Can you please
send it to netdev and Cc b.a.t.m.a.n@lists.open-mesh.org? We don't have
anything else to submit at the moment for netdev and this patch can be applied
by netdev directly. I will add my Acked-by in this process.
Not sure about the Fixes. It is definitely wrong in the initial commit.... but
it got only really problematic when other features got introduced. I would
still say that the initial one should be mentioned.
Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol")
@Linus, @Marek, @Antonio: Please check whether it is ok to move the
batadv_v_mesh_init after batadv_tt_init + batadv_originator_init.
batadv_v_mesh_init is basically there to initialize:
* bat_priv->bat_v.ogm_buff(|_len|_mutex)
* bat_priv->bat_v.ogm_seqno
* bat_priv->bat_v.ogm_wq
batadv_originator_init is there to initialize the
* bat_priv->orig_hash
* bat_priv->orig_work (batadv_purge_orig) + queue it up
batadv_tt_init is a lot more complex but should in theory not interact with
ogm specific algo ops.
I wouldn't know why there could be a problem but I would leave it to the
experts.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-10-23 7:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 23:19 [syzbot] WARNING in batadv_nc_mesh_free syzbot
2021-10-22 18:33 ` Pavel Skripkin
2021-10-22 20:20 ` syzbot
2021-10-22 20:57 ` Pavel Skripkin
2021-10-22 20:58 ` Pavel Skripkin
2021-10-23 4:50 ` syzbot
2021-10-23 7:41 ` Sven Eckelmann [this message]
2021-10-24 13:13 ` [PATCH] net: batman-adv: fix error handling Pavel Skripkin
2021-10-24 14:58 ` Sven Eckelmann
2021-10-26 0:49 ` Jakub Kicinski
2021-10-26 6:51 ` Sven Eckelmann
2021-10-26 13:50 ` patchwork-bot+netdevbpf
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=2056331.oJahCzYEoq@sven-desktop \
--to=sven@narfation.org \
--cc=a@unstable.cc \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linus.luessing@c0d3.blue \
--cc=linux-kernel@vger.kernel.org \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
--cc=paskripkin@gmail.com \
--cc=sw@simonwunderlich.de \
--cc=syzbot+28b0702ada0bf7381f58@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).