diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-05-06 18:51:31 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-12 21:22:19 -0400 |
commit | 6d6936e2ea82ebcbdd12d489b7b5ccf430de52f1 (patch) | |
tree | bf731ba146332b201c79e28629fe74262b7bff5c /net | |
parent | 0eb03d5a14377eecf6ed0ebf3cc2c9f48c12c7c6 (diff) | |
download | linux-3.10-6d6936e2ea82ebcbdd12d489b7b5ccf430de52f1.tar.gz linux-3.10-6d6936e2ea82ebcbdd12d489b7b5ccf430de52f1.tar.bz2 linux-3.10-6d6936e2ea82ebcbdd12d489b7b5ccf430de52f1.zip |
Fix potential scheduling while atomic in mesh_path_add.
Calling synchronize_rcu() under write-lock-ed pathtbl_resize_lock may
result in this warning (and other side effects).
It looks safe just dropping this lock before calling synchronize_rcu.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 1d2d051e597..99c2d360888 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -220,9 +220,10 @@ endadd: return -ENOMEM; } rcu_assign_pointer(mesh_paths, newtbl); + write_unlock(&pathtbl_resize_lock); + synchronize_rcu(); mesh_table_free(oldtbl, false); - write_unlock(&pathtbl_resize_lock); } endadd2: return err; |