From: Johannes Berg <johannes@sipsolutions.net>
To: Andrey Yurovsky <andrey@cozybit.com>
Cc: linux-wireless@vger.kernel.org, javier@cozybit.com
Subject: Re: [PATCH] mac80211: don't sleep in mesh_path_add allocation
Date: Wed, 15 Jul 2009 20:17:43 +0200 [thread overview]
Message-ID: <1247681863.10754.26.camel@johannes.local> (raw)
In-Reply-To: <1247680936-21513-1-git-send-email-andrey@cozybit.com>
[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]
On Wed, 2009-07-15 at 11:02 -0700, Andrey Yurovsky wrote:
> mesh_path_add allocates an mpath and a node but it is called with RCU
> held. Use the GFP_ATOMIC flag to prevent these allocations from
> sleeping since otherwise we can hit the following sleep-while-atomic:
This isn't sufficient, quoting from the function, highlight added:
int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata)
{
...
if (grow) {
struct mesh_table *oldtbl, *newtbl;
write_lock(&pathtbl_resize_lock);
oldtbl = mesh_paths;
newtbl = mesh_table_grow(mesh_paths);
if (!newtbl) {
write_unlock(&pathtbl_resize_lock);
return 0;
}
rcu_assign_pointer(mesh_paths, newtbl);
write_unlock(&pathtbl_resize_lock);
******* synchronize_rcu();
mesh_table_free(oldtbl, false);
}
...
}
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2009-07-15 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 18:02 [PATCH] mac80211: don't sleep in mesh_path_add allocation Andrey Yurovsky
2009-07-15 18:17 ` Johannes Berg [this message]
2009-07-15 18:40 ` Andrey Yurovsky
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=1247681863.10754.26.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=andrey@cozybit.com \
--cc=javier@cozybit.com \
--cc=linux-wireless@vger.kernel.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