Skip to content
Commit 2eba2e9c authored by Riadh Ghaddab's avatar Riadh Ghaddab Committed by Benjamin Cabé
Browse files

zms: add more robustiness in extreme cases



When power cuts during a GC operation, the sector is erased again in the
next reboot cycle and the cycle_cnt of the empty ATE is incremented.
If the same power cut happens 255 times in a row, the empty ATE cycle_cnt
will become equal to the close ATE which causes a memory corruption.
Fix this by checking the close ATE cycle_cnt before incrementing the
empty ATE cycle_cnt.

Fixes: #84874
Signed-off-by: default avatarRiadh Ghaddab <rghaddab@baylibre.com>
parent f1c83bca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment