[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <SA0PR04MB7418E3D24D75000E5FB5D5699B759@SA0PR04MB7418.namprd04.prod.outlook.com>
Date: Wed, 7 Apr 2021 14:13:14 +0000
From: Johannes Thumshirn <Johannes.Thumshirn@....com>
To: Colin King <colin.king@...onical.com>,
Jack Wang <jinpu.wang@...ud.ionos.com>,
"James E . J . Bottomley" <jejb@...ux.ibm.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
Viswas G <Viswas.G@...rochip.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] scsi: pm80xx: Fix potential infinite loop
On 07/04/2021 15:58, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> The for-loop iterates with a u8 loop counter i and compares this
> with the loop upper limit of pm8001_ha->max_q_num which is a u32
> type. There is a potential infinite loop if pm8001_ha->max_q_num
> is larger than the u8 loop counter. Fix this by making the loop
> counter the same type as pm8001_ha->max_q_num.
Heh, coincidentally I've read your blog post on this issue today.
> Addresses-Coverity: ("Infinite loop")
> Fixes: 65df7d1986a1 ("scsi: pm80xx: Fix chip initialization failure")
AFAICS this still is in Martin's tree and not yet in Linus' tree.
Anyways, looks good.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@....com>
Powered by blists - more mailing lists