Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2795865rdg; Mon, 16 Oct 2023 15:35:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdEvS7j+5u1CY3bKLdm9eMO0QqpzLZ+x/pl4KKCRbe4A1jLpss5ekkueKcFPksA42nNB4E X-Received: by 2002:a17:903:244b:b0:1ca:495c:77d with SMTP id l11-20020a170903244b00b001ca495c077dmr690600pls.18.1697495702319; Mon, 16 Oct 2023 15:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697495702; cv=none; d=google.com; s=arc-20160816; b=SQVwIS9V8gMuZAFZ/C/c2vqHcPMYQ7okWqW35hfhdyPYUd3DX+bTAXagBmfNMk2EFC GtMT7Px+NXi/iQvGS4Kau6g7EyyQBzBSlpxjLpcTJrBDZnzB6zAbTO90aUZRpLBYI8lQ 23H6Vmmx3t+saX8ziT+com0+qaYgXd/TxnQ95u79Sk8sFKPawdVCD3MsHR4/xY2jgm8+ 2RcEQEuQTuDyFIQi1gYxUVf7TeDKbteWRpKsU92EDyh1UcB5TWFm93hdpcXAWHeGy076 6L0CmG7SAoupoZggkQqMScymabAzX9vU07M2YPv8GAtvGpv9g8NuKhPew+J5Nl5ULzyO StVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ZX7U2O6L7oSVmZ23sbEjhTzmwIwmr9lOtdI3NlTKFS4=; fh=DJpTywOSPhldKErVKroXOA4JmNUBx9E865Fhaxazhe8=; b=stcklzfVhExbQPHnuBUaI1RUQZtqXRWlW8yArkW3oIdZyjjkELi2zfDdzBlcBqlgop wjjJo60fwv5RkdprOUalg1j1PF530Ffigiy4FZ+c5tIN6mtUF9UJcntpchGvohn7INzl CaJv7gKwD2V3C2xsc5/qj1hOG3yIB/CGIQBaNsL0yo1ONxr14pzRFuXlBX5X4WfhPdZC oK3IEHgRaeruAgcWlnvmalG3rhuqf95Yb1OgEWukrmngYMpacP/qPjZY97CgypcukFVJ m9uXGPmfgEMeSkNdcLu3hzaymBzvVCYj6uDNIes3qXiktwnOF/Ks7vvS5eixMINy6xKZ zU3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=xyXnGZd4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id c12-20020a170903234c00b001ca33ce21fesi349697plh.58.2023.10.16.15.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 15:35:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=xyXnGZd4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 1D3ED80203CC; Mon, 16 Oct 2023 15:35:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233664AbjJPWez (ORCPT + 99 others); Mon, 16 Oct 2023 18:34:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbjJPWey (ORCPT ); Mon, 16 Oct 2023 18:34:54 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1507EA1 for ; Mon, 16 Oct 2023 15:34:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54BC3C433C7; Mon, 16 Oct 2023 22:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1697495692; bh=FZ9FRkz2iD/S2s21JwYAKU+5RDYOBoUlW8pmKTtVfBo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=xyXnGZd4VcZnn6u+N+V0mFtKNz3+M9q4gWHqqW76DgX/RfQ1UT1s49a3cKyEip/Zp 4KYRRS9gUrhhWi+os8H2Z6J0JyEfIpgljxyHRfepVyXsoL+qUJGFC1GPwit3V5Uqc4 cRZCStbG9cmgfBaDnVTnFLGQqYimrZS04FdJGxQQ= Date: Mon, 16 Oct 2023 15:34:51 -0700 From: Andrew Morton To: Charan Teja Kalla Cc: David Hildenbrand , , , , , , , Subject: Re: [PATCH] mm/sparsemem: fix race in accessing memory_section->usage Message-Id: <20231016153451.09f3677496bd6cc8b1f95daa@linux-foundation.org> In-Reply-To: <994410bb-89aa-d987-1f50-f514903c55aa@quicinc.com> References: <1697202267-23600-1-git-send-email-quic_charante@quicinc.com> <20231014152532.5f3dca7838c2567a1a9ca9c6@linux-foundation.org> <994410bb-89aa-d987-1f50-f514903c55aa@quicinc.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 15:35:00 -0700 (PDT) On Mon, 16 Oct 2023 19:08:00 +0530 Charan Teja Kalla wrote: > > From the description, it's not quite clear to me if this was actually > > hit -- usually people include the dmesg bug/crash info. > > On Snapdragon SoC, with the mentioned memory configuration of PFN's as > [ZONE_NORMAL ZONE_DEVICE ZONE_NORMAL], we are able to see bunch of > issues daily while testing on a device farm. > > I note that from next time on wards will send the demsg bug/crash info > for these type of issues. For this particular issue below is the log. > Though the below log is not directly pointing to the > pfn_section_valid(){ ms->usage;}, when we loaded this dump on T32 > lauterbach tool, it is pointing. > > [ 540.578056] Unable to handle kernel NULL pointer dereference at > virtual address 0000000000000000 > [ 540.578068] Mem abort info: > [ 540.578070] ESR = 0x0000000096000005 > [ 540.578073] EC = 0x25: DABT (current EL), IL = 32 bits > [ 540.578077] SET = 0, FnV = 0 > [ 540.578080] EA = 0, S1PTW = 0 > [ 540.578082] FSC = 0x05: level 1 translation fault > [ 540.578085] Data abort info: > [ 540.578086] ISV = 0, ISS = 0x00000005 > [ 540.578088] CM = 0, WnR = 0 > [ 540.579431] pstate: 82400005 (Nzcv daif +PAN -UAO +TCO -DIT -SSBS > BTYPE=--) > [ 540.579436] pc : __pageblock_pfn_to_page+0x6c/0x14c > [ 540.579454] lr : compact_zone+0x994/0x1058 > [ 540.579460] sp : ffffffc03579b510 > [ 540.579463] x29: ffffffc03579b510 x28: 0000000000235800 x27: > 000000000000000c > [ 540.579470] x26: 0000000000235c00 x25: 0000000000000068 x24: > ffffffc03579b640 > [ 540.579477] x23: 0000000000000001 x22: ffffffc03579b660 x21: > 0000000000000000 > [ 540.579483] x20: 0000000000235bff x19: ffffffdebf7e3940 x18: > ffffffdebf66d140 > [ 540.579489] x17: 00000000739ba063 x16: 00000000739ba063 x15: > 00000000009f4bff > [ 540.579495] x14: 0000008000000000 x13: 0000000000000000 x12: > 0000000000000001 > [ 540.579501] x11: 0000000000000000 x10: 0000000000000000 x9 : > ffffff897d2cd440 > [ 540.579507] x8 : 0000000000000000 x7 : 0000000000000000 x6 : > ffffffc03579b5b4 > [ 540.579512] x5 : 0000000000027f25 x4 : ffffffc03579b5b8 x3 : > 0000000000000001 > [ 540.579518] x2 : ffffffdebf7e3940 x1 : 0000000000235c00 x0 : > 0000000000235800 > [ 540.579524] Call trace: > [ 540.579527] __pageblock_pfn_to_page+0x6c/0x14c > [ 540.579533] compact_zone+0x994/0x1058 > [ 540.579536] try_to_compact_pages+0x128/0x378 > [ 540.579540] __alloc_pages_direct_compact+0x80/0x2b0 > [ 540.579544] __alloc_pages_slowpath+0x5c0/0xe10 > [ 540.579547] __alloc_pages+0x250/0x2d0 > [ 540.579550] __iommu_dma_alloc_noncontiguous+0x13c/0x3fc > [ 540.579561] iommu_dma_alloc+0xa0/0x320 > [ 540.579565] dma_alloc_attrs+0xd4/0x108 Thanks. I added the above info to the changelog, added a cc:stable and I added a note-to-myself that a new version of the fix may be forthcoming.