From patchwork Mon Sep 21 13:33:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 520295 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 7FF301401DE for ; Mon, 21 Sep 2015 23:36:19 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id C355910893; Mon, 21 Sep 2015 06:36:18 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id DAF241087F for ; Mon, 21 Sep 2015 06:36:17 -0700 (PDT) Received: from bar2.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 5D6F4420482 for ; Mon, 21 Sep 2015 07:36:17 -0600 (MDT) X-ASG-Debug-ID: 1442842576-03dc537fe33bbfe0001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar2.cudamail.com with ESMTP id fbJ6ZnzBARODtKj6 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 21 Sep 2015 07:36:16 -0600 (MDT) X-Barracuda-Envelope-From: a.hajda@samsung.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mailout2.w1.samsung.com) (210.118.77.12) by mx1-pf2.cudamail.com with ESMTPS (DHE-RSA-AES128-SHA encrypted); 21 Sep 2015 13:36:15 -0000 Received-SPF: none (mx1-pf2.cudamail.com: domain at samsung.com does not designate permitted sender hosts) X-Barracuda-Apparent-Source-IP: 210.118.77.12 X-Barracuda-RBL-IP: 210.118.77.12 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NV1005VK4GDSJ60@mailout2.w1.samsung.com> for dev@openvswitch.org; Mon, 21 Sep 2015 14:36:13 +0100 (BST) X-AuditID: cbfec7f4-f79c56d0000012ee-c0-560007cdd38f Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 02.67.04846.DC700065; Mon, 21 Sep 2015 14:36:13 +0100 (BST) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NV100LNT4DTKI10@eusync3.samsung.com>; Mon, 21 Sep 2015 14:36:13 +0100 (BST) X-CudaMail-Envelope-Sender: a.hajda@samsung.com From: Andrzej Hajda To: linux-kernel@vger.kernel.org X-CudaMail-MID: CM-E2-920022173 X-CudaMail-DTE: 092115 X-CudaMail-Originating-IP: 210.118.77.12 Date: Mon, 21 Sep 2015 15:33:40 +0200 X-ASG-Orig-Subj: [##CM-E2-920022173##][PATCH 08/38] openvswitch: fix handling result of ipv6_skip_exthdr Message-id: <1442842450-29769-9-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1442842450-29769-1-git-send-email-a.hajda@samsung.com> References: <1442842450-29769-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBLMWRmVeSWpSXmKPExsVy+t/xq7pn2RnCDE7NVre4te4cq8XGGetZ Leacb2GxOHp6D7PF5V1z2CzWHrnLbnFsgZjF35vPmB04PLasvMnkceDodhaPZzf/M3r0bVnF 6PF5k1wAaxSXTUpqTmZZapG+XQJXxpWd91kLrrNV7P/UzNbAeJm1i5GTQ0LAROLOzQlMELaY xIV769m6GLk4hASWMko8WvaXEcJpYpJoXrqYGaSKTUBT4u/mm2wgtoiAgsTm3mesIEXMAj1M EsdP3QTq4OAQFvCW+NxuBlLDIqAqsfH1PxYQm1fAWeJSRzs7xDY5iZPHJoNdwSngInHg4Bew GiGgmgNLjjBNYORdwMiwilE0tTS5oDgpPddQrzgxt7g0L10vOT93EyMkvL7sYFx8zOoQowAH oxIPr4PA/1Ah1sSy4srcQ4wSHMxKIrw6s4BCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeefueh8i JJCeWJKanZpakFoEk2Xi4JRqYMwr45Q3Crx8/Ngs3oTy4vKHrc4b9j9dKH3+U1XxXWbhPWnZ j83b5DLmbD2xuXPGh+ADu9NtvBz6akvMd7Ynl90L+BzW3aCnfv/zubPKrRILv/+b+3WLjtP+ nkyWvFWvnt7RyG3NvWuWbLTU2d24/JUQv5q4xyO9y2vNpmjJTVHRPXrn6HPffCWW4oxEQy3m ouJEAHHBeeUrAgAA X-GBUdb-Analysis: 0, 210.118.77.12, Ugly c=0 p=0 Source New X-MessageSniffer-Rules: 0-0-0-4459-c X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1442842576 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-ASG-Whitelist: EmailCat (corporate) Cc: dev@openvswitch.org, Bartlomiej Zolnierkiewicz , netdev@vger.kernel.org, Andrzej Hajda , "David S. Miller" , Marek Szyprowski Subject: [ovs-dev] [PATCH 08/38] openvswitch: fix handling result of ipv6_skip_exthdr 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: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda --- net/openvswitch/conntrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c index 002a755..fde3391 100644 --- a/net/openvswitch/conntrack.c +++ b/net/openvswitch/conntrack.c @@ -253,7 +253,7 @@ static int ovs_ct_helper(struct sk_buff *skb, u16 proto) const struct nf_conntrack_helper *helper; const struct nf_conn_help *help; enum ip_conntrack_info ctinfo; - unsigned int protoff; + int protoff; struct nf_conn *ct; ct = nf_ct_get(skb, &ctinfo);