From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 10F902874E1 for ; Mon, 17 Nov 2025 07:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763364666; cv=none; b=GYrjrt98pCFYNj2TBhpu76wkebq5s82pC0C5mgi+vEO88T0nduHqG9wZQSgNwcCdSRw5a/587iocpjdX30UZ/HOfWBMcNP5uxAE9bW2jjVNaS/wiuyI38glt2qk2S1x9bg6V2mMbQf/ewjCHjENAtScVZI2myYuNZ553JeHa8Ec= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763364666; c=relaxed/simple; bh=j8+eOjJKNxJBSO8ROPYG0FDNW5x/b876/UOrBvw1eCU=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=FnW5oGConxKiwMM0kqI3xxVuJGzyWYPlJsj0fr2HVeRSxZYoMpWzDw4x/5HBSIEVZk62xhZqyo+by9/HO23ETDrLu2+GjfArbNW9iGWquEVXZv46Q4g+0OgH01TPjcpAreWruB9fLGpDZ2G7g1SRopvUPju2FlVGerRl/PKZCW8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jJcmA9io; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3ypuK/NM; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jJcmA9io"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3ypuK/NM" From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1763364661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pOxCtAQjRbdNTYKkHsCss4jKumO1aGd5NVNsqhgrKug=; b=jJcmA9ioOmlUjYVACrQz2zg1kcETzWt118z9L0CITmaIbc+m8wrWYBiw8Wby1yXuY98Rg3 p7rwtNQ0+X6Avrr8RImTMGuxG/ZtAHHTVJKKwd/PGISHW5t5HeTkX/h5ImvSune2OUhfcC BOykPcMa3gEiC53Wa3WAiMEbo43QpLVYvVJzNBDXyXX77j33PnO+vkbaKNmFSNLC+Tmd2Z tATc6/nP0ZUKkG1VptVu601kVks2HAS3vdgD/SzA+7G2jvBa6Sc7PQ52n4EtjwLCAFLrsY UusEaPLrqGFF6Oxo+IcgrNJRd14vovEAMM66w1c8ImwakGSw4NMpKtSZkIAEXQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1763364661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pOxCtAQjRbdNTYKkHsCss4jKumO1aGd5NVNsqhgrKug=; b=3ypuK/NMlOE19dN8dehx93UmlQNxFXuSJRm3BV0V2tnopJgLxwerY4Ig6fUdIjUJAMR6yq c2ImwzTD9yBnpsAQ== To: "enlin.mu" , anna-maria@linutronix.de, frederic@kernel.org, linux-kernel@vger.kernel.org, enlin.mu@unisoc.com Subject: Re: [PATCH V2] hrtimer: Check running timer state In-Reply-To: <68734d1a-b77e-495e-922a-7fce3a122789@linux.dev> References: <20251114114230.3802-1-enlin.mu@linux.dev> <87o6p4bgzn.ffs@tglx> <68734d1a-b77e-495e-922a-7fce3a122789@linux.dev> Date: Mon, 17 Nov 2025 08:31:00 +0100 Message-ID: <87bjl186a3.ffs@tglx> 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, Nov 17 2025 at 07:58, enlin mu wrote: > On 2025/11/15 02:34, Thomas Gleixner wrote: > The serial_timer on cpu6 has not been properly cancelled. > The serial_timer is once again entered into the active queue on cpu7. > --------------------------- > on cpu7 > > step 1: preempted by hrtimer_usb > > static void __run_hrtimer(.....) > { > ...... > base->running = timer; //timer is serial_timer; > > ..... > ..... > restart = fn(timer); // fn is serial_timer_handler > .... ==> irq is enable. serial_timer is preempted by hrtimer_usb I told you before that enabling interrupts in the callback is wrong. That's what needs to be fixed. Run your experimental code with lockdep enabled. That will tell you what's wrong. Thanks, tglx