Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1952421AbdDYXlu (ORCPT ); Tue, 25 Apr 2017 19:41:50 -0400 Received: from g2t2352.austin.hpe.com ([15.233.44.25]:20566 "EHLO g2t2352.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1950934AbdDYXlk (ORCPT ); Tue, 25 Apr 2017 19:41:40 -0400 From: "Kani, Toshimitsu" To: "dan.j.williams@intel.com" CC: "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "vishal.l.verma@intel.com" Subject: Re: [PATCH] pmem: fix a NULL pointer BUG in nd_pmem_notify Thread-Topic: [PATCH] pmem: fix a NULL pointer BUG in nd_pmem_notify Thread-Index: AQHSvhhlFj5R5w+fW0WGrw0/VNNsBaHWtS4AgAAJGwA= Date: Tue, 25 Apr 2017 23:40:25 +0000 Message-ID: <1493163594.26622.11.camel@hpe.com> References: <20170425230413.363-1-toshi.kani@hpe.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [15.219.163.8] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AT5PR84MB0258;7:VEAGNFRvZEijbWPMPYvC6Y79zYevM0Ba1pMwllqO1D7UT5VuE8j+30pk61FDaUiV0m3IoC1nw6OoasFZDBKfTg6OeYmghv+28Lw3bqnE37143lSYkx/Mb6JaH24Xd2W/lMqADqCYeaUytb8NS5fpTupv5mjvhr/252LR0+b0StAt6F5Bv/QgHMQ6Qw2ZpqDgUg3KCy6Ppk+lwhkdCgwzsXn6B+YJD4fmHIA2JIQh58EGJMopuWj8uYW/G31OfU68kpnFekkgdJCpS8MBCFYl2VLbzJh7f1hp5QmRaEylPLyvGxhlQ5xfSBtnlvG06wc8MZcPvVygtufBIXTk2Pxe9w== x-ms-office365-filtering-correlation-id: 4fd5510b-ce4e-4324-a283-08d48c347293 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:AT5PR84MB0258; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148);SRVR:AT5PR84MB0258;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0258; x-forefront-prvs: 0288CD37D9 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39400400002)(39410400002)(39450400003)(39840400002)(39850400002)(39860400002)(377424004)(24454002)(377454003)(6436002)(2906002)(4326008)(77096006)(6486002)(6506006)(3280700002)(81166006)(6116002)(102836003)(3660700001)(53546009)(25786009)(8936002)(3846002)(66066001)(5660300001)(229853002)(6916009)(6246003)(2950100002)(8676002)(5640700003)(6512007)(54906002)(53936002)(36756003)(38730400002)(110136004)(33646002)(2900100001)(2351001)(7736002)(189998001)(86362001)(122556002)(305945005)(50986999)(103116003)(54356999)(76176999);DIR:OUT;SFP:1102;SCL:1;SRVR:AT5PR84MB0258;H:AT5PR84MB0260.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <422EFD1008114F4188A3DDD6B8349DE6@NAMPRD84.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2017 23:40:25.3407 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0258 X-OriginatorOrg: hpe.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v3PNftbs016773 Content-Length: 1325 Lines: 41 On Tue, 2017-04-25 at 16:07 -0700, Dan Williams wrote: > On Tue, Apr 25, 2017 at 4:04 PM, Toshi Kani > wrote: > > The following BUG was observed when nd_pmem_notify() was called > > for a BTT device.  The use of a pmem_device pointer is not valid > > with BTT. > > > >  BUG: unable to handle kernel NULL pointer dereference at > > 0000000000000030 > >  IP: nd_pmem_notify+0x30/0xf0 [nd_pmem] > >  Call Trace: > >   nd_device_notify+0x40/0x50 > >   child_notify+0x10/0x20 > >   device_for_each_child+0x50/0x90 > >   nd_region_notify+0x20/0x30 > >   nd_device_notify+0x40/0x50 > >   nvdimm_region_notify+0x27/0x30 > >   acpi_nfit_scrub+0x341/0x590 [nfit] > >   process_one_work+0x197/0x450 > >   worker_thread+0x4e/0x4a0 > >   kthread+0x109/0x140 > > > > Fix nd_pmem_notify() by setting nd_region and badblocks pointers > > properly for BTT. > > > > Signed-off-by: Toshi Kani > > Cc: Dan Williams > > Cc: Vishal Verma > > > Hi Toshi, how did you trigger this? I'd like to get your test into > the regression suite. Hi Dan, I injected an error and started an ARS scan. Unfortunately, my test steps need to run on our platforms. I think these error injection features can be emulated, though. Thanks, -Toshi