From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AFA940D56F for ; Sat, 20 Jun 2026 21:35:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781991320; cv=none; b=cl/GTNNWeDNMKoC7RZhZA2Bq7YerGus3h8wcies4W0ywImeOFE7wZh8hZPD7v7c/zkyriSUQtHui4AQFJzvw4VSh+QGjDiJ1nhH5jij9b8UxU9nLphqt2SCACjoEvt+KpPgW/SQny9WuRm5JaPhfi/TLPpHikZu7Asr2whiIY/I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781991320; c=relaxed/simple; bh=TdofZHNlm4T7NtZfOtbR9yVpcO8d0urMrMsXpqypybY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=LWnCCPyKp2LxpuGXBnsm93cGF4z4BCfYAE2MI55NeX7rwAEAj/5qjtcBcBvTknvMDvt12NdbYBMGRxYTVaIAQIRlXbkLGXmRLlAGc4f2gU+vViY9h/8Nk7XMbFcKXhxBsTuKyb4vhYOBlyyGdYHr6MFn/RAEKTNmY/u6ae7hI9Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l5oBm3SA; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l5oBm3SA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 028BA1F000E9; Sat, 20 Jun 2026 21:35:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781991318; bh=5Eg/5+uE1PuwpNSE8M5Moi61bFTzyN9eqwKNEyVjPcw=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=l5oBm3SA3ChHOLeaV8NG+Ptqb8kcLcVRQANFz9JU6yyP8EsLRbZWk1UGpbSHJIMUN g/5hjO7E9cSQAXegig8TlonOvdjvHX0H3kulYnpdCbFDd5Ly7PMQdYmvTD95sMIL01 maI7yqtsauaRzc+iqhTJWvC3oRXC6d9rSudp/+VzeX4TZ9VQ6uioplAA4fRpSygeY0 HNrfmORGEkmEN3g0U5YtpStQGXCKoMCc4VDM/yfUT7/04dsdgAgKl3vqDcfgZE1M81 2shqicg6BOs7JZpDbtYfJffRaY9uW+9A/16wVcmLMu/xL2f6lnKjD6vo0Ox0uUDuaW O4AqtHaydXWVA== From: Thomas Gleixner To: syzbot , anna-maria@linutronix.de, frederic@kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Cc: Surya Sai Madhu , Peter Zijlstra Subject: Re: [syzbot] [kernel?] WARNING in stub_timer (2) In-Reply-To: <6a2fac31.be3f099c.2836ae.0017.GAE@google.com> References: <6a2fac31.be3f099c.2836ae.0017.GAE@google.com> Date: Sat, 20 Jun 2026 23:35:15 +0200 Message-ID: <87y0g8nbe4.ffs@fw13> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Jun 15 2026 at 00:39, syzbot wrote: > WARNING: kernel/time/hrtimer.c:443 at stub_timer+0xa/0x20 kernel/time/timer.c:716, CPU#0: udevd/4706 So this puzzled me a bit as the stub_timer callback is only installed when the hrtimer object is not initialized according to the debug objects tracking. But that would cause a debug objects warning splat, which is not there. Then I discovered this in the console log a few seconds before the warning: ODEBUG: Out of memory. ODEBUG disabled So that made me dig into debug_object_assert_init() and I discovered the following issue: debug_assert_init() if (!enabled) return; obj = alloc(); if (!obj) enabled = false; free_objects(); obj = lookup_or_alloc(); // Lookup failed because the other side // removed the objects, but it returns // an error code as the object in question // is not statically initialized if (!IS_ERR_OR_NULL(obj)) return; if (!obj) { debug_oom(); return; } print(...) if (!enabled) return; fixup(...) So invoking the fixup callback in that case without checking again whether debug_objects is still enabled causes the above problem. Fix below. Thanks, tglx --- diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 6fb00e08a4e2..d7a02a943ac9 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -894,6 +894,14 @@ int debug_object_activate(void *addr, const struct debug_obj_descr *descr) } raw_spin_unlock_irqrestore(&db->lock, flags); + + /* + * lookup_object_or_alloc() might have raced with a concurrent + * allocation failure which disabled debug objects. + */ + if (!debug_objects_enabled) + return 0; + debug_print_object(&o, "activate"); switch (o.state) { @@ -1071,6 +1079,15 @@ void debug_object_assert_init(void *addr, const struct debug_obj_descr *descr) return; } + /* + * lookup_object_or_alloc() might have raced with a concurrent + * allocation failure which disabled debug objects. Don't run the fixup + * as it might turn a valid object useless. See for example + * hrtimer_fixup_assert_init(). + */ + if (!debug_objects_enabled) + return; + /* Object is neither tracked nor static. It's not initialized. */ debug_print_object(&o, "assert_init"); debug_object_fixup(descr->fixup_assert_init, addr, ODEBUG_STATE_NOTAVAILABLE);