Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2296405iof; Wed, 8 Jun 2022 01:45:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVznOma9o7s8tC/cIDsfrTLZezRIMHHVXprX2QmgFn9NvLpYwgR8pVUkeIBBDdpaJaIfy6 X-Received: by 2002:aa7:9475:0:b0:51b:e0c5:401a with SMTP id t21-20020aa79475000000b0051be0c5401amr26815276pfq.39.1654677900094; Wed, 08 Jun 2022 01:45:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654677900; cv=none; d=google.com; s=arc-20160816; b=rX8qkHCBT2GucYGFkId7gN1Nphfz9gYKMyudZQDENxKRBzYf7XyAOp+3+wazoR7o72 wkqv3aOErQyln9qBM/rvcoOa9QbHOxVb0tvDtKHBgqk4ZbaWwiH79jbH8eLBWxCa+U2+ SGtxZdr/xGjvlhedsj5wbdj9PWC40cgkUcXsxg1ayIZqFUMUAkI8tlEAIcupHxLsFnOL bIuHDfsIOt9OU5ZAqn0EZLV2wJhNWXDmoPCt6p/SykGVPOZnsl1mQ2C9UA21MrwOCwe+ /vi4paTnKyAlhCwBHVhYf2iwUgZ3GejcHcwr/yYNfSYHCCfIkinOL073zuGXjMbcrK0f ohrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9dT1YbLiitv03+PdOtWagge0EdcnKxpI77SoGaYuRcY=; b=NijXzhQlr0JsMVb8QAKKGDqY2mC51otC88nxmuXJkn/VT6Fld5B7ZV7u4opbf1HwDY nnxx1vH7MyD62o/CutRvgtuiujA68vFNvl5azDXuFloQOtUGOURRHqO/G4I4Zs68Qj8B /HK4MFHywrcXOoviKHCRmj4n72merQBGycOsvk5EiOiTuToRA+4ZFxOnEj6jsWLyR6nu BBHD1lSLteMEAYMCRYZtJrvMdyvLOap1fB+DLl1TRNyiIQw904CZbLfXTSBBeetHQ07d Pd93qjmo4xQgBa9Ybf/GnJtV0xN01aEkezfbuXGg+ZLCvo+/s9T743z2DvLo/5SUWcSh 2F5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SP8iQOXw; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u11-20020a056a00124b00b0050df0383302si8666586pfi.255.2022.06.08.01.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:45:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SP8iQOXw; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AB3A6258DFD; Wed, 8 Jun 2022 01:09:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233234AbiFHIGa (ORCPT + 99 others); Wed, 8 Jun 2022 04:06:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbiFHIFo (ORCPT ); Wed, 8 Jun 2022 04:05:44 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF86623B15C for ; Wed, 8 Jun 2022 00:36:11 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id y187so18161730pgd.3 for ; Wed, 08 Jun 2022 00:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9dT1YbLiitv03+PdOtWagge0EdcnKxpI77SoGaYuRcY=; b=SP8iQOXw3TyCNNE3e5y15XHPh4wkAzTM4T6CFjlFHuZOTsIwlqatl/sMUjuDNpMCZt V3GQpJrRiJpZ546fXVFaonmkMIYX64ZZAaT9a2qJ5+BUEd7IVk+bh3K58dxvoSBHn92q k3oIfugG7ZX3poTCMLMZFoDidkgYglLZZJBVg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9dT1YbLiitv03+PdOtWagge0EdcnKxpI77SoGaYuRcY=; b=g9MJeIJaLuUjnGpGaDEquHGV78kG0/87MXJ6PCtFB8kKG7y7VW3rh2QQg343VC3Ot1 kF3/dJ3Y5gXNrsOom3rwuUgtixQIB4YzWkqMPvQ48d2Rsq7nVcPMgkeWGAeya9JqZp0w L4mILoSXVtpFnMGTWLG/rnkvyJba3NudExGEqtKzkhtTET9ZhWTt5+0VP9TmN0TRIzqV PGBVUUVoB9Vtiv7VEECA1Nkd3ATy03P1Szj4VBb4Qawf3+QOYcDrcNa3h0aNgfTGvzFX TOcnqf3QvGEtkxznswuRq8IL3oFWJHA4qaAPmJ1yD86HfOHfOayy/PQaNw4Pq+ZvAl2O ACew== X-Gm-Message-State: AOAM530iy1FO8QFCMmI1szIq6mWv35ZUmYhWvoyQ/yCprUMgQiFk+ppq QWCRoCzGBM5Lubhlc+lnQ2OVeFvWOxbiDg== X-Received: by 2002:a63:65c7:0:b0:3fc:85b5:30c0 with SMTP id z190-20020a6365c7000000b003fc85b530c0mr29388641pgb.165.1654673770813; Wed, 08 Jun 2022 00:36:10 -0700 (PDT) Received: from google.com ([2401:fa00:8f:203:463d:a192:6128:66e]) by smtp.gmail.com with ESMTPSA id d4-20020a170903230400b00167729dfe0bsm6439373plh.168.2022.06.08.00.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 00:36:10 -0700 (PDT) Date: Wed, 8 Jun 2022 16:36:05 +0900 From: Sergey Senozhatsky To: Naresh Kamboju , Minchan Kim Cc: open list , linux-fsdevel@vger.kernel.org, Linux ARM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-block , regressions@lists.linux.dev, Jens Axboe , Nitin Gupta , Sergey Senozhatsky Subject: Re: qemu-arm: zram: mkfs.ext4 : Unable to handle kernel NULL pointer dereference at virtual address 00000140 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 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. --- 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