[ovs-build] Fixed: igsilya/ovs#770 (tmp-branch-2.12 - 75a3062)

Travis CI builds at travis-ci.org
Thu May 28 13:04:32 UTC 2020


Build Update for igsilya/ovs
-------------------------------------

Build: #770
Status: Fixed

Duration: 13 mins and 18 secs
Commit: 75a3062 (tmp-branch-2.12)
Author: Eiichi Tsukata
Message: classifier: Prevent tries vs n_tries race leading to NULL dereference.

Currently classifier tries and n_tries can be updated not atomically,
there is a race condition which can lead to NULL dereference.
The race can happen when main thread updates a classifier tries and
n_tries in classifier_set_prefix_fields() and at the same time revalidator
or handler thread try to lookup them in classifier_lookup__(). Such race
can be triggered when user changes prefixes of flow_table.

Race(user changes flow_table prefixes: ip_dst,ip_src => none):

  [main thread]             [revalidator/handler thread]
  ===========================================================
                            /* cls->n_tries == 2 */
                            for (int i = 0; i < cls->n_tries; i++) {
  trie_init(cls, i, NULL);
  /* n_tries == 0 */
  cls->n_tries = n_tries;
                            /* cls->tries[i]->feild is NULL */
                            trie_ctx_init(&trie_ctx[i],&cls->tries[i]);
                            /* trie->field is NULL */
                            ctx->be32ofs = trie->field->flow_be32ofs;

To prevent the race, instead of re-introducing internal mutex
implemented in the commit fccd7c092e09 ("classifier: Remove internal
mutex."), this patch makes trie field RCU protected and checks it after
read.

Fixes: fccd7c092e09 ("classifier: Remove internal mutex.")
Signed-off-by: Eiichi Tsukata <eiichi.tsukata at nutanix.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>

View the changeset: https://github.com/igsilya/ovs/compare/5aa334aa24a8...75a30623645f

View the full build log and details: https://travis-ci.org/github/igsilya/ovs/builds/692093466?utm_medium=notification&utm_source=email

--

You can unsubscribe from build emails from the igsilya/ovs repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=17831080&utm_medium=notification&utm_source=email.
Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email.
Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-build/attachments/20200528/9669c953/attachment-0001.html>


More information about the build mailing list