Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18390rwd; Wed, 24 May 2023 13:26:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ni4LzXxqnY1zEaPXEhLLiHE09j85nD2n/+4g8Mh/pjV0wzmOgCaOskuuyFxw7mf0tlCPd X-Received: by 2002:a05:6a20:2587:b0:fa:1f3a:8f56 with SMTP id k7-20020a056a20258700b000fa1f3a8f56mr590043pzd.12.1684959988538; Wed, 24 May 2023 13:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684959988; cv=none; d=google.com; s=arc-20160816; b=Qw3B2l6+P5RSZUSh1WiR2KSwUhhcpOOdqRtRtJT1rtZElvlwMxuQ+WYW0XAychqdj4 KwLjGRh6OqykycGEhx2kXFMvz+He7m9eXqZ0/RzG4MrotluadX+0pNstLBWCVf/EUlr5 fMXZHZ0dms9qesSyu34gIUgCa2yZrzoZj1IyysdQptPIP8WupCnoyOYGyYyL39VOvGio 648q2AOhgdscABsrODi4a6yivHgdKNDkRWdN1BD+j4Cvc0j8FdoIA2kF9oyXOv/ld4by KPfqnEX995jm6bLy62YpVJPoSwt8M2gOHlMPkthXyMhUOeoRMB//GgrhHGEXd1BzPJaC Swug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=Z685X3s6lr/pGMeM6m/E6EEB6rBEVa5HnxnBbFtkgqs=; b=nRmY4acXI4ZQDf69LAskI7QA4cEvpSNFsspAXPLTzZCvCZiI8wafut3NPkZPjRw+TJ EEkinVpprmT77vVE9J1jFFHhPdH1HQ+/QP0hKGjoxHaGODJFTNghhZ916BU3oNqSU9kT UZn+nk+m8GCwHVAHzcNoSLzg6n8cGc/484IMVvNP6+5wZ+A0roApnM5vN085tOkHOcsf 4+nkBYEpK8KHawi6dVq+Iv11sR3aoCPgvGpBFtlpG8EfGLFGDnGpK6Db6iXGg62uEGnR xRGzyHsqd0Jdx0+ULJP9ON2XdfK4/wGs+eI7nQZatRoFyzP7rm+fEvU1tzxdJ5EUtn/a kQmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=IrycefV5; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=o69JxLnt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z25-20020a63b919000000b0050b8a7635dfsi7368305pge.295.2023.05.24.13.26.16; Wed, 24 May 2023 13:26:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=IrycefV5; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=o69JxLnt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233092AbjEXUAr (ORCPT + 99 others); Wed, 24 May 2023 16:00:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbjEXUAp (ORCPT ); Wed, 24 May 2023 16:00:45 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69F5BBB; Wed, 24 May 2023 13:00:44 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 8EB125C0041; Wed, 24 May 2023 16:00:41 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 24 May 2023 16:00:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1684958441; x=1685044841; bh=Z6 85X3s6lr/pGMeM6m/E6EEB6rBEVa5HnxnBbFtkgqs=; b=IrycefV5/kRwKBVlkj gPLAV/1DOJiUWDDDMhExRNgNXq1KTFTzVl8p7o55kA3ZPKLAiqhzoA2yb4vNt+9n gf1xsLnwGGMLt3neuQhs5liAL4RviPL2G4ToHFfisDYR9EBwQX20dEXjBrbV+roL c9R+jbhIK/d/S1oT2fSR9O8PBNZ0kX/OunlmJeSA6/HayB3vZeUvechOorYlxZp4 kAl92/nbmP34SGM/8HqbvyekaUSpfL8AKSHHxtReqzamPTkKsUoJwPMohxDKTt1S rhpMiEVrOhDrYHsF4FvOjHCob8UkI9w3RvGq3zUsGBCG6NeCpPNR0hHI3crIiG55 k6Iw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1684958441; x=1685044841; bh=Z685X3s6lr/pG MeM6m/E6EEB6rBEVa5HnxnBbFtkgqs=; b=o69JxLntHustMK0x1nRHWVwxWc2ti 903LG96W/NtxmX3I23aCR2t7PCjnP1ob4vXnsVhbiAgcz0w4ArWdXlyPfj1EP9Gx iYmqiuMOhvYV/FduuMlyB65xxD78WrPgq9sTAsncaQ+bPsQIRCkzVQ8zFr5eG5fA fcx1CUYfmZvaNzvNDPGv7zznTd2KAcFzw0D6jrx2kIPMKFzlyZ9FasdkGkAYydaL fOq3PhwyQU75hv53Rmmf+8WEZAIfZUF86r8/mLXbBZoHh48vj6tHS5X6MQ9EKviE mrqsPNETGb6b6wzuRghK+ruoudSWmQIEIfP//zACa0BRoGUOxWsOgBcGA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejhedgudegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 73314B60086; Wed, 24 May 2023 16:00:40 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-441-ga3ab13cd6d-fm-20230517.001-ga3ab13cd Mime-Version: 1.0 Message-Id: <3e131821-7665-47f0-a8a6-44b3e4d7a88a@app.fastmail.com> In-Reply-To: <20230524152633.203927-2-deller@gmx.de> References: <20230524152633.203927-1-deller@gmx.de> <20230524152633.203927-2-deller@gmx.de> Date: Wed, 24 May 2023 22:00:14 +0200 From: "Arnd Bergmann" To: "Helge Deller" , "Russell King" , "Dinh Nguyen" , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/3] arm: Fix flush_dcache_page() for usage from irq context Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 24, 2023, at 17:26, Helge Deller wrote: > Since at least kernel 6.1, flush_dcache_page() is called with IRQs > disabled, e.g. from aio_complete(). > > But the current implementation for flush_dcache_page() on ARM > unintentionally re-enables IRQs, which may lead to deadlocks. > > Fix it by using xa_lock_irqsave() and xa_unlock_irqrestore() > for the flush_dcache_mmap_*lock() macros instead. > > Cc: Russell King (Oracle) > Cc: Arnd Bergmann > Cc: linux-arm-kernel@lists.infradead.org > Signed-off-by: Helge Deller Cc: stable@vger.kernel.org Reviewed-by: Arnd Bergmann From what I can tell, the behavior in aio_complete has been there for over 10 years, since 21b40200cfe96 ("aio: use flush_dcache_page()"). Others may have done the same already back then. I also see you sent patches for nios2 and parisc, but not for csky, which appears to need the same thing. Arnd