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 222D4C433FE for ; Fri, 7 Jan 2022 10:54:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237918AbiAGKyD (ORCPT ); Fri, 7 Jan 2022 05:54:03 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:40060 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237836AbiAGKyC (ORCPT ); Fri, 7 Jan 2022 05:54:02 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 24C18B82564 for ; Fri, 7 Jan 2022 10:54:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1FC0C36AE9; Fri, 7 Jan 2022 10:53:57 +0000 (UTC) Date: Fri, 7 Jan 2022 10:53:54 +0000 From: Catalin Marinas To: Jianyong Wu Cc: "will@kernel.org" , Anshuman Khandual , "akpm@linux-foundation.org" , "david@redhat.com" , "quic_qiancai@quicinc.com" , "ardb@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "gshan@redhat.com" , Justin He , nd Subject: Re: [PATCH v3] arm64/mm: avoid fixmap race condition when create pud mapping Message-ID: References: <20211216082812.165387-1-jianyong.wu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 07, 2022 at 09:10:57AM +0000, Jianyong Wu wrote: > I roughly find the root cause. > alloc_init_pud will be called at the very beginning of kernel boot in > create_mapping_noalloc where no memory allocator is initialized. But > lockdep check may need allocate memory. So, kernel take exception > when acquire lock.(I have not found the exact code that cause this > issue) that's say we may not be able to use a lock so early. I couldn't find an slab or page allocation place either. It would be nice to get to the root cause rather than just avoiding the mutex on the early boot path. -- Catalin