]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit81340a6e59119f451b75102a7e4ba30a84bd0727
treeffbb9d144b054957dd9e3306e5d153f238fb557b
parentb52d5a6d90c5addd271912240e89be49abd74565
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: b913bfaf97b39 ("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