From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-163.sinamail.sina.com.cn (mail3-163.sinamail.sina.com.cn [202.108.3.163]) (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 D45762BB17 for ; Fri, 22 May 2026 07:22:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.108.3.163 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779434529; cv=none; b=hqHHHS09Rc3YfPFZnPaQNlsQrzbU6n9KmXyj42g/m4F5eTOUdFefGVyuzi0IdVcIqEKal0ZrEUvTB1U8oL+YWSsRGPlv/WcfCiHQjwZSYhgCvtSe/UODnhB9wZ6C5QXHa/n5XpWAU46Mp+IW5DacyEPTkTOgChf2PwLHqOQEwKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779434529; c=relaxed/simple; bh=ifDGBFABrqgJ5tv4Gpht1jfnJuGN3lDVgmj8eYXlD/M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KWrJlnzOmlF3kFEFTAdg2IzTbsbDG0uJBUw8V9cE0P30o69hS6FaXvbyt+CM3bVAKFBFj/d/PfquZICAObNSwfK932Fj3TraskzmJrxB19N8Z6uEKbrvR3C5clpOckIEhK7zK9TKYPfkTIo2uu6AHdTi2nkazRbFEK9YEAY4hgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b=Wirs99GQ; arc=none smtp.client-ip=202.108.3.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=sina.com header.i=@sina.com header.b="Wirs99GQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sina.com; s=201208; t=1779434525; bh=CqJhosHL3QuV8yTfbm714TjlLFKM8FJPFMarQlpArUU=; h=From:Subject:Date:Message-ID; b=Wirs99GQ2kmwNsydT+o+mW7InMVk7OH/aXXb2J10r8+r+1YJbpoLZ+mZ6ipiZJA2D wx748pnxQZ5m9sWC/ef17quTIiLXH8+2NPrmWYoprcnPxktyeqsqdiJ8S3bmODkDVk IDBBO0FvxpSHulTVT81scygVnxxIGISUX4urFkDE= X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([114.249.62.144]) by sina.com (10.54.253.34) with ESMTP id 6A10041100003D1E; Fri, 22 May 2026 15:21:54 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 7199236291973 X-SMAIL-UIID: 7AC66D6DBC8B4ED2BFFC2B5332317570-20260522-152154-1 From: Hillf Danton To: Sebastian Andrzej Siewior Cc: syzbot , dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, Tetsuo Handa , linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [input?] possible deadlock in tasklet_action_common (2) Date: Fri, 22 May 2026 15:21:43 +0800 Message-ID: <20260522072144.934-1-hdanton@sina.com> In-Reply-To: <20260522063938.ewKum8vW@linutronix.de> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Fri, 22 May 2026 08:39:38 +0200 Sebastian Andrzej Siewior wrote: > On 2026-05-22 06:35:14 [+0800], Hillf Danton wrote: > > input_inject_event() is invoked in the brightness_set callback [1] for > > example. > > > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/input/input-leds.c#n142 > > > > > Now, input_inject_event() does spin_lock_irqsave() and alloc_skb() does > > > local_bh_disable()/ local_bh_enable(). On !RT this is not legal. On RT > > > > Can you please specify why that is illegal on !RT? > > So if you do > spin_lock_irq(); > local_bh_disable(); > > then the > local_bh_enable(); > > has lockdep_assert_irqs_enabled() which will yell. Then there is also Ah got it, thanks. > this local_irq_enable() which will enable interrupts before the unlock > which bad, again. Also, should softirqs been raised within this section, > the this enable will invoke the required callback which again, enable > interrupts. > > > > it is okay but then local_bh_enable() here should not invoke any > > > softirqs because none were raised within the section (alloc_skb()). > > > > On RT spinlock is replaced with mutex, and softirq can be raised in the > > irq that could come any moment after spin_lock_irqsave(). > > That is true on the other hand. That means having raised another tasklet > could lead to the backtrace. But it would have been two different locks, > not blocking on each other. > The last question, by two different locks, do you mean that the tasklet_sync_callback.cb_lock is per cpu?