mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
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>
This commit is contained in:
parent
0eb03d5a14
commit
6d6936e2ea
1 changed files with 2 additions and 1 deletions
|
@ -220,9 +220,10 @@ endadd:
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
rcu_assign_pointer(mesh_paths, newtbl);
|
rcu_assign_pointer(mesh_paths, newtbl);
|
||||||
|
write_unlock(&pathtbl_resize_lock);
|
||||||
|
|
||||||
synchronize_rcu();
|
synchronize_rcu();
|
||||||
mesh_table_free(oldtbl, false);
|
mesh_table_free(oldtbl, false);
|
||||||
write_unlock(&pathtbl_resize_lock);
|
|
||||||
}
|
}
|
||||||
endadd2:
|
endadd2:
|
||||||
return err;
|
return err;
|
||||||
|
|
Loading…
Reference in a new issue