[ovs-git] Open vSwitch: datapath: Destroy internal devices before freeing datapath. (master)

dev at openvswitch.org dev at openvswitch.org
Fri Feb 25 01:20:17 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  99620d2c1b01045a652d586da3c46608f7c59eda (commit)
       via  8338302d5cecb0a082104a8ff09544c2909d4308 (commit)
      from  a02e5331f6064a7b9dd11f1091ab9fcb1bbdadcc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 99620d2c1b01045a652d586da3c46608f7c59eda
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=99620d2c1b01045a652d586da3c46608f7c59eda
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Destroy internal devices before freeing datapath.
		
When destroying vports we account for two types of synchronization
mechanisms: RTNL and RCU.  However, it is possible to call into
network device methods with just a device reference without either
of these.  These device methods can use the datapath data structures
but we don't wait for all of the references to go away before freeing
the datapath.  The actual wait happens in rtnl_unlock(), so by moving
up that call we can avoid the possibility of use after free with
internal devices.

Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


commit 8338302d5cecb0a082104a8ff09544c2909d4308
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=8338302d5cecb0a082104a8ff09544c2909d4308
Author: Jesse Gross <jesse at nicira.com>
		
datapath: Don't free vport until all references are gone.
		
We currently call vport_free() for internal devices after the
device is unregistered.  This takes care of callers that use
either RTNL or RCU but not ones that have only a device reference.
In particular, if stats are requested while a datapath is being
unregistered we can try to use the vport data structures which
have already been freed.

Bug #4736

Reported-by: Brad Hall <brad at nicira.com>
Signed-off-by: Jesse Gross <jesse at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 datapath/datapath.c           |   10 +++++++++-
 datapath/vport-internal_dev.c |   13 ++++++++++---
 2 files changed, 19 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list