From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 187553E7BC3 for ; Tue, 30 Jun 2026 09:50:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782813047; cv=none; b=Gj4CSy8SJ7BHdU1DbG3jtMxyZwb3MLHuNlZjOvpkh2wsjXA1JTzBsRdIfigBZ+VXT9FvXW2qyj4MQYD+bCb70j153a50NT86e635VNRvVwSfAnFAZxGJThqZzP+jGN00IOo+OMfTncl+Xoy7IpwfDf7RbayCYzYSOMjU114fdYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782813047; c=relaxed/simple; bh=t0QkLOIVpwEYiF1eA5KUFSMjiNc2vJvuLliJw96l6jY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t6A5LmTuFsuhJIvbQde+n0vlQYEIyAsr5JLDhsceNCuzOSElWn9E+yV5JMVxyf0OpnhEsENKRf9q/L8Gqxpofhfb+Wycp175hj6UQa9yEJuNe1lj/DNNTDqrkBAZEm4aWn1TpRBusyFIIYMJCyHyYxwAPNoVFfhra1f2vMkxWe0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=eE/X9Vw7; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="eE/X9Vw7" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=9ri4Y3v818Mo0Duxyq+Bnn9+/uCBR4qtMuHqhC7dOMg=; b=eE/X9Vw70SqZH6uzIXKHtq8rSu Mq4bXrle+P/IW9X1WBFGamA0A6X+oGkj7lUUPJUegPRdNBuCAfBtXfyOFde29xUYO0Z7Y68khEqsA dtzKIPQic5ltSBojeX4WTqHKOlQ2DYN3HoCqtxXnqc1qgSoh7L8UrKZKClRXXNxR5AwgEicKjtxXI 6JvpmOpDjpHFvdR1+YF9NsEC2s+W280+lAzWC0VqFnYTyvWEnvotEuqbcmIocYq1TiPpPR+dDJSxT A0SV+RetAlbC31LZzMlvPEcOHhS8FoDN9gqe3hDB93xs/JNGNM/QAj6VTDsy2qV4ML2wN+zv3LMrj JNaWSx5Q==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1weV74-00000004kC7-0TfJ; Tue, 30 Jun 2026 09:50:42 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id B2D5C30020B; Tue, 30 Jun 2026 11:50:41 +0200 (CEST) Date: Tue, 30 Jun 2026 11:50:41 +0200 From: Peter Zijlstra To: Deepanshu Kartikey Cc: mingo@redhat.com, will@kernel.org, boqun@kernel.org, longman@redhat.com, linux-kernel@vger.kernel.org, syzbot+0635dc2e2c3c21a6aa04@syzkaller.appspotmail.com Subject: Re: [PATCH v2] locking/lockdep: skip irq save/restore in hardirq context in lock_release() Message-ID: <20260630095041.GB751831@noisy.programming.kicks-ass.net> References: <20260629233650.90279-1-kartikey406@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260629233650.90279-1-kartikey406@gmail.com> On Tue, Jun 30, 2026 at 05:06:50AM +0530, Deepanshu Kartikey wrote: > lock_release() performs a raw_local_irq_save/restore dance around its > validation work. While safe in process and softirq context, this is > dangerous in hardirq context where IRQs must remain disabled for the > entire duration of the handler. > > When lock_release() calls raw_local_irq_restore() inside a hardirq > handler, it briefly re-enables IRQs, It does not.