History

openvswitch: Return vport module ref before destruction

Return module reference before invoking the respective vport ->destroy() function. This is needed as ovs_vport_del() is not invoked inside an RCU read side critical section so the kfree can occur immediately before returning to ovs_vport_del(). Returning the module reference before ->destroy() is safe because the module unregistration is blocked on ovs_lock which we hold while destroying the datapath.

Thomas Graf committed 11 years ago

Commit fa2d8ff1 parent 5899f041 file · +1 −3Browse files

Showing the changes to net/openvswitch (1 of 1 file). Show all

Unified · Split

net/openvswitch/vport.c+1−3
@@ -274,10 +274,8 @@ void ovs_vport_del(struct vport *vport) · 273 unmodified lines
274274 ASSERT_OVSL();
275275
276276 hlist_del_rcu(&vport->hash_node);
277−
278− vport->ops->destroy(vport);
279−
280277 module_put(vport->ops->owner);
278+ vport->ops->destroy(vport);
281279 }
282280
283281 /**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t