diff options
author | Javier Cardona <javier@cozybit.com> | 2011-05-17 19:13:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-19 13:54:14 -0400 |
commit | d676ff493d9dfb8b34892214665028a8c85e2056 (patch) | |
tree | c577181f7e291ebdd39cdd616f1554bd7c3915d7 /net | |
parent | ba4903f97a275ed0967b58ff882f8ab41bec24ad (diff) |
mac80211: Don't sleep when growing the mesh path
After commit 1928ecab620907a0953f811316d05f367f3f4dba (mac80211: fix and
simplify mesh locking) mesh table allocation is performed with the
pathtbl_resize_lock taken. Under those conditions one should not sleep.
This patch makes the allocations GFP_ATOMIC to prevent that.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 2bda0ac62326..51f6fe86d890 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -76,12 +76,12 @@ static struct mesh_table *mesh_table_alloc(int size_order) | |||
76 | int i; | 76 | int i; |
77 | struct mesh_table *newtbl; | 77 | struct mesh_table *newtbl; |
78 | 78 | ||
79 | newtbl = kmalloc(sizeof(struct mesh_table), GFP_KERNEL); | 79 | newtbl = kmalloc(sizeof(struct mesh_table), GFP_ATOMIC); |
80 | if (!newtbl) | 80 | if (!newtbl) |
81 | return NULL; | 81 | return NULL; |
82 | 82 | ||
83 | newtbl->hash_buckets = kzalloc(sizeof(struct hlist_head) * | 83 | newtbl->hash_buckets = kzalloc(sizeof(struct hlist_head) * |
84 | (1 << size_order), GFP_KERNEL); | 84 | (1 << size_order), GFP_ATOMIC); |
85 | 85 | ||
86 | if (!newtbl->hash_buckets) { | 86 | if (!newtbl->hash_buckets) { |
87 | kfree(newtbl); | 87 | kfree(newtbl); |
@@ -89,7 +89,7 @@ static struct mesh_table *mesh_table_alloc(int size_order) | |||
89 | } | 89 | } |
90 | 90 | ||
91 | newtbl->hashwlock = kmalloc(sizeof(spinlock_t) * | 91 | newtbl->hashwlock = kmalloc(sizeof(spinlock_t) * |
92 | (1 << size_order), GFP_KERNEL); | 92 | (1 << size_order), GFP_ATOMIC); |
93 | if (!newtbl->hashwlock) { | 93 | if (!newtbl->hashwlock) { |
94 | kfree(newtbl->hash_buckets); | 94 | kfree(newtbl->hash_buckets); |
95 | kfree(newtbl); | 95 | kfree(newtbl); |