From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64240C64E7B for ; Tue, 1 Dec 2020 09:09:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 966A8221FF for ; Tue, 1 Dec 2020 09:09:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="a1xDBC0N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 966A8221FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BDAA06B0036; Tue, 1 Dec 2020 04:09:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B65F78D0002; Tue, 1 Dec 2020 04:09:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A53A98D0001; Tue, 1 Dec 2020 04:09:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0137.hostedemail.com [216.40.44.137]) by kanga.kvack.org (Postfix) with ESMTP id 8C0DD6B0036 for ; Tue, 1 Dec 2020 04:09:04 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 521E98249980 for ; Tue, 1 Dec 2020 09:09:04 +0000 (UTC) X-FDA: 77544139008.03.waste28_3f13dc6273a9 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 2F94928A4E8 for ; Tue, 1 Dec 2020 09:09:04 +0000 (UTC) X-HE-Tag: waste28_3f13dc6273a9 X-Filterd-Recvd-Size: 5481 Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Dec 2020 09:09:03 +0000 (UTC) Received: by mail-ej1-f66.google.com with SMTP id 7so2646777ejm.0 for ; Tue, 01 Dec 2020 01:09:03 -0800 (PST) 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:content-transfer-encoding; bh=S+Ngn4W/oQtuMxlBFu4kHeU3p7nhm6p8xjw9712a+hg=; b=a1xDBC0NB1WegU5JwLnZPeJz2v97WB28CL0vAfurTSZNAoShRCXmC95d3JszRXT8V2 t47DSCSTXBLukV4RQqIXsQnrhr/HM/xRMmAlJs5xV8uW8100Cy9Z++tUUSqc9mt/66r+ C7zlSHICvqkcIRc7XolTcgpJitMlO1FBjS1utDfmAwsQkNaZVOZEyw2JFuyf0w+WfxLT e2I8DpbCs7yCV7cmmNDt4SphJREPbyXf81PsCX3pEukIGegJ1hbWRaWt89vhrqdqhFyK oAjflrkxgLhtnaAtj0D13J65wTDkcPV++R8Dc3ox0c3PdP1EchtZPQlqRlCsdZXqesef TA0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=S+Ngn4W/oQtuMxlBFu4kHeU3p7nhm6p8xjw9712a+hg=; b=cOVhjlFq9q/6Z8LCtmifY6tDZeje0zFF6rmFSQ89oM4Yum9ov4DwIS9kIQNMuouqea FYAtgSmOaYhwjHrX2VHScQE9gHjbh0WBzrM7YD5Jef3/dB0jNEx9/U/dOVHHSp70JyxA GCYXGl91xec7SGQlJ54Ihv2Y5oTx1neY3tmIV9If32BtyCjOR+aGawFxFA15WYjczZ8V noJZawOj739YXUWsWU738eCLOAgF0rE0neDkUewBc2Rkh6zVBQ7ScvKD9QBfRbObwQy2 hddZ24JjB7Pd3JV7POBeAOuPdTpbDD/VddO9GAp6yNOsFNCPRUBpYhxJYR7CIlAUfhay PBmw== X-Gm-Message-State: AOAM5331ANRZhsVtyfHmO6Hj12C6iPqCaGPOZNYSe7a7CZRtR0rIdRbz F6lNPILtX2SkA8/cmilm+2zuBeGuYhU/b7Xbqhjf7A== X-Google-Smtp-Source: ABdhPJz9Uhhox7ZTrrku2Jm0H/oZM/zXk9l4/6aLl25sq93H6GDa8EkVqs78ul1nVveVbLKnNiLpc/83txz7DeAOR9c= X-Received: by 2002:a17:906:1498:: with SMTP id x24mr2014665ejc.170.1606813742234; Tue, 01 Dec 2020 01:09:02 -0800 (PST) MIME-Version: 1.0 References: <58f66f22-fd5f-685d-e608-99c35d89c1a3@linux.alibaba.com> In-Reply-To: <58f66f22-fd5f-685d-e608-99c35d89c1a3@linux.alibaba.com> From: Naresh Kamboju Date: Tue, 1 Dec 2020 14:38:50 +0530 Message-ID: Subject: Re: BUG: KASAN: null-ptr-deref in workingset_eviction+0xf2/0x1e0 To: Alex Shi Cc: inux-kernel@vger.kernel.org, linux-mm , Cgroups , Linux-Next Mailing List , lkft-triage@lists.linaro.org, Andrew Morton , Johannes Weiner , Shakeel Butt , Roman Gushchin , Stephen Rothwell , Muchun Song , alexander.h.duyck@linux.intel.com, Yafang Shao , richard.weiyang@gmail.co, Michal Hocko , Vlastimil Babka Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Alex, On Tue, 1 Dec 2020 at 13:14, Alex Shi wrote: > > > > =E5=9C=A8 2020/12/1 =E4=B8=8A=E5=8D=883:52, Naresh Kamboju =E5=86=99=E9= =81=93: > > Crash log: > > ----------- > > ioctl_sg01.c:81: TINFO: Found SCSI device /dev/sg1 > > [ 285.862123] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > [ 285.863025] BUG: KASAN: null-ptr-deref in workingset_eviction+0xf2/0= x1e0 > > [ 285.863025] Read of size 4 at addr 00000000000000c8 by task kswapd0/= 245 > > Hi Naresh, > > Good to know you again. :) Same here :) > > Would you like to use command to check whichh line cause the panic: > > scripts/faddr2line vmlinux workingset_eviction+0xf2/0x1e0 scripts/faddr2line vmlinux workingset_eviction+0xf2/0x1e0 workingset_eviction+0xf2/0x1e0: workingset_eviction at ??:? vmlinux and system.map files available in this location, https://builds.tuxbuild.com/1l0FDtgxYSNunuG5ERIXtvPjZ7R/ > > I can't reproduce it. and my gcc version mismatch with yours. Please run below easy steps to reproduce. you may install docker and tuxmake. Please share if you have any debug patch or proposed fix patch, I would be happy to test. Steps to reproduce: -------------------- # TuxMake is a command line tool and Python library that provides # portable and repeatable Linux kernel builds across a variety of # architectures, toolchains, kernel configurations, and make targets. # # TuxMake supports the concept of runtimes. # See https://docs.tuxmake.org/runtimes/, for that to work it requires # that you install podman or docker on your system. # # To install tuxmake on your system globally: # sudo pip3 install -U tuxmake # # See https://docs.tuxmake.org/ for complete documentation. # tuxmake --runtime docker --target-arch x86_64 --toolchain gcc-9 \ --kconfig defconfig \ --kconfig-add https://builds.tuxbuild.com/1l0FDtgxYSNunuG5ERIXtvPjZ7R/confi= g # run LTP # cd /opt/ltp # ./runltp -s ioctl_sg01 # you see below crash - Naresh