lkml.org 
[lkml]   [2023]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] scsi: lpfc: avoid usage of list iterator variable after loop
Date
On Wed, 01 Mar 2023 18:19:14 +0100, Jakob Koschel wrote:

> If the &epd_pool->list is empty when executing
> lpfc_get_io_buf_from_expedite_pool() the function would return an
> invalid pointer. Even in the case if the list is guaranteed to be
> populated, the iterator variable should not be used after the loop to be
> more robust for future changes.
>
> Linus proposed to avoid any use of the list iterator variable after the
> loop, in the attempt to move the list iterator variable declaration into
> the marcro to avoid any potential misuse after the loop [1].
>
> [...]

Applied to 6.3/scsi-fixes, thanks!

[1/1] scsi: lpfc: avoid usage of list iterator variable after loop
https://git.kernel.org/mkp/scsi/c/2850b23e9f9a

--
Martin K. Petersen Oracle Linux Engineering

\
 
 \ /
  Last update: 2023-03-27 00:46    [W:0.039 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site