From patchwork Wed Mar 15 15:06:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bugzilla-daemon@bugs.linaro.org X-Patchwork-Id: 95353 Delivered-To: patch@linaro.org Received: by 10.140.89.134 with SMTP id v6csp369890qgd; Wed, 15 Mar 2017 08:06:50 -0700 (PDT) X-Received: by 10.107.12.215 with SMTP id 84mr5290720iom.89.1489590409962; Wed, 15 Mar 2017 08:06:49 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v99si3252986ioi.163.2017.03.15.08.06.49; Wed, 15 Mar 2017 08:06:49 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 18FEF62D9A; Wed, 15 Mar 2017 15:06:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id DBA4B606A0; Wed, 15 Mar 2017 15:06:44 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 017E8606A4; Wed, 15 Mar 2017 15:06:42 +0000 (UTC) Received: from a8-87.smtp-out.amazonses.com (a8-87.smtp-out.amazonses.com [54.240.8.87]) by lists.linaro.org (Postfix) with ESMTPS id E75B760684 for ; Wed, 15 Mar 2017 15:06:41 +0000 (UTC) From: bugzilla-daemon@bugs.linaro.org To: lng-odp@lists.linaro.org Date: Wed, 15 Mar 2017 15:06:41 +0000 X-Bugzilla-Reason: AssignedTo CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: OpenDataPlane - linux- generic reference X-Bugzilla-Component: Helpers X-Bugzilla-Version: master X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: matias.elo@nokia.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: lng-odp@lists.linaro.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <0100015ad281b9d0-3e946dc5-76a0-4834-a16b-a39aa001212d-000000@email.amazonses.com> In-Reply-To: References: X-Bugzilla-URL: https://bugs.linaro.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SES-Outgoing: 2017.03.15-54.240.8.87 Feedback-ID: 1.us-east-1.Y2eXJruXwxqfBntQfC4/6O4zDrCY0XKEghZ/yI2DADM=:AmazonSES X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Subject: [lng-odp] [Bug 2910] odph_iplookup_table_put_value() uses overlapping pointer addresses X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" https://bugs.linaro.org/show_bug.cgi?id=2910 --- Comment #1 from Matias Elo --- The following patch fixes the problem but is it a valid change? helper/iplookuptable.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. diff --git a/helper/iplookuptable.c b/helper/iplookuptable.c index aae2199..37d31e3 100644 --- a/helper/iplookuptable.c +++ b/helper/iplookuptable.c @@ -42,6 +42,10 @@ */ typedef struct { union { + odp_buffer_t nexthop; + void *ptr; + }; + union { uint8_t u8; struct { #if ODP_BYTE_ORDER == ODP_BIG_ENDIAN @@ -53,10 +57,6 @@ typedef struct { #endif }; }; - union { - odp_buffer_t nexthop; - void *ptr; - }; } prefix_entry_t; #define ENTRY_SIZE (sizeof(prefix_entry_t) + sizeof(odp_buffer_t))