Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp519816imu; Thu, 20 Dec 2018 00:29:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/WzJQGMQ9luN9fiO8bLSBMioMjQ+qUfs0ccjuZ+rEccgz0YUI+BsP0kH7uXCyregj/RZQzs X-Received: by 2002:a63:65c7:: with SMTP id z190mr22312394pgb.249.1545294575723; Thu, 20 Dec 2018 00:29:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545294575; cv=none; d=google.com; s=arc-20160816; b=yI/QhkscYbWvN7tF+gO8i+E5w3KAfoWwyx0F4t1DGpNm+exxJaAKmKpIcEp0/zl/0c aMH6CcdTTNBdV4CL3K/MjLjAxFTiy5+VRWktG7dA+ZeI/nNG1xFI49rzcoiBI8PWAcsd eiVdlwdqjbbR0/G050PMGer65PSYS19D5DA2PNLeXXcrIiLvxRXF3ZmSFpph45xRXtDP hQcd/Kqbx0PE5PpcwVN8/hZnV5MFfleTHIBEiST8hKhQZ+DKClDdnaPAV2RuQ+1tA6yE 3xGtpmH19jYp21gJWOTOfw//t+67bswk/tO/UQMkD2kkjTUnmzRcG4e1OTXnFlixFhOI zj7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FhJxkw3RS/8E3KlXA9C51Akyk954cgLc4d5tt9rEcy0=; b=nMMb6ySooVeurnJjTMnHMWTMbhqulzE0RvfMzvdXBE+36Yp6VTm2sbkdaKl8YMelGA zFdO+lL2ZhaFnX6dp/IgVyY/Tit4WQQ6D+hQKJJF081l4F1e+NUxIx/Zl7eF82lJqDUB 3iYUH907hfIAyM8a0qRRqAfstrcDKZ3rSo+0/YxkcaQ38eVRnNxGQSt+VKk2/7sTtxvw kx3/rpLvhUXYI6RXBaHTp2NJvufg6lceIUA+W0BRX349DxharJE+Sp45Ar/YtGJpUovw 6EPEZ4kAjZ1tAFBEBECR2HbeFr/KaPJK8jhZBWovVhWCFDE9Y3VaIPUfCpi9hmSwAt9M TwAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h88si19831621pfa.49.2018.12.20.00.29.20; Thu, 20 Dec 2018 00:29:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730530AbeLTILc (ORCPT + 99 others); Thu, 20 Dec 2018 03:11:32 -0500 Received: from a.mx.secunet.com ([62.96.220.36]:40106 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbeLTILc (ORCPT ); Thu, 20 Dec 2018 03:11:32 -0500 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 169A7201B9; Thu, 20 Dec 2018 09:11:31 +0100 (CET) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JsqTZXOzXFWW; Thu, 20 Dec 2018 09:11:30 +0100 (CET) Received: from mail-essen-01.secunet.de (mail-essen-01.secunet.de [10.53.40.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id B695F20068; Thu, 20 Dec 2018 09:11:30 +0100 (CET) Received: from gauss2.secunet.de (10.182.7.193) by mail-essen-01.secunet.de (10.53.40.204) with Microsoft SMTP Server id 14.3.408.0; Thu, 20 Dec 2018 09:11:30 +0100 Received: by gauss2.secunet.de (Postfix, from userid 1000) id 47F6B3182739; Thu, 20 Dec 2018 09:11:30 +0100 (CET) Date: Thu, 20 Dec 2018 09:11:30 +0100 From: Steffen Klassert To: YueHaibing CC: , , , , , Subject: Re: [PATCH net-next] xfrm6_tunnel: Fix spi check in __xfrm6_tunnel_alloc_spi Message-ID: <20181220081130.GB3581@gauss3.secunet.de> References: <20181219064509.9804-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20181219064509.9804-1-yuehaibing@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 23 X-G-Data-MailSecurity-for-Exchange-Server: d65e63f7-5c15-413f-8f63-c0d707471c93 X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-G-Data-MailSecurity-for-Exchange-Guid: 73B6D09D-E687-47C4-AFB1-C4660A7CFE46 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 19, 2018 at 02:45:09PM +0800, YueHaibing wrote: > gcc warn this: > > net/ipv6/xfrm6_tunnel.c:143 __xfrm6_tunnel_alloc_spi() warn: > always true condition '(spi <= 4294967295) => (0-u32max <= u32max)' > > 'spi' is u32, which always not greater than XFRM6_TUNNEL_SPI_MAX > because of wrap around. So the second forloop will never reach. > > Signed-off-by: YueHaibing Also applied, thanks a lot!