Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp7736iof; Wed, 8 Jun 2022 13:55:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2XvTxz9513oM4/fZozuz5G5H8QoWGGVziCSh3h7Nus/cCIvUltngYPu1iqoAkN8/xydC3 X-Received: by 2002:a17:907:608b:b0:711:f36c:847f with SMTP id ht11-20020a170907608b00b00711f36c847fmr5250210ejc.558.1654721735940; Wed, 08 Jun 2022 13:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654721735; cv=none; d=google.com; s=arc-20160816; b=JwHs13DkOMper8CEGn+EllOcQ7+PgSr7//HRl6kxJl0j7XH1xMolih5mUCUaIZfBIM 2fGdeV2JIEoukWMhz+febCT4QKxYo03NewopK3qzFtvW3boWSGdBh0QSSOv8/92IS1ch zyY7+BKcWatcVBCDT6JZ0L1YMNVk6Zqg04CW2pgjJ4gZDXfmhn9aWekqmtiMHLvBT95q Z2rd4qtP0m6xaEjz+dV7uaqq3LJEbKrNZsW1T61A6EwiNa1tKjjZQdlQfbxC2/XTw69T fjyuQKS+aThKmb1dUD1xM2SiC9ctUjvxAizKS2X708noSM7Hb4ioo4VFIwXaauDYHSDH 9w5w== 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:sender:dkim-signature; bh=bTBDtpW2qpcmzetkuUn9+lFzWx5HLxWub8Bm7cJfh2o=; b=XEOqig6DjKo1plX+Ip2nETKzGg8ThGQNmsX59OA3tbJR5IplfAx1eVIeJPwNcOd5pr /AsoEn1J0J140xF9azgmfI5p2OAQV7V+Yrwu65hCCrniXwxxTLKOlEpU46p34t96ALWm GkJGdBxMwmdCv2ao1kgmQR/1mpfiuEE9Kh2CHOP9JLVRvCbgoDRZ56xEX885eCJ8/vvL gsowiR3JkwNuelz2ct3FzJqF6HHHFwOEndmQ+6dz1fwxkG+fGqFzpe9KuDYkE/6B/SDH IlXw7EBODKFEZsac/+Y/KrNlVFWSjknjBd75GBGXhBBbWLMUZGqhE7GiuavqE+lT/OcC Poxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ebv8KX8P; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh39-20020a1709076ea700b006f4adc54180si19891007ejc.611.2022.06.08.13.55.07; Wed, 08 Jun 2022 13:55:35 -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=@gmail.com header.s=20210112 header.b=Ebv8KX8P; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232847AbiFHUpg (ORCPT + 99 others); Wed, 8 Jun 2022 16:45:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232224AbiFHUpf (ORCPT ); Wed, 8 Jun 2022 16:45:35 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A2E9EBE88; Wed, 8 Jun 2022 13:45:33 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id k5-20020a17090a404500b001e8875e6242so8629322pjg.5; Wed, 08 Jun 2022 13:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=bTBDtpW2qpcmzetkuUn9+lFzWx5HLxWub8Bm7cJfh2o=; b=Ebv8KX8PrhCbhkiUOwrYsdSxtwhEYjuLpaIcWDDUxSEhuOm5U2E/ijtPueb/kBf9on UVGe3xTfppkY+qsf3Oc9TnYJjgyaLdovdnHfAF+PSF2bgjoDAg6x78SLsWc5kosawUIm ZzVM6u3shW7LjAmkuYlKaJIyw6UX3eUeMYTugbSxHS+oUYBy/UW9b8m5mVg81JUUgPcD 1RV33HRC0GYVgdFGBeEgmIw3B5rDlmCPMYhChQVskDJcmSqmiN4TxJ41JOj/P5FUWDGb lkMV7KEPpp0mCp4/P0mm97GwH7ojt8SUXm9n3engCy4mE4p/vFKnatudqpX5jbO0nOE/ CySg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=bTBDtpW2qpcmzetkuUn9+lFzWx5HLxWub8Bm7cJfh2o=; b=rlMfQoJNTs1+LUVxdFeuJ57sY5dE9BE9YMcTkNS0VVPiiALecP73AEzjLvfOzG4giS mXA3bRae4+BIoNqeHyeQVtw5yht0iVoW6GEv9Dde5NmgdoHHcaQPlpbAtAZCklect9ix 6vr1qDWsAoj+uhjQWZ/bsjONzVw2N3YQiLaxPERihSyzGuTN5kqlhYPOTjGleWSobpMw 0hK3vNxv2wW3O+TOrL9qUokg5/nic4juckoSX5fETPQ+f3gt9loW8FxTGr+AWTUtP/eT 62CERHBiXTePu6jctzCHqvu0Kq5OV7XpmjDS2ag/9E9mqEVCYmO2Uz+A8PoSFlBPEIg7 AXBg== X-Gm-Message-State: AOAM530F8cUeeaPBvHTPZLJ8s8ANCH63Sm3RyZIY/et0L7VSV5ZR4y8G BV+jjhlS12MJ96A/McxuWzY= X-Received: by 2002:a17:903:22c9:b0:163:e49d:648c with SMTP id y9-20020a17090322c900b00163e49d648cmr36311082plg.54.1654721132718; Wed, 08 Jun 2022 13:45:32 -0700 (PDT) Received: from google.com ([2620:15c:211:201:f30f:4d03:66e6:b121]) by smtp.gmail.com with ESMTPSA id cj24-20020a056a00299800b0051bc1865ca5sm13796026pfb.122.2022.06.08.13.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 13:45:32 -0700 (PDT) Sender: Minchan Kim Date: Wed, 8 Jun 2022 13:45:30 -0700 From: Minchan Kim To: Sergey Senozhatsky Cc: 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=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Wed, Jun 08, 2022 at 11:42:33AM +0900, Sergey Senozhatsky wrote: > On (22/06/08 11:39), Sergey Senozhatsky wrote: > > On (22/06/07 16:52), Minchan Kim wrote: > > > > rootfs: https://oebuilds.tuxbuild.com/29zhlbEc3EWq2wod9Uy964Bp27q/images/am57xx-evm/rpb-console-image-lkft-am57xx-evm-20220601222434.rootfs.ext4.gz > > > > kernel: https://builds.tuxbuild.com/29zhqJJizU2Y7Ka7ArhryUOrNDC/zImage > > > > > > > > Boot command, > > > > /usr/bin/qemu-system-aarch64 -cpu host,aarch64=off -machine > > > > virt-2.10,accel=kvm -nographic -net > > > > nic,model=virtio,maaacaddr=BA:DD:AD:CC:09:04 -net tap -m 2048 -monitor > > > > none -kernel kernel/zImage --append "console=ttyAMA0 root=/dev/vda rw" > > > > -hda rootfs/rpb-console-image-lkft-am57xx-evm-20220601222434.rootfs.ext4 > > > > -m 4096 -smp 2 > > > > > > > > # cd /opt/kselftests/default-in-kernel/zram > > > > # ./zram.sh > > > > > > > > Allow me sometime I will try to bisect this problem. > > > > > > Thanks for sharing the info. > > > > > > I managed to work your rootfs with my local arm build > > > based on the problematic git tip. > > > However, I couldn't suceed to reproduce it. > > > > > > I needed to build zsmalloc/zram built-in instead of modules > > > Is it related? Hmm, > > > > > > Yeah, It would be very helpful if you could help to bisect it. > > > > 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. I am trying to understand the problem. AFAIK, the mapping_area was static allocation per cpu so in zs_cpu_down, we never free the mapping_area itself. Then, why do we need to reinitialize the local lock again?