* [GIT pull] core/debugobjects for v6.4-rc1
@ 2023-05-06 19:11 Thomas Gleixner
2023-05-07 18:12 ` pr-tracker-bot
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Gleixner @ 2023-05-06 19:11 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, x86
Linus,
please pull the latest core/debugobjects branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-debugobjects-2023-05-06
up to: 0af462f19e63: debugobject: Ensure pool refill (again)
A single fix for debugobjects:
The recent fix to ensure atomicity of lookup and allocation inadvertently
broke the pool refill mechanism, so that debugobject OOMs now in certain
situations. The reason is that the functions which got updated no longer
invoke debug_objecs_init(), which is now the only place to care about
refilling the tracking object pool.
Restore the original behaviour by adding explicit refill opportunities to
those places.
Thanks,
tglx
------------------>
Thomas Gleixner (1):
debugobject: Ensure pool refill (again)
lib/debugobjects.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index b796799fadb2..003edc5ebd67 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -587,6 +587,16 @@ static struct debug_obj *lookup_object_or_alloc(void *addr, struct debug_bucket
return NULL;
}
+static void debug_objects_fill_pool(void)
+{
+ /*
+ * On RT enabled kernels the pool refill must happen in preemptible
+ * context:
+ */
+ if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible())
+ fill_pool();
+}
+
static void
__debug_object_init(void *addr, const struct debug_obj_descr *descr, int onstack)
{
@@ -595,12 +605,7 @@ __debug_object_init(void *addr, const struct debug_obj_descr *descr, int onstack
struct debug_obj *obj;
unsigned long flags;
- /*
- * On RT enabled kernels the pool refill must happen in preemptible
- * context:
- */
- if (!IS_ENABLED(CONFIG_PREEMPT_RT) || preemptible())
- fill_pool();
+ debug_objects_fill_pool();
db = get_bucket((unsigned long) addr);
@@ -685,6 +690,8 @@ int debug_object_activate(void *addr, const struct debug_obj_descr *descr)
if (!debug_objects_enabled)
return 0;
+ debug_objects_fill_pool();
+
db = get_bucket((unsigned long) addr);
raw_spin_lock_irqsave(&db->lock, flags);
@@ -894,6 +901,8 @@ void debug_object_assert_init(void *addr, const struct debug_obj_descr *descr)
if (!debug_objects_enabled)
return;
+ debug_objects_fill_pool();
+
db = get_bucket((unsigned long) addr);
raw_spin_lock_irqsave(&db->lock, flags);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [GIT pull] core/debugobjects for v6.4-rc1
2023-05-06 19:11 [GIT pull] core/debugobjects for v6.4-rc1 Thomas Gleixner
@ 2023-05-07 18:12 ` pr-tracker-bot
0 siblings, 0 replies; 2+ messages in thread
From: pr-tracker-bot @ 2023-05-07 18:12 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: Linus Torvalds, linux-kernel, x86
The pull request you sent on Sat, 6 May 2023 21:11:13 +0200 (CEST):
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core-debugobjects-2023-05-06
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/17784de648be93b4eef0ef8fe28a16ff04feecc7
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-07 18:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-06 19:11 [GIT pull] core/debugobjects for v6.4-rc1 Thomas Gleixner
2023-05-07 18:12 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®