Skip to content

Commit cef2dd7

Browse files
committed
Merge tag 'core-debugobjects-2023-06-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull debugobjects update from Thomas Gleixner: "A single update for debug objects: - Recheck whether debug objects is enabled before reporting a problem to avoid spamming the logs with messages which are caused by a concurrent OOM" * tag 'core-debugobjects-2023-06-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Recheck debug_objects_enabled before reporting
2 parents a0433f8 + 8b64d42 commit cef2dd7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/debugobjects.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,15 @@ static void debug_print_object(struct debug_obj *obj, char *msg)
498498
const struct debug_obj_descr *descr = obj->descr;
499499
static int limit;
500500

501+
/*
502+
* Don't report if lookup_object_or_alloc() by the current thread
503+
* failed because lookup_object_or_alloc()/debug_objects_oom() by a
504+
* concurrent thread turned off debug_objects_enabled and cleared
505+
* the hash buckets.
506+
*/
507+
if (!debug_objects_enabled)
508+
return;
509+
501510
if (limit < 5 && descr != descr_test) {
502511
void *hint = descr->debug_hint ?
503512
descr->debug_hint(obj->object) : NULL;

0 commit comments

Comments
 (0)