From patchwork Tue Jul 11 18:32:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 786802 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x6W1X5F0zz9s03 for ; Wed, 12 Jul 2017 04:33:36 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A307BB73; Tue, 11 Jul 2017 18:33:07 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id E6A1AB5E for ; Tue, 11 Jul 2017 18:33:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 18C303D6 for ; Tue, 11 Jul 2017 18:33:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4FAC9550CC; Tue, 11 Jul 2017 18:33:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4FAC9550CC Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=aconole@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4FAC9550CC Received: from dhcp-25-97.bos.redhat.com (ovpn-123-178.rdu2.redhat.com [10.10.123.178]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1B44A5D9C1; Tue, 11 Jul 2017 18:33:02 +0000 (UTC) From: Aaron Conole To: ZhiPeng Lu References: <1499734030-5344-1-git-send-email-lu.zhipeng@zte.com.cn> Date: Tue, 11 Jul 2017 14:32:57 -0400 In-Reply-To: <1499734030-5344-1-git-send-email-lu.zhipeng@zte.com.cn> (ZhiPeng Lu's message of "Tue, 11 Jul 2017 08:47:10 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 11 Jul 2017 18:33:04 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH] Fixes: 3f5b5f7b4115 ("db-ctl-base: Always support all tables in schema.") X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Hi ZhiPeng, ZhiPeng Lu writes: > This fixes an assertion failure in command "ovs-vsctl list netflow br0", > if bridge br0 without any netflows. > $ovs-vsctl list netflow br0 > ovs-vsctl: lib/ovsdb-idl.c:2407: assertion column_idx < class->n_columns failed > in ovsdb_idl_read() > Aborted > > Get_row_by_id() shoudle return NULL if not find by ovsdb_idl_get_row_for_uuid(). > > Signed-off-by: Zhipeng Lu > --- Would the following delta fit better? I don't know about the correctness of the original change, so I CC'd Alex Wang (the author of the commit in question.) diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c index 7839389..a1be462 100644 --- a/lib/db-ctl-base.c +++ b/lib/db-ctl-base.c @@ -336,7 +336,7 @@ get_row_by_id(struct ctl_context *ctx, return NULL; } - const struct ovsdb_idl_row *final = referrer; + const struct ovsdb_idl_row *final = NULL; if (id->uuid_column) { const struct ovsdb_datum *uuid;