From: "lizhijian@fujitsu.com" <lizhijian@fujitsu.com>
To: Dan Williams <dan.j.williams@intel.com>,
"vishal.l.verma@intel.com" <vishal.l.verma@intel.com>,
"dave.jiang@intel.com" <dave.jiang@intel.com>,
"ira.weiny@intel.com" <ira.weiny@intel.com>,
"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nvdimm: nvdimm_bus_register: Avoid adding device to the unregistered bus
Date: Mon, 20 Mar 2023 02:06:38 +0000 [thread overview]
Message-ID: <eae85bab-cdb6-b8b3-8014-2e7f3916bfe2@fujitsu.com> (raw)
In-Reply-To: <641401d75d039_1dee294a1@dwillia2-mobl3.amr.corp.intel.com.notmuch>
On 17/03/2023 13:59, Dan Williams wrote:
> lizhijian@fujitsu.com wrote:
>>
>>
>> On 16/03/2023 23:54, Dan Williams wrote:
>>> Li Zhijian wrote:
>>>> nvdimm_bus_register() could be called from other modules, such as nfit,
>>>> but it can only be called after the nvdimm_bus_type is registered.
>>>>
>>>> BUG: kernel NULL pointer dereference, address: 0000000000000098
>>>> #PF: supervisor read access in kernel mode
>>>> #PF: error_code(0x0000) - not-present page
>>>> PGD 0 P4D 0
>>>> Oops: 0000 [#1] PREEMPT SMP PTI
>>>> CPU: 0 PID: 117 Comm: systemd-udevd Not tainted 6.2.0-rc6-pmem+ #97
>>>> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
>>>> RIP: 0010:bus_add_device+0x58/0x150
>>>> Call Trace:
>>>> <TASK>
>>>> device_add+0x3ac/0x980
>>>> nvdimm_bus_register+0x16d/0x1d0
>>>> acpi_nfit_init+0xb72/0x1f90 [nfit]
>>>> acpi_nfit_add+0x1d5/0x200 [nfit]
>>>> acpi_device_probe+0x45/0x160
>>>
>>> Can you explain a bit more how to hit this crash? This has not been a
>>> problem historically and the explanation above makes it sound like this
>>> is a theoretical issue.
>>>
>>
>> Dan,
>>
>> Configure the kconfig with ACPI_NFIT [=m] && LIBNVDIMM [=y], and add extra kernel booting parameter
>> 'initcall_blacklist=libnvdimm_init'. Then kernel panic!
>
> That's expected though,
Do you mean we just keep it as it is.
> you can't block libnvdimm_init and then expect
> modules that link to libnvdimm to work.
Ah, we would rather see it *unable to work* than panic, isn't it.
Thanks
Zhijian
> You would also need to block all
> modules / initcalls that depend on libnvdimm_init having runI'll
> respond to the other thread with some ideas.
next prev parent reply other threads:[~2023-03-20 2:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 8:38 Li Zhijian
2023-03-16 15:54 ` Dan Williams
2023-03-17 1:42 ` lizhijian
2023-03-17 2:26 ` Dan Williams
2023-03-17 5:37 ` lizhijian
2023-03-17 5:59 ` Dan Williams
2023-03-20 2:06 ` lizhijian [this message]
2023-03-20 17:30 ` Dan Williams
2023-03-21 2:17 ` lizhijian
2023-03-21 2:38 ` Dan Williams
2023-03-21 3:19 ` lizhijian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eae85bab-cdb6-b8b3-8014-2e7f3916bfe2@fujitsu.com \
--to=lizhijian@fujitsu.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®