Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	syzbot <syzkaller@googlegroups.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH net] mac80211: mesh: fix mesh_pathtbl_init() error path
Date: Fri, 04 Dec 2020 17:26:27 +0100	[thread overview]
Message-ID: <cac552ce70a747f078738a7167f0a75bc52fac7c.camel@sipsolutions.net> (raw)
In-Reply-To: <20201204162428.2583119-1-eric.dumazet@gmail.com> (sfid-20201204_172435_837291_23D69393)

On Fri, 2020-12-04 at 08:24 -0800, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> If tbl_mpp can not be allocated, we call mesh_table_free(tbl_path)
> while tbl_path rhashtable has not yet been initialized, which causes
> panics.

Thanks Eric!

I was going to ask how you ran into this ...

> Reported-by: syzbot <syzkaller@googlegroups.com>

Until I saw this - but doesn't syzbot normally want a
"syzbot+somehashid@..." as the reported-by?


> --- a/net/mac80211/mesh_pathtbl.c
> +++ b/net/mac80211/mesh_pathtbl.c
> @@ -60,6 +60,7 @@ static struct mesh_table *mesh_table_alloc(void)
>  	atomic_set(&newtbl->entries,  0);
>  	spin_lock_init(&newtbl->gates_lock);
>  	spin_lock_init(&newtbl->walk_lock);
> +	rhashtable_init(&newtbl->rhead, &mesh_rht_params);
>  
>  	return newtbl;
>  }
> @@ -773,9 +774,6 @@ int mesh_pathtbl_init(struct ieee80211_sub_if_data *sdata)
>  		goto free_path;
>  	}
>  
> -	rhashtable_init(&tbl_path->rhead, &mesh_rht_params);
> -	rhashtable_init(&tbl_mpp->rhead, &mesh_rht_params);
> 

Hmm. There were two calls, now there's only one? Is that a bug, or am I
missing something?

johannes


  reply	other threads:[~2020-12-04 16:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 16:24 [PATCH net] mac80211: mesh: fix mesh_pathtbl_init() error path Eric Dumazet
2020-12-04 16:26 ` Johannes Berg [this message]
2020-12-04 16:27   ` Johannes Berg
2020-12-04 16:51   ` Eric Dumazet
2020-12-04 16:29 ` Johannes Berg
2020-12-05  1:35   ` Jakub Kicinski

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=cac552ce70a747f078738a7167f0a75bc52fac7c.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzkaller@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