Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2300114iof; Wed, 8 Jun 2022 01:52:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzixXenovBCLEV4sFjYTjIeH9BAtykm3bcjIkM/UQJEQzAnyVdqlXCHAhPTUjqxV8TR3paI X-Received: by 2002:a17:90b:388f:b0:1e8:5a44:8205 with SMTP id mu15-20020a17090b388f00b001e85a448205mr23264794pjb.221.1654678337906; Wed, 08 Jun 2022 01:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654678337; cv=none; d=google.com; s=arc-20160816; b=BUDNgJIFM9cvP5AbBpnJ4mVJM4a+ngND9TueskA42/TeUe87oW8PFiXF9gTiPUzTK7 BtFBeU8yDJb8sAfEVlhwv7B2s6SkXUMdxR9tlPyc0p41RqE57bpGmPpw9/5JvKSuGrir NS9GMTx/4a0xdQ8GleGDw2GKKiAxwblQ+2pUkYGcmHyesC7mLJWdRHM7PCuftcDVppQb FfNVSkS8UOvdnbKGTyZU93dkXwgHjpoAaSYm//v3iDjjK09G9+PrJ3xwRb746L0UTzXL +DEZ9OOTecPRIEABEdTPg1RG2SBsEpBqC81OPX/WaHGx+w2LhPyKF2KjK8Qc/xhD47nG X+/g== 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=Hk2gCK5GcL5SvSh8UzW9g4jUcY4kzzvd/IMquDVjiO4=; b=pCy58xmRo76I1CDa9WK/IjAbXtwt3DWuHBmhdm67Dy6Egv7yHjhaJfzuEv7zxDMci3 77oD6eUyNpb1RoUHCJp5i9AWKxgnHRtKWIjtlA5Oqh/bIAKjuV+7Deh2ETWGRhEI7aNe yt8bMCOwNjOfeTuB+AkaGbvjvCcDP0wBvI6NeX3gvkAVggDA4PbLZO91DGzlZHT54aSp 6TPmR+KdQopc6RltsT8bfyHLX2fQ46WmCPVR0S90mzDfdomF776qGkl/Ugtuyq2i2VvM x7daLcaWhwuYPhHOGt33KPZFuQ90Y8DwOiEGpgRnbhBjb9rDfvR6fNBZbCCJXJYV0c4U VpeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=c5O7ss6D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l19-20020a17090a599300b001e270b50269si25556126pji.104.2022.06.08.01.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:52:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=c5O7ss6D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 EDFF639211E; Wed, 8 Jun 2022 01:15:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233299AbiFHFaL (ORCPT + 99 others); Wed, 8 Jun 2022 01:30:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233678AbiFHF0s (ORCPT ); Wed, 8 Jun 2022 01:26:48 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2F881912C4 for ; Tue, 7 Jun 2022 19:45:24 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id 187so17140687pfu.9 for ; Tue, 07 Jun 2022 19:45:24 -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=Hk2gCK5GcL5SvSh8UzW9g4jUcY4kzzvd/IMquDVjiO4=; b=c5O7ss6DupGlsVEU8Ms0R22mX91KC3Cg3PQV77Qd3ZaYVqNRwgL5voOoS6iRw8YI1g 1FzQa46DGufTglDq0/urPNxV6ZEq9bIq7HEYZJAKAimhh0Y+HWX3PCzwu/g9oJ2qjr+B 0NIWmFZ4Q6gwN4oyGaB+qEfjQ5LFeW/hzvOl4= 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=Hk2gCK5GcL5SvSh8UzW9g4jUcY4kzzvd/IMquDVjiO4=; b=jVigIWXI0qsr2qTKQsFM+CxDbznEZh2poVSbXuT4jw+9ew/7iHNqYxURiVY1UNmz9W vujomOS5dtioQmI9eo71xw0r8QAbWgQV/Hk5oJblaNfYuE5Dlb/NN6AvnArNRChMWkoD W80JqxAiT3k5dIegQ7eH5UTYXp+gL8SwQDsny+MBjZ0FtbmHAQWeUrPA1OKHKFdnZeZs kU0LvicsZtZqYgTI8o2igpuGHBLIyWiRXlMXDSaWZ289OGPj/ozfJj0zKn5ZBo/WtYDI 7bYiG7vNqujS3u/oZm9UEBdJW0hBULsT7krOUFtgGsEZYj3sWViHa7rHd1so+Ie009g9 oZvA== X-Gm-Message-State: AOAM532ZPgmcu2uv7RcvdKS7lEdRj1FxYyD/KKOEcKt6OUO4p5j8vZBB qrjnvA3wvG+hVmb9kehPAOzf+sMxH2eMPQ== X-Received: by 2002:a65:6912:0:b0:3fc:907b:e05 with SMTP id s18-20020a656912000000b003fc907b0e05mr27657009pgq.414.1654656324473; Tue, 07 Jun 2022 19:45:24 -0700 (PDT) Received: from google.com ([2401:fa00:8f:203:463d:a192:6128:66e]) by smtp.gmail.com with ESMTPSA id c140-20020a624e92000000b005182e39038csm11078266pfb.38.2022.06.07.19.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:45:24 -0700 (PDT) Date: Wed, 8 Jun 2022 11:45:19 +0900 From: Sergey Senozhatsky To: Sergey Senozhatsky Cc: Minchan Kim , Naresh Kamboju , open list , linux-fsdevel@vger.kernel.org, Linux ARM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-block , regressions@lists.linux.dev, Jens Axboe , Nitin Gupta 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:42), Sergey Senozhatsky wrote: > > This looks like a NULL lock->name dereference in lockdep. I suspect > > that somehow local_lock doesn't get .dep_map initialized. Maybe running > > the kernel with CONFIG_DEBUG_LOCK_ALLOC would help us? Naresh, can you > > help us with this? > > Hmm, actually, hold on. mapping_area is per-CPU, so what happens if CPU > get offlined and onlined again? I don't see us re-initializing mapping_area > local_lock_init(&zs_map_area.lock) and so on. Something like this? --- diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index 9152fbde33b5..ea434a5226a3 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1104,6 +1104,8 @@ static struct zspage *find_get_zspage(struct size_class *class) static inline int __zs_cpu_up(struct mapping_area *area) { + local_lock_init(&area->lock); + /* * Make sure we don't leak memory if a cpu UP notification * and zs_init() race and both call zs_cpu_up() on the same cpu