]> git.ipfire.org Git - thirdparty/linux.git/commit - mm/slub.c
mm/slub: Move the stackdepot related allocation out of IRQ-off section.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 7 Jun 2022 15:20:10 +0000 (17:20 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Mon, 13 Jun 2022 15:26:20 +0000 (17:26 +0200)
commitc4cf6785599b8126ea29160800fec5f1db0a6a30
treeffbb9d144b054957dd9e3306e5d153f238fb557b
parentb13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3
mm/slub: Move the stackdepot related allocation out of IRQ-off section.

The set_track() invocation in free_debug_processing() is invoked with
acquired slab_lock(). The lock disables interrupts on PREEMPT_RT and
this forbids to allocate memory which is done in stack_depot_save().

Split set_track() into two parts: set_track_prepare() which allocate
memory and set_track_update() which only performs the assignment of the
trace data structure. Use set_track_prepare() before disabling
interrupts.

[ vbabka@suse.cz: make set_track() call set_track_update() instead of
  open-coded assignments ]

Fixes: 5cf909c553e9e ("mm/slub: use stackdepot to save stack trace in objects")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Link: https://lore.kernel.org/r/Yp9sqoUi4fVa5ExF@linutronix.de
mm/slub.c