arm64: dts: mediatek: mt8183-evb: Fix unit_address_vs_reg warning on ntc
[platform/kernel/linux-starfive.git] / lib / debugobjects.c
index 984985c..a517256 100644 (file)
@@ -498,6 +498,15 @@ static void debug_print_object(struct debug_obj *obj, char *msg)
        const struct debug_obj_descr *descr = obj->descr;
        static int limit;
 
+       /*
+        * Don't report if lookup_object_or_alloc() by the current thread
+        * failed because lookup_object_or_alloc()/debug_objects_oom() by a
+        * concurrent thread turned off debug_objects_enabled and cleared
+        * the hash buckets.
+        */
+       if (!debug_objects_enabled)
+               return;
+
        if (limit < 5 && descr != descr_test) {
                void *hint = descr->debug_hint ?
                        descr->debug_hint(obj->object) : NULL;