[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL2rwxoDwkrsZNQjdpft==8wVY5nDaNUd03ixtbrbArMSPWbow@mail.gmail.com>
Date: Tue, 27 Jul 2021 16:25:35 +0530
From: Sumit Saxena <sumit.saxena@...adcom.com>
To: Harshvardhan Jha <harshvardhan.jha@...cle.com>
Cc: Kashyap Desai <kashyap.desai@...adcom.com>,
Shivasharan Srikanteshwara
<shivasharan.srikanteshwara@...adcom.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
"PDL,MEGARAIDLINUX" <megaraidlinux.pdl@...adcom.com>,
Linux SCSI List <linux-scsi@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH] scsi: megaraid_mm: Fix end of loop tests for list_for_each_entry
On Thu, Jul 8, 2021 at 1:16 PM Harshvardhan Jha
<harshvardhan.jha@...cle.com> wrote:
>
> The list_for_each_entry() iterator, "adapter" in this code, can never be
> NULL. If we exit the loop without finding the correct adapter then
> "adapter" points invalid memory that is an offset from the list head.
> This will eventually lead to memory corruption and presumably a kernel
> crash.
>
> Signed-off-by: Harshvardhan Jha <harshvardhan.jha@...cle.com>
Looks good.
Acked-by: Sumit Saxena <sumit.saxena@...adcom.com>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4209 bytes)
Powered by blists - more mailing lists