Re: [PATCH] nfp: fix infinite loop on umapping cleanup

From: David Miller
Date: Fri Aug 18 2017 - 13:29:24 EST


From: Colin King <colin.king@xxxxxxxxxxxxx>
Date: Fri, 18 Aug 2017 12:11:50 +0100

> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> 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 <colin.king@xxxxxxxxxxxxx>

Applied and queued up for -stable.