projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b75446
)
Don't oops on deldp, by avoiding use-after-free on net_bridge_port.
author
Ben Pfaff
<blp@nicira.com>
Mon, 2 Jun 2008 17:18:00 +0000
(10:18 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Tue, 3 Jun 2008 03:18:38 +0000
(20:18 -0700)
datapath/datapath.c
patch
|
blob
|
history
diff --git
a/datapath/datapath.c
b/datapath/datapath.c
index adc698065ea873a1a9e4e03e669824421c128235..ed9c557c6381f4c3b97f289ff36b1965c8eac664 100644
(file)
--- a/
datapath/datapath.c
+++ b/
datapath/datapath.c
@@
-406,12
+406,12
@@
static int del_switch_port(struct net_bridge_port *p)
/* Called with dp_mutex. */
static void del_dp(struct datapath *dp)
{
- struct net_bridge_port *p;
+ struct net_bridge_port *p
, *n
;
kthread_stop(dp->dp_task);
/* Drop references to DP. */
- list_for_each_entry_
rcu (p
, &dp->port_list, node)
+ list_for_each_entry_
safe (p, n
, &dp->port_list, node)
del_switch_port(p);
rcu_assign_pointer(dps[dp->dp_idx], NULL);