From: Johannes Berg <johannes@sipsolutions.net>
To: Javier Cardona <javier@cozybit.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] mac80211: fix and simplify mesh locking
Date: Thu, 19 May 2011 06:14:20 +0200 [thread overview]
Message-ID: <336458d50895bb0b63e77ad24ce54c82@secure.sipsolutions.net> (raw)
In-Reply-To: <BANLkTi=0RMrBKVFFC7UUnVPyZpZvfGvK6g@mail.gmail.com> (sfid-20110519_034116_480982_F4415B84)
On Wed, 18 May 2011 18:40:33 -0700, Javier Cardona wrote:
>>> I'm seeing this after trying your patch, probably because the
>>> allocations mesh_table_alloc() can block. In the past I had tried
>>> to
>>> allocate the table before entering the critical section. If that
>>> is
>>> not possible for the race condition you mention, then I guess
>>> we'll
>>> have to make those allocations GFP_ATOMIC?
>>
>> Err, now I'm confused, how could the code have done non-atomic
>> allocations while under rcu_read_lock()? I guess there was just no
>> verification there?
>
> I'm not sure. I can tell you that the bug message is only triggered
> after your patch was applied, same .config.
> Maybe i have an rcu configuration that does not check that.
>
> Is making the allocations atomic an acceptable solution?
It looks like it's the only solution :-)
Anyway they should've been atomic even before already, not sure why RCU
didn't complain but it was definitely not right to do GFP_KERNEL
allocations under RCU lock, but now that I think about it ISTR that
whether it warns or not might depend on the RCU implementation you
selected in the config.
johannes
prev parent reply other threads:[~2011-05-19 4:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-14 9:00 [PATCH] mac80211: fix and simplify mesh locking Johannes Berg
2011-05-14 9:20 ` Johannes Berg
2011-05-17 23:05 ` Javier Cardona
2011-05-17 23:13 ` [PATCH] mac80211: Don't sleep when growing the mesh path Javier Cardona
2011-05-18 22:45 ` [PATCH] mac80211: fix and simplify mesh locking Johannes Berg
2011-05-19 1:40 ` Javier Cardona
2011-05-19 4:14 ` Johannes Berg [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=336458d50895bb0b63e77ad24ce54c82@secure.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=javier@cozybit.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 NNTP newsgroup(s).