Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751626AbdHROcj (ORCPT ); Fri, 18 Aug 2017 10:32:39 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:35540 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750846AbdHROch (ORCPT ); Fri, 18 Aug 2017 10:32:37 -0400 Date: Fri, 18 Aug 2017 07:32:34 -0700 From: Jakub Kicinski To: Colin King Cc: "David S . Miller" , Simon Horman , Daniel Borkmann , oss-drivers@netronome.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [oss-drivers] [PATCH] nfp: fix infinite loop on umapping cleanup Message-ID: <20170818073234.3f4c5e56@cakuba.netronome.com> In-Reply-To: <20170818111150.13716-1-colin.king@canonical.com> References: <20170818111150.13716-1-colin.king@canonical.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 528 Lines: 15 On Fri, 18 Aug 2017 12:11:50 +0100, Colin King wrote: > From: Colin Ian King > > The while loop that performs the dma page unmapping never decrements > index counter f and hence loops forever. Fix this with a pre-decrement > on f. > > Detected by CoverityScan, CID#1357309 ("Infinite loop") > > Fixes: 4c3523623dc0 ("net: add driver for Netronome NFP4000/NFP6000 NIC VFs") > Signed-off-by: Colin Ian King Acked-by: Jakub Kicinski Thanks!