[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6418981ac577c_1dee2948f@dwillia2-mobl3.amr.corp.intel.com.notmuch>
Date: Mon, 20 Mar 2023 10:30:02 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: "lizhijian@...itsu.com" <lizhijian@...itsu.com>,
Dan Williams <dan.j.williams@...el.com>,
"vishal.l.verma@...el.com" <vishal.l.verma@...el.com>,
"dave.jiang@...el.com" <dave.jiang@...el.com>,
"ira.weiny@...el.com" <ira.weiny@...el.com>,
"nvdimm@...ts.linux.dev" <nvdimm@...ts.linux.dev>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] nvdimm: nvdimm_bus_register: Avoid adding device to the
unregistered bus
lizhijian@...itsu.com wrote:
[..]
> >> 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.
Yes.
>
>
> > 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.
That part is true, but consider the implications of adding error
handling to all code that can no longer depend on initcall ordering, not
just libnvdimm. This would be a large paradigm shift.
Now I do think it would be a good idea to fail device_add() if the bus
is not registered, but I *think* that happens now as a result of:
5221b82d46f2 driver core: bus: bus_add/probe/remove_device() cleanups
...can you double check if you have that commit in your tests?
Powered by blists - more mailing lists