Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752018AbdHRR3V (ORCPT ); Fri, 18 Aug 2017 13:29:21 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:57034 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751055AbdHRR3U (ORCPT ); Fri, 18 Aug 2017 13:29:20 -0400 Date: Fri, 18 Aug 2017 10:29:19 -0700 (PDT) Message-Id: <20170818.102919.1311901104192299250.davem@davemloft.net> To: colin.king@canonical.com Cc: simon.horman@netronome.com, daniel@iogearbox.net, oss-drivers@netronome.com, netdev@vger.kernel.org, jakub.kicinski@netronome.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nfp: fix infinite loop on umapping cleanup From: David Miller In-Reply-To: <20170818111150.13716-1-colin.king@canonical.com> References: <20170818111150.13716-1-colin.king@canonical.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 18 Aug 2017 10:29:20 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 527 Lines: 15 From: Colin King Date: Fri, 18 Aug 2017 12:11:50 +0100 > 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 Applied and queued up for -stable.