projects
/
cascardo
/
ovs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
566b8c8
)
dpif-netdev: init atomic flag dp->destroyed
author
Andy Zhou
<azhou@nicira.com>
Tue, 18 Mar 2014 05:10:53 +0000
(22:10 -0700)
committer
Andy Zhou
<azhou@nicira.com>
Tue, 18 Mar 2014 07:40:10 +0000
(
00:40
-0700)
It is better to explicitly initialize the dp->destroy than to rely
on xzalloc().
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/dpif-netdev.c
patch
|
blob
|
history
diff --git
a/lib/dpif-netdev.c
b/lib/dpif-netdev.c
index
54b8f50
..
3bbfd2a
100644
(file)
--- a/
lib/dpif-netdev.c
+++ b/
lib/dpif-netdev.c
@@
-448,6
+448,7
@@
create_dp_netdev(const char *name, const struct dpif_class *class,
*CONST_CAST(const struct dpif_class **, &dp->class) = class;
*CONST_CAST(const char **, &dp->name) = xstrdup(name);
ovs_refcount_init(&dp->ref_cnt);
+ atomic_flag_clear(&dp->destroyed);
ovs_mutex_init(&dp->flow_mutex);
classifier_init(&dp->cls, NULL);