Commit 0d6f539
ovs-router: Fix locking in ovs_router_rule_add().
ovs_router_rule_add() is annotated with OVS_REQUIRES(mutex) but its
external caller rule_handle_msg() in route-table.c does not hold the
mutex. This could lead to data races on the rules pvector.
Fix this by changing the annotation to OVS_EXCLUDED(mutex) and
acquiring the mutex inside ovs_router_rule_add() around the call to
the internal ovs_router_rule_add__() function.
Fixes: dc14e92 ("route-table: Introduce multi-table route lookup.")
Signed-off-by: Matteo Perin <matteo.perin@canonical.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>1 parent 7c94662 commit 0d6f539
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1339 | 1339 | | |
1340 | 1340 | | |
1341 | 1341 | | |
1342 | | - | |
| 1342 | + | |
1343 | 1343 | | |
1344 | 1344 | | |
| 1345 | + | |
1345 | 1346 | | |
1346 | 1347 | | |
| 1348 | + | |
1347 | 1349 | | |
1348 | 1350 | | |
1349 | 1351 | | |
| |||
0 commit comments