[ovs-dev] [PATCH] bridge.c: Invoke async_append_enable() in bridge_init()
Alex Wang
alexw at nicira.com
Fri Aug 2 22:47:45 UTC 2013
Commit a5fb0e29a9c56 (vlog: Use async I/O.) invokes the function
async_append_enable() in bridge_run(). This may cause the abortion
of ovs-vswitchd since async_append_enable() must be invoked while
single-threaded. And it is possible that system-state.c spawns a
thread before the invocation.
This commit fixes the bug by invoking async_append_enable() in
bridge_init().
Reported-by: Shih-Hao Li <shihli at nicira.com>
Signed-off-by: Alex Wang <alexw at nicira.com>
---
vswitchd/bridge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 9bbd559..90118a8 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -418,6 +418,8 @@ bridge_init(const char *remote)
bond_init();
cfm_init();
stp_init();
+
+ async_append_enable();
}
void
@@ -2447,8 +2449,6 @@ bridge_run(void)
* process that forked us to exit successfully. */
daemonize_complete();
- async_append_enable();
-
VLOG_INFO_ONCE("%s (Open vSwitch) %s", program_name, VERSION);
}
}
--
1.7.9.5
More information about the dev
mailing list