Commit 4aa6c22f authored by Hyesoo Yu's avatar Hyesoo Yu Committed by Treehugger Robot
Browse files

FROMGIT: mm: slub: call WARN() when detecting a slab corruption



If a slab object is corrupted or an error occurs in its internal
validation, continuing after restoration may cause other side effects.
At this point, it is difficult to debug because the problem occurred in
the past. It is useful to use WARN() to catch errors at the point of
issue because WARN() could trigger panic for system debugging when
panic_on_warn is enabled. WARN() is added where to detect the error on
slab_err and object_err.

It makes sense to only do the WARN() after printing the logs. slab_err
is splited to __slab_err that calls the WARN() and it is called after
printing logs.

Signed-off-by: default avatarHyesoo Yu <hyesoo.yu@samsung.com>
Reviewed-by: default avatarHarry Yoo <harry.yoo@oracle.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>

Link: https://lore.kernel.org/linux-mm/20250226081206.680495-1-hyesoo.yu@samsung.com/


(cherry picked from commit 9ce7249defeda32f2b7dec40e33df203b39d9010
 https: //git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git for-6.15/fixes-cleanups)
Bug: 399511949
Change-Id: I0019ec0b5c271ce1bb69c827b59a7948e15f19be
Signed-off-by: default avatarHyesoo Yu <hyesoo.yu@samsung.com>
parent fd6246d8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment