Messages in this thread |  | | Subject | Re: [PATCH] scsi: megaraid_mm: Fix end of loop tests for list_for_each_entry | From | "Martin K. Petersen" <> | Date | Mon, 26 Jul 2021 23:20:11 -0400 |
| |
Kashyap,
> 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.
Please review. Thanks!
-- Martin K. Petersen Oracle Linux Engineering
|  |