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 7D013C77B75 for ; Wed, 17 May 2023 06:31:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232486AbjEQGbA (ORCPT ); Wed, 17 May 2023 02:31:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232496AbjEQGbA (ORCPT ); Wed, 17 May 2023 02:31:00 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E74435A0; Tue, 16 May 2023 23:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=lHYduRAGXCkDUrS8b4Gx5zxhlIgk1+vCGXqqxRlJ+eA=; b=XfGkZqYR9+Q+PUUQxBnxaKZfBQ wLIDVA84yn737aw7Dc93fZzAfT2HRb7k6gxeXJHlj73m6oMreWWh+dGd0ZpoAI+dP/DxcpvFTynRX ZuInH2ELv2cUK/JYU5gTgshp4n6SToNn3y+cAluXnl9ef8oddhikSoy99RcE+0B4bQqv+exTUeJJT Qk5dsPTyfh5hnxes6whp8YustSHdySbuoHhxBWqWZqIFN7R7AP0/3gTf67zk77eItoQdJAsvtDOat m4LPom31pYeicRdHLNVclWMmNcmf3vSrg61hNpMFdbf0+lzMkxcVuxNySZaR2H/E988yDbgb3IJtl OMOXdcWg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pzAgS-008TRG-0s; Wed, 17 May 2023 06:30:48 +0000 Date: Tue, 16 May 2023 23:30:48 -0700 From: Christoph Hellwig To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de, christophe.leroy@csgroup.eu, hch@infradead.org, agordeev@linux.ibm.com, wangkefeng.wang@huawei.com, schnelle@linux.ibm.com, David.Laight@aculab.com, shorne@gmail.com, willy@infradead.org, deller@gmx.de Subject: Re: [PATCH v5 RESEND 06/17] mm/ioremap: add slab availability checking in ioremap_prot Message-ID: References: <20230515090848.833045-1-bhe@redhat.com> <20230515090848.833045-7-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230515090848.833045-7-bhe@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Mon, May 15, 2023 at 05:08:37PM +0800, Baoquan He wrote: > Several architectures has done checking if slab if available in > ioremap_prot(). In fact it should be done in generic ioremap_prot() > since on any architecutre, slab allocator must be available before > get_vm_area_caller() and vunmap() are used. > > Add the checking into generic_ioremap_prot(). Should we add a WARN_ON/WARN_ON_ONCE to aid debugging? Otherwise looks good: Reviewed-by: Christoph Hellwig