Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1217769iol; Sun, 12 Jun 2022 09:17:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFJ6ei0kQ/RXtDEvcLtI+U2YErghBB9m6JQzCUefO6qFZVVhgXuVPG/x85NnpbA0SCXTyL X-Received: by 2002:a17:90b:1b41:b0:1e8:4e69:e735 with SMTP id nv1-20020a17090b1b4100b001e84e69e735mr10933509pjb.9.1655050666919; Sun, 12 Jun 2022 09:17:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655050666; cv=none; d=google.com; s=arc-20160816; b=optVz1m4NNVrVcJM6ZNNP2b4gkRad0hlmfqO9NoXhSdao6gnOUSQMAVHcD+iq6eXxs 20lgZU23wA2MlKWyyEVq8BxTr8hxQX1arwWeu5hLlNFRDAyaeWgYLYyRhggOxBbz1ggR FzFjriNvvgdJ3xhDC3jowm2TJjLX9zfNFlUIg/YAK5gqy2QcKW6WuqFDjoI9Qns8+oLq 9UGMv1POh56AgxSmGj+gtSyFJR07EacMEPM7KSPoexsvzGcasaWgbI7I6r8WIiftI5Y5 MESMYnlPg9ZfZQkFTjd3YuhgGAFnCBChlvcs7xBdZRy82JJVDo8GlrfsJvFFj6fL0MeR OgQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=JKtz7aN4iqLwpjMxddmPWT/Yv9HKk9kmTNthHMCTmzI=; b=jZ7GT7J9klpQ8leFqzJJAyHCIPZjSQ3vMUIe/Ql6bo71rDCwqlp2QTQdV4NVyJ29dZ z2Yq4HATCoQCzFl25hDQrqGW4uCTm7fedcueanUNiFds12upKgnTcPLqZWHsCAviUKGo EvsD/A8SbQr33GXQiZAJ2Fdz8SBameElefFdqhWxUzycz1JbHvdRkrUV9qw5ghEeVbhg 3sABCFIc2CaJh7yWnfQ+LSXsGxgXPMeXAZeebGmqYA7kn/IZVmzhy+vI4Tk7C0165S0/ 7Fq2w8Tlyy0ceUrnbojXAppjSkAAJO77ESsUHpWvNNycZnKc+N6Z4cwiWOecNXAOyyFL g+aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T9YefAqc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q63-20020a632a42000000b003fd74779846si5902512pgq.826.2022.06.12.09.17.35; Sun, 12 Jun 2022 09:17:46 -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=@linaro.org header.s=google header.b=T9YefAqc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236528AbiFLP1L (ORCPT + 99 others); Sun, 12 Jun 2022 11:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235371AbiFLP1K (ORCPT ); Sun, 12 Jun 2022 11:27:10 -0400 Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B0085EDDF for ; Sun, 12 Jun 2022 08:27:09 -0700 (PDT) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-30c2f288f13so30054227b3.7 for ; Sun, 12 Jun 2022 08:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JKtz7aN4iqLwpjMxddmPWT/Yv9HKk9kmTNthHMCTmzI=; b=T9YefAqcwoWBIxZvqn+6v2XWWOet+BsnQU0+RFWVg6KgivzT/L5lObsCTPCQTt/t5Q O40qE1hi12jMrF4WTFqKtW2LzpBjaorQNa34aV4k3hv8HKQ8PdKPMEaSSxFMV47/mzpy 5NB8fyovqGp5apHZFDa58gx5ZaH+tLAMzs45xITz4fb4vlzo0gMUB+DN67+3WhqdQW2m K11090o1HY9Z5N/7OrH4HIp/tOUVaTeFZraEa0DnsQrfgrbOu3JKvaQW4n5bCyWXag2u d53mOuvNeMu27ZoK5W99SVTmAQTCjGIg6OdP3eCz5qEG76PT5nxBz7fhGrEZ0izsu26g oVZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JKtz7aN4iqLwpjMxddmPWT/Yv9HKk9kmTNthHMCTmzI=; b=S5kk8Vy/hbCmGs+JuVFX4JM6A/PtzLvT0qrBhKyHunQXGOVWfMOVKfegH2g3kCx1NN e53HssUIu2lo84KpLz0e9cQyJpkC/jTEShBKTwm0UjmbKYGF8NR+h6lswQLlzifD+qsH 5HPHxkc9FF547/doUKw+RR2j399SiFYQJ+iHtc6h4wd3AV1Pd+8EU6y6YIie43Rx6Bm1 WP2qypTYT5QHNxwuvd5JI4d+58QSRRDl7bvVlGP4YzOwjFFfVhAzrloHChxOAheoa9sB 55W4f3HqZtR0heDqUoaiXZtfMU6zCNPC/M+YfggNuspK1k2IDZxfSiQE62oR4n4Zok6E DEaA== X-Gm-Message-State: AOAM532CFbYrTvVuKYJvLFKoM9N94RYYDNv4gDMy8K/tp11GF6IT9EOm sO3NdQqIc3uYvX8O1vUJlp6ttJwkRf7jh4Nx5eYQzQ== X-Received: by 2002:a81:1a43:0:b0:30c:78b1:f23d with SMTP id a64-20020a811a43000000b0030c78b1f23dmr60215098ywa.166.1655047628056; Sun, 12 Jun 2022 08:27:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Naresh Kamboju Date: Sun, 12 Jun 2022 20:56:56 +0530 Message-ID: Subject: Re: qemu-arm: zram: mkfs.ext4 : Unable to handle kernel NULL pointer dereference at virtual address 00000140 To: Sergey Senozhatsky Cc: Minchan Kim , open list , linux-fsdevel@vger.kernel.org, Linux ARM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-block , regressions@lists.linux.dev, Jens Axboe , Nitin Gupta Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Sergey, On Wed, 8 Jun 2022 at 13:06, Sergey Senozhatsky wrote: > > On (22/06/08 11:45), Sergey Senozhatsky wrote: > > > > Something like this? > > May be even something like below. Move static initializer to cpu up > hook. Thanks for providing a fix patch. As per your suggestion debug lock enabled. CONFIG_DEBUG_LOCK_ALLOC=y I have tested this patch and the reported issue got resolved [1]. Reported-by: Linux Kernel Functional Testing Tested-by: Linux Kernel Functional Testing > --- > mm/zsmalloc.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > index 9152fbde33b5..6d3789d834e2 100644 > --- a/mm/zsmalloc.c > +++ b/mm/zsmalloc.c > @@ -453,9 +453,7 @@ MODULE_ALIAS("zpool-zsmalloc"); > #endif /* CONFIG_ZPOOL */ > > /* per-cpu VM mapping areas for zspage accesses that cross page boundaries */ > -static DEFINE_PER_CPU(struct mapping_area, zs_map_area) = { > - .lock = INIT_LOCAL_LOCK(lock), > -}; > +static DEFINE_PER_CPU(struct mapping_area, zs_map_area); > > static __maybe_unused int is_first_page(struct page *page) > { > @@ -1113,6 +1111,7 @@ static inline int __zs_cpu_up(struct mapping_area *area) > area->vm_buf = kmalloc(ZS_MAX_ALLOC_SIZE, GFP_KERNEL); > if (!area->vm_buf) > return -ENOMEM; > + local_lock_init(&area->lock); > return 0; > } > > > 2.36.1.255.ge46751e96f-goog Build artifacts link [2] -- Linaro LKFT https://lkft.linaro.org [1] https://lkft.validation.linaro.org/scheduler/job/5160519#L828 [2] https://builds.tuxbuild.com/2ATpwm83jTe2wlUX33YeTpshh2u/