[ovs-git] [openvswitch/ovs] beb07c: classifier: Fix race condition leading to NULL der...
GitHub
noreply at github.com
Sun Apr 17 16:52:02 UTC 2016
Branch: refs/heads/branch-2.5
Home: https://github.com/openvswitch/ovs
Commit: beb07c3a34ba65e03d0f14491fee450a0da148a0
https://github.com/openvswitch/ovs/commit/beb07c3a34ba65e03d0f14491fee450a0da148a0
Author: Jarno Rajahalme <jarno at ovn.org>
Date: 2016-04-17 (Sun, 17 Apr 2016)
Changed paths:
M lib/classifier-private.h
M lib/classifier.c
M lib/classifier.h
M tests/test-classifier.c
Log Message:
-----------
classifier: Fix race condition leading to NULL dereference.
Addition of table versioning exposed struct cls_rule member
'cls_match' to RCU readers and made it possible for 'cls_match' become
NULL while being accessed by an RCU reader, but we failed to check for
this condition. This may have resulted in NULL pointer dereference
and ovs-vswitchd crash.
Fix this by making the 'cls_match' member an RCU pointer and checking
the value whenever it potentially read by an RCU reader. In these
instances we use ovsrcu_get(), whereas functions accessible only by
the exclusive writers use ovsrcu_get_protected() and do not need to
check the result.
VMware-BZ: 1643642
Fixes: 2b7b1427 ("classifier: Support table versioning")
Signed-off-by: Jarno Rajahalme <jarno at ovn.org>
More information about the git
mailing list