[ovs-git] Open vSwitch: ofproto-dpif: Complete all packet translations before freeing an ofproto. (branch-2.0)

dev at openvswitch.org dev at openvswitch.org
Tue Feb 25 16:59:25 UTC 2014


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, branch-2.0 has been updated
       via  dd2e44f835fac8c2df99f84c54250c3ca981f2f5 (commit)
      from  19133b5df5c91f7a61a318c83d4ed79755f367d6 (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 dd2e44f835fac8c2df99f84c54250c3ca981f2f5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=dd2e44f835fac8c2df99f84c54250c3ca981f2f5
Author: Ben Pfaff <blp at nicira.com>
		
ofproto-dpif: Complete all packet translations before freeing an ofproto.
		
The following scenario can occur:

   1. Handler thread grabs a pointer to an ofproto in handle_upcalls().

   2. Main thread removes ofproto and destroys it in destruct().

   3. Handler thread uses pointer to ofproto and accesses freed memory.
      BOOM!

Each individual step above happens under the xlate_rwlock, but the ofproto
pointer is retained from step 1 to step 3, hence the problem.  This commit
fixes the problem by ensuring that after an ofproto is removed but before
it is destroyed, all packet translations get pushed all the way through
the upcall handler pipeline.  (No new packet translations can get a pointer
to the removed ofproto.)

Bug #1200351.
Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Alex Wang <alexw at nicira.com>


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

Summary of changes:
 ofproto/ofproto-dpif-upcall.c |   19 ++++++++++++++++++-
 ofproto/ofproto-dpif-upcall.h |    3 ++-
 ofproto/ofproto-dpif.c        |    6 +++---
 3 files changed, 23 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list