From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3000991AbdDZOFa (ORCPT ); Wed, 26 Apr 2017 10:05:30 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:36458 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S3000976AbdDZOFW (ORCPT ); Wed, 26 Apr 2017 10:05:22 -0400 MIME-Version: 1.0 In-Reply-To: <1493163594.26622.11.camel@hpe.com> References: <20170425230413.363-1-toshi.kani@hpe.com> <1493163594.26622.11.camel@hpe.com> From: Dan Williams Date: Wed, 26 Apr 2017 07:05:20 -0700 Message-ID: Subject: Re: [PATCH] pmem: fix a NULL pointer BUG in nd_pmem_notify To: "Kani, Toshimitsu" Cc: "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "Verma, Vishal L" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 25, 2017 at 4:40 PM, Kani, Toshimitsu wrote: > 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. Yes, I'll try to come up with something for nfit_test. Thanks Toshi!