Re: powerpc/crash: Rearrange loop condition to avoid out of bounds array access

2016-07-15 Thread Michael Ellerman
On Mon, 2016-11-07 at 04:17:31 UTC, Suraj Jitindar Singh wrote: > The array crash_shutdown_handles[] has size CRASH_HANDLER_MAX, thus when > we loop over the elements of the list we check crash_shutdown_handles[i] > && i < CRASH_HANDLER_MAX. However this means that when we increment i to > CRASH_HA

Re: [PATCH] powerpc/crash: Rearrange loop condition to avoid out of bounds array access

2016-07-10 Thread Andrew Donnellan
On 11/07/16 14:17, Suraj Jitindar Singh wrote: The array crash_shutdown_handles[] has size CRASH_HANDLER_MAX, thus when we loop over the elements of the list we check crash_shutdown_handles[i] && i < CRASH_HANDLER_MAX. However this means that when we increment i to CRASH_HANDLER_MAX we will perfo

[PATCH] powerpc/crash: Rearrange loop condition to avoid out of bounds array access

2016-07-10 Thread Suraj Jitindar Singh
The array crash_shutdown_handles[] has size CRASH_HANDLER_MAX, thus when we loop over the elements of the list we check crash_shutdown_handles[i] && i < CRASH_HANDLER_MAX. However this means that when we increment i to CRASH_HANDLER_MAX we will perform an out of bound array access checking the firs