From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46635C4332F for ; Thu, 15 Dec 2022 15:21:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230248AbiLOPVj (ORCPT ); Thu, 15 Dec 2022 10:21:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbiLOPVK (ORCPT ); Thu, 15 Dec 2022 10:21:10 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68A4122524; Thu, 15 Dec 2022 07:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=veWqpQXIk6sP3oOKoPG/TZGs2w9yCqcBMZk/w842K00=; b=QbNQuPdyKRFdDd4vHkfoRgJo9/ 2FiN/5ro9QZsnj+FWx2oWEjf16PdPmyp1LW6MWVgAgLAw6gBUblFg4GhIKRxt1Weox1/gxj2p1gki wKqqQPElTKHIZ1aq4ZCnk+si4ytzhH4gwNNFBgK+0Q+4aMuU+kYKs4yKemH9M8O1Ya4itX9+2STsp S1zH6aUWo1+8Xzz2acQaLnEsbmEqsee/iALnBwhqMNrPl5CFKPgFhEs8hMXcm1QAIQP5RHDJE7Pp5 udVGt+AKOy+X8UUJaT8qVx93oUI9npbGrwRmeLIH8rv+uH0zAValHAGU+vqV3aO8xFcIKTHsvWYk1 5BoWsuCg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1p5q1X-00C3Q0-1K; Thu, 15 Dec 2022 15:19:51 +0000 Date: Thu, 15 Dec 2022 15:19:51 +0000 From: Al Viro To: Damien Le Moal Cc: Wei Chen , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, syzbot , linux-fsdevel , Chuck Lever , Jeff Layton Subject: Re: possible deadlock in __ata_sff_interrupt Message-ID: References: <5eff70b8-04fc-ee87-973a-2099a65f6e29@opensource.wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5eff70b8-04fc-ee87-973a-2099a65f6e29@opensource.wdc.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org On Thu, Dec 15, 2022 at 06:48:20PM +0900, Damien Le Moal wrote: > The problem is here: sg_rq_end_io() calling kill_fasync(). But at a quick > glance, this is not the only driver calling kill_fasync() with a spinlock > held with irq disabled... So there may be a fundamental problem with > kill_fasync() function if drivers are allowed to do that, or the reverse, > all drivers calling that function with a lock held with irq disabled need > to be fixed. > > Al, Chuck, Jeff, > > Any thought ? What is the problem with read_lock_irqsave() called with irqs disabled? read_lock_irq() would have been a bug in such conditions, of course, but that's not what we use...