Skip to content
Commit 8b0871c5 authored by Duy Nguyen's avatar Duy Nguyen Committed by Benjamin Cabé
Browse files

kernel: memslab: Prevent pointer underflow in free list init



The "p -= slab->info.block_size;" is causing the "p" pointer
to be underflow in RX architecture case, where the RAM address
start from 0x0, in some case p minus block size make it underflow
This change implementation uses an index-based reverse loop to
safely iterate over each block from last to first.

Signed-off-by: default avatarDuy Nguyen <duy.nguyen.xa@renesas.com>
parent 58ed8c16
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment