From patchwork Fri Oct 2 11:23:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Mauricio_V=C3=A1squez?= X-Patchwork-Id: 525461 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 2EB2E1402F0 for ; Fri, 2 Oct 2015 21:23:47 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=studenti.polito.it header.i=@studenti.polito.it header.b=a9bCYgyU; dkim-atps=neutral Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 4EF3810E67; Fri, 2 Oct 2015 04:23:46 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v1.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id CE35510E66 for ; Fri, 2 Oct 2015 04:23:44 -0700 (PDT) Received: from bar3.cudamail.com (bar1 [192.168.15.1]) by mx3v1.cudamail.com (Postfix) with ESMTP id E2253618202 for ; Fri, 2 Oct 2015 05:23:43 -0600 (MDT) X-ASG-Debug-ID: 1443785021-03dd7b01f22a4f0001-byXFYA Received: from mx3-pf3.cudamail.com ([192.168.14.3]) by bar3.cudamail.com with ESMTP id 1QtpeACqC7O6Youd (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 02 Oct 2015 05:23:41 -0600 (MDT) X-Barracuda-Envelope-From: mauricio.vasquezbernal@studenti.polito.it X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.3 Received: from unknown (HELO compass.polito.it) (130.192.55.110) by mx3-pf3.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 2 Oct 2015 11:23:35 -0000 Received-SPF: pass (mx3-pf3.cudamail.com: SPF record at studenti.polito.it designates 130.192.55.110 as permitted sender) X-Barracuda-Apparent-Source-IP: 130.192.55.110 X-Barracuda-RBL-IP: 130.192.55.110 Received: from localhost (localhost [127.0.0.1]) by compass.polito.it (Postfix) with ESMTP id 362B21000FC for ; Fri, 2 Oct 2015 13:23:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= studenti.polito.it; h=content-type:content-type:to:from:from :subject:subject:message-id:date:date:received:mime-version :received:received:received; s=y2k10; t=1443785012; bh=B6YMfkjke qIWLUSfiwA/XQyJizTVvW443WKeKlafj54=; b=a9bCYgyUXLNMlhGYoqXwTaN71 THzlQ3O2wKEYE/WizrRoIfIYqTKG26LZlGqQ0iDfQy0lK/1lUgw9WvTzJP2fnLzj ncjTQS5zAR3OQLACe4m7so2yu01gnD7z04gWlw2se8xB1nTw7DAxs3aJjSw5PI1f 3Yhm7I+IyM5pF6o6PE= X-Virus-Scanned: amavisd-new at studenti.polito.it Received: from compass.polito.it ([127.0.0.1]) by localhost (compass.polito.it [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OjZ9GukwuIo6 for ; Fri, 2 Oct 2015 13:23:32 +0200 (CEST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com [209.85.215.48]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: s203403@studenti.polito.it) by compass.polito.it (Postfix) with ESMTPSA id F1CD51000F3 for ; Fri, 2 Oct 2015 13:23:31 +0200 (CEST) Received: by labzv5 with SMTP id zv5so91045816lab.1 for ; Fri, 02 Oct 2015 04:23:31 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.147.39 with SMTP id th7mr5094466lbb.82.1443785011594; Fri, 02 Oct 2015 04:23:31 -0700 (PDT) Received: by 10.25.77.197 with HTTP; Fri, 2 Oct 2015 04:23:31 -0700 (PDT) Date: Fri, 2 Oct 2015 13:23:31 +0200 Message-ID: X-CudaMail-MID: CM-V3-1001006758 X-CudaMail-DTE: 100215 X-CudaMail-Originating-IP: 130.192.55.110 X-CudaMail-Envelope-Sender: mauricio.vasquezbernal@studenti.polito.it X-ASG-Orig-Subj: [##CM-V3-1001006758##][PATCH] lib/util.h: change definition of LIST_FOR_EACH_CONTINUE macro From: =?UTF-8?Q?Mauricio_V=C3=A1squez?= To: dev@openvswitch.org X-GBUdb-Analysis: 0, 130.192.55.110, Ugly c=0 p=0 Source New X-MessageSniffer-Rules: 0-0-0-7855-c X-Barracuda-Connect: UNKNOWN[192.168.14.3] X-Barracuda-Start-Time: 1443785021 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=3.0 tests=BSF_SC5_MJ1963, DKIM_SIGNED, HTML_MESSAGE, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.23113 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.00 HTML_MESSAGE BODY: HTML included in message 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Subject: [ovs-dev] [PATCH] lib/util.h: change definition of LIST_FOR_EACH_CONTINUE macro X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" The definition of the INIT_CONTAINER macro initializes ITER to NULL, it will cause a segmentation fault when it is deferenced on (ITER)->MEMBER.next, then, I changed it to the ASSIGN_CONTAINER macro that does not initialize ITER. Signed-off-by: Mauricio Vasquez B --- lib/list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- diff --git a/lib/list.h b/lib/list.h index 5ad54b8..db4a613 100644 --- a/lib/list.h +++ b/lib/list.h @@ -62,7 +62,7 @@ static inline bool list_is_short(const struct ovs_list *); &(ITER)->MEMBER != (LIST); \ ASSIGN_CONTAINER(ITER, (ITER)->MEMBER.next, MEMBER)) #define LIST_FOR_EACH_CONTINUE(ITER, MEMBER, LIST) \ - for (INIT_CONTAINER(ITER, (ITER)->MEMBER.next, MEMBER); \ + for (ASSIGN_CONTAINER(ITER, (ITER)->MEMBER.next, MEMBER); \ &(ITER)->MEMBER != (LIST); \ ASSIGN_CONTAINER(ITER, (ITER)->MEMBER.next, MEMBER)) #define LIST_FOR_EACH_REVERSE(ITER, MEMBER, LIST) \