]> err.no Git - linux-2.6/commitdiff
Fix potential scheduling while atomic in mesh_path_add.
authorPavel Emelyanov <xemul@openvz.org>
Tue, 6 May 2008 14:51:31 +0000 (18:51 +0400)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 13 May 2008 01:22:19 +0000 (21:22 -0400)
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>
net/mac80211/mesh_pathtbl.c

index 1d2d051e59765f5de0ce89811a893d5537e0b701..99c2d360888ef30cc7f0e8637b7aea9af0d474a4 100644 (file)
@@ -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;