Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3244096ybh; Mon, 5 Aug 2019 14:50:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVavP/vmU8uUkoxr4t52wzEACSNqRhjCvWyN0yVGWbQnzS3T6LqRorn//FVViHOv0+x799 X-Received: by 2002:a17:90a:fa07:: with SMTP id cm7mr19555912pjb.138.1565041812837; Mon, 05 Aug 2019 14:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565041812; cv=none; d=google.com; s=arc-20160816; b=je4mw2mew8MQxZ3qwLSJ3Q8fXhGgUnqgMzDpBPbocYeCkbG+GCZvdWajF7dSimMZbC +QwpVIAwVxJ9433Py4PcrjwOsP5xRVaDRDi2XclZz+jJs01eyuPhKv/OqhMgD15ntVW8 0IpARVqwj1pKJI4WZzbXmskYG3jDfKVVlekAPLXPNnbmCIrnPxve6bi1LC8jYLWw6ycm vZGpFmlPaqM208+AOOmeicHpdZpvTm0T9tvu1sk088trG9VRjsXg+9V6eZ1UqbU2WW6Q NJNEam/wp088DkUAkLBPzPmQrtaeUmSVjD1shh2mQutrttqj0mzDYiXme5woYrMGiVtD kgUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=bH2k6D+DL5I07esi6YB8L1Ifbhlggo88oqquerX66Lk=; b=afqH9nn2lVBDQFkZFRQbqvi08ajgcHCkdEYwNdgCg/7AsWB9oF+vhJRqEJWA05EOSL cH2XzY+3ChtRJwPWQibGGKOeSGvktuXx+ty00EtIe91cP55uIayme0xHa0qYuHhNZZDk t+fBS0ubcq9pWCda04NqritTi4TOrRRGTRwwehmV3NYKzgEC/Bot5O+WYp4L2yMv9Pm/ UVBAjar5WEeCIuB4vPHdU2uRkUjbMZ4VJfulWBeAUGi8bAkZZpN6TjZg/htRJQ+x5Zmn X3DfAOxkyUgtjR4lUX+/qQbBVLcaQyYaQwJBRo978/cwOdon1jV/7FMAxLwQbVGxx9vT ITTw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c35si35574441pgm.51.2019.08.05.14.49.56; Mon, 05 Aug 2019 14:50:12 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730572AbfHEVtV convert rfc822-to-8bit (ORCPT + 99 others); Mon, 5 Aug 2019 17:49:21 -0400 Received: from mga05.intel.com ([192.55.52.43]:42601 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728483AbfHEVtU (ORCPT ); Mon, 5 Aug 2019 17:49:20 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Aug 2019 14:49:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,350,1559545200"; d="scan'208";a="198108646" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by fmsmga004.fm.intel.com with ESMTP; 05 Aug 2019 14:49:20 -0700 Received: from orsmsx158.amr.corp.intel.com (10.22.240.20) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 5 Aug 2019 14:49:19 -0700 Received: from orsmsx104.amr.corp.intel.com ([169.254.4.30]) by ORSMSX158.amr.corp.intel.com ([169.254.10.82]) with mapi id 14.03.0439.000; Mon, 5 Aug 2019 14:49:19 -0700 From: "Bowers, AndrewX" To: "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" CC: "kernel-janitors@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [Intel-wired-lan] [PATCH][net-next] ice: fix potential infinite loop Thread-Topic: [Intel-wired-lan] [PATCH][net-next] ice: fix potential infinite loop Thread-Index: AQHVSUpL9gftzLL2UkeGUTDva3hnqabtHJuA Date: Mon, 5 Aug 2019 21:49:19 +0000 Message-ID: <26D9FDECA4FBDD4AADA65D8E2FC68A4A1D40F188@ORSMSX104.amr.corp.intel.com> References: <20190802155217.16996-1-colin.king@canonical.com> In-Reply-To: <20190802155217.16996-1-colin.king@canonical.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWFmZjJjMWMtNTgzNS00NTQyLTgwNTEtMzVmNWJkNjA3Y2NlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZm9ZQ3NGYUlPd2MxenQzcTJLSndsNEhpYUJTTUUxbEY0RUVQWU9QUVBTbVpyUk5LWDg0c3R4K1huanNRcllRVyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Intel-wired-lan [mailto:intel-wired-lan-bounces@osuosl.org] On > Behalf Of Colin King > Sent: Friday, August 2, 2019 8:52 AM > To: Kirsher, Jeffrey T ; David S . Miller > ; intel-wired-lan@lists.osuosl.org; > netdev@vger.kernel.org > Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: [Intel-wired-lan] [PATCH][net-next] ice: fix potential infinite loop > > From: Colin Ian King > > The loop counter of a for-loop is a u8 however this is being compared to an > int upper bound and this can lead to an infinite loop if the upper bound is > greater than 255 since the loop counter will wrap back to zero. Fix this > potential issue by making the loop counter an int. > > Addresses-Coverity: ("Infinite loop") > Fixes: c7aeb4d1b9bf ("ice: Disable VFs until reset is completed") > Signed-off-by: Colin Ian King > --- > drivers/net/ethernet/intel/ice/ice_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Tested-by: Andrew Bowers