linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix invalid wait context of set_track_prepare()
@ 2023-11-15  8:21 Liu Shixin
  2023-11-15  8:21 ` [PATCH 1/2] Revert "mm/kmemleak: move the initialisation of object to __link_object" Liu Shixin
  2023-11-15  8:21 ` [PATCH 2/2] mm/kmemleak: move set_track_prepare() outside raw_spinlocks Liu Shixin
  0 siblings, 2 replies; 6+ messages in thread
From: Liu Shixin @ 2023-11-15  8:21 UTC (permalink / raw)
  To: Geert Uytterhoeven, Catalin Marinas, Patrick Wang, Andrew Morton,
	Kefeng Wang
  Cc: linux-mm, linux-kernel, Linux-Renesas, Liu Shixin

Geert reported an invalid wait context[1] which is resulted by moving
set_track_prepare() inside kmemleak_lock. This is not allowed because
in RT mode, the spinlocks can be preempted but raw_spinlocks can not,
so it is not allowd to acquire spinlocks while holding raw_spinlocks.
The second patch fix same problem in kmemleak_update_trace().

Link: https://lore.kernel.org/linux-mm/CAMuHMdWj0UzwNaxUvcocTfh481qRJpOWwXxsJCTJfu1oCqvgdA@mail.gmail.com/ [1]

Liu Shixin (2):
  Revert "mm/kmemleak: move the initialisation of object to
    __link_object"
  mm/kmemleak: move set_track_prepare() outside raw_spinlocks

 mm/kmemleak.c | 40 ++++++++++++++++++++++------------------
 1 file changed, 22 insertions(+), 18 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-15 14:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15  8:21 [PATCH 0/2] Fix invalid wait context of set_track_prepare() Liu Shixin
2023-11-15  8:21 ` [PATCH 1/2] Revert "mm/kmemleak: move the initialisation of object to __link_object" Liu Shixin
2023-11-15  8:19   ` Geert Uytterhoeven
2023-11-15 14:17   ` Catalin Marinas
2023-11-15  8:21 ` [PATCH 2/2] mm/kmemleak: move set_track_prepare() outside raw_spinlocks Liu Shixin
2023-11-15 14:19   ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox