nat_clean has a defunct optimization for calculating a hash outside the scope of a bucket lock; move the line into the scope of the lock. Needs backporting to 2.8.
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-August/351629.html Fixes: 286de2729955 ("dpdk: Userspace Datapath: Introduce NAT Support.") Signed-off-by: Darrell Ball <[email protected]> --- lib/conntrack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/conntrack.c b/lib/conntrack.c index be8debb..44cb91b 100644 --- a/lib/conntrack.c +++ b/lib/conntrack.c @@ -778,10 +778,11 @@ nat_clean(struct conntrack *ct, struct conn *conn, { ct_rwlock_wrlock(&ct->resources_lock); nat_conn_keys_remove(&ct->nat_conn_keys, &conn->rev_key, ct->hash_basis); - ct_rwlock_unlock(&ct->resources_lock); - ct_lock_unlock(&ctb->lock); unsigned bucket_rev_conn = hash_to_bucket(conn_key_hash(&conn->rev_key, ct->hash_basis)); + ct_rwlock_unlock(&ct->resources_lock); + ct_lock_unlock(&ctb->lock); + ct_lock_lock(&ct->buckets[bucket_rev_conn].lock); ct_rwlock_wrlock(&ct->resources_lock); long long now = time_msec(); -- 1.9.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
