* [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
@ 2026-05-19 10:18 Tomasz Wolski
2026-05-19 11:31 ` Jonathan Cameron
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Tomasz Wolski @ 2026-05-19 10:18 UTC (permalink / raw)
To: smita.koralahallichannabasappa, alison.schofield, dan.j.williams
Cc: icheng, linux-cxl, linux-fsdevel, linux-kernel, linux-pm, nvdimm,
ardb, benjamin.cheatham, dave.jiang, jonathan.cameron,
Tomasz Wolski
The dax_region resource conflict in alloc_dax_region() indicates a
serious configuration problem — two subsystems (e.g. dax_hmem and
dax_cxl) are attempting to register overlapping address ranges. This is
not a transient or debug-level condition; it represents a genuine
resource conflict that an administrator needs to be aware of.
Switch from request_resource() + dev_dbg() to
request_resource_conflict() + dev_err() so that the conflict is visible
by default and the colliding resource is identified in the message.
Suggested-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/linux-cxl/69c1a8d1c0fa9_7ee3100a1@dwillia2-mobl4.notmuch/
Signed-off-by: Tomasz Wolski <tomasz.wolski@fujitsu.com>
---
drivers/dax/bus.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index 68437c05e21d..66413c6c2ba0 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -637,7 +637,7 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
unsigned long flags)
{
struct dax_region *dax_region;
- int rc;
+ struct resource *conflict;
/*
* The DAX core assumes that it can store its private data in
@@ -670,10 +670,11 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
.flags = IORESOURCE_MEM | flags,
};
- rc = request_resource(&dax_regions, &dax_region->res);
- if (rc) {
- dev_dbg(parent, "dax_region resource conflict for %pR\n",
- &dax_region->res);
+ conflict = request_resource_conflict(&dax_regions, &dax_region->res);
+ if (conflict) {
+ dev_err(parent,
+ "dax_region: can't claim %pR: address conflict with %s %pR\n",
+ &dax_region->res, conflict->name, conflict);
goto err_res;
}
--
2.47.3
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
2026-05-19 10:18 [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region() Tomasz Wolski
@ 2026-05-19 11:31 ` Jonathan Cameron
2026-05-19 23:27 ` Richard Cheng
2026-05-20 0:14 ` kernel test robot
2026-05-20 3:56 ` Dan Williams
2 siblings, 1 reply; 9+ messages in thread
From: Jonathan Cameron @ 2026-05-19 11:31 UTC (permalink / raw)
To: Tomasz Wolski
Cc: smita.koralahallichannabasappa, alison.schofield, dan.j.williams,
icheng, linux-cxl, linux-fsdevel, linux-kernel, linux-pm, nvdimm,
ardb, benjamin.cheatham, dave.jiang, jonathan.cameron
On Tue, 19 May 2026 12:18:32 +0200
Tomasz Wolski <tomasz.wolski@fujitsu.com> wrote:
> The dax_region resource conflict in alloc_dax_region() indicates a
> serious configuration problem — two subsystems (e.g. dax_hmem and
> dax_cxl) are attempting to register overlapping address ranges. This is
> not a transient or debug-level condition; it represents a genuine
> resource conflict that an administrator needs to be aware of.
>
> Switch from request_resource() + dev_dbg() to
> request_resource_conflict() + dev_err() so that the conflict is visible
> by default and the colliding resource is identified in the message.
>
> Suggested-by: Dan Williams <dan.j.williams@intel.com>
> Link: https://lore.kernel.org/linux-cxl/69c1a8d1c0fa9_7ee3100a1@dwillia2-mobl4.notmuch/
> Signed-off-by: Tomasz Wolski <tomasz.wolski@fujitsu.com>
Seems reasonable to me
Reviewed-by: Jonathan Cameron <jic23@kernel.org>
> ---
> drivers/dax/bus.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
> index 68437c05e21d..66413c6c2ba0 100644
> --- a/drivers/dax/bus.c
> +++ b/drivers/dax/bus.c
> @@ -637,7 +637,7 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
> unsigned long flags)
> {
> struct dax_region *dax_region;
> - int rc;
> + struct resource *conflict;
>
> /*
> * The DAX core assumes that it can store its private data in
> @@ -670,10 +670,11 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
> .flags = IORESOURCE_MEM | flags,
> };
>
> - rc = request_resource(&dax_regions, &dax_region->res);
> - if (rc) {
> - dev_dbg(parent, "dax_region resource conflict for %pR\n",
> - &dax_region->res);
> + conflict = request_resource_conflict(&dax_regions, &dax_region->res);
> + if (conflict) {
> + dev_err(parent,
> + "dax_region: can't claim %pR: address conflict with %s %pR\n",
> + &dax_region->res, conflict->name, conflict);
> goto err_res;
> }
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
2026-05-19 11:31 ` Jonathan Cameron
@ 2026-05-19 23:27 ` Richard Cheng
0 siblings, 0 replies; 9+ messages in thread
From: Richard Cheng @ 2026-05-19 23:27 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Tomasz Wolski, smita.koralahallichannabasappa, alison.schofield,
dan.j.williams, linux-cxl, linux-fsdevel, linux-kernel, linux-pm,
nvdimm, ardb, benjamin.cheatham, dave.jiang, jonathan.cameron
On Tue, May 19, 2026 at 12:31:12PM +0800, Jonathan Cameron wrote:
> On Tue, 19 May 2026 12:18:32 +0200
> Tomasz Wolski <tomasz.wolski@fujitsu.com> wrote:
>
> > The dax_region resource conflict in alloc_dax_region() indicates a
> > serious configuration problem — two subsystems (e.g. dax_hmem and
> > dax_cxl) are attempting to register overlapping address ranges. This is
> > not a transient or debug-level condition; it represents a genuine
> > resource conflict that an administrator needs to be aware of.
> >
> > Switch from request_resource() + dev_dbg() to
> > request_resource_conflict() + dev_err() so that the conflict is visible
> > by default and the colliding resource is identified in the message.
> >
> > Suggested-by: Dan Williams <dan.j.williams@intel.com>
> > Link: https://lore.kernel.org/linux-cxl/69c1a8d1c0fa9_7ee3100a1@dwillia2-mobl4.notmuch/
> > Signed-off-by: Tomasz Wolski <tomasz.wolski@fujitsu.com>
> Seems reasonable to me
> Reviewed-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Richard Cheng <icheng@nvidia.com>
Best regards,
Richard Cheng.
> > ---
> > drivers/dax/bus.c | 11 ++++++-----
> > 1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
> > index 68437c05e21d..66413c6c2ba0 100644
> > --- a/drivers/dax/bus.c
> > +++ b/drivers/dax/bus.c
> > @@ -637,7 +637,7 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
> > unsigned long flags)
> > {
> > struct dax_region *dax_region;
> > - int rc;
> > + struct resource *conflict;
> >
> > /*
> > * The DAX core assumes that it can store its private data in
> > @@ -670,10 +670,11 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
> > .flags = IORESOURCE_MEM | flags,
> > };
> >
> > - rc = request_resource(&dax_regions, &dax_region->res);
> > - if (rc) {
> > - dev_dbg(parent, "dax_region resource conflict for %pR\n",
> > - &dax_region->res);
> > + conflict = request_resource_conflict(&dax_regions, &dax_region->res);
> > + if (conflict) {
> > + dev_err(parent,
> > + "dax_region: can't claim %pR: address conflict with %s %pR\n",
> > + &dax_region->res, conflict->name, conflict);
> > goto err_res;
> > }
> >
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
2026-05-19 10:18 [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region() Tomasz Wolski
2026-05-19 11:31 ` Jonathan Cameron
@ 2026-05-20 0:14 ` kernel test robot
2026-05-20 2:48 ` Alison Schofield
2026-05-20 3:56 ` Dan Williams
2 siblings, 1 reply; 9+ messages in thread
From: kernel test robot @ 2026-05-20 0:14 UTC (permalink / raw)
To: Tomasz Wolski, smita.koralahallichannabasappa, alison.schofield
Cc: oe-kbuild-all, icheng, linux-cxl, linux-fsdevel, linux-kernel,
linux-pm, nvdimm, ardb, benjamin.cheatham, dave.jiang,
jonathan.cameron, Tomasz Wolski
Hi Tomasz,
kernel test robot noticed the following build errors:
[auto build test ERROR on cxl/next]
[also build test ERROR on linus/master v7.1-rc4 next-20260519]
[cannot apply to cxl/pending]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Tomasz-Wolski/dax-bus-Upgrade-resource-conflict-message-to-dev_err-in-alloc_dax_region/20260519-182401
base: https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git next
patch link: https://lore.kernel.org/r/20260519101832.31988-1-tomasz.wolski%40fujitsu.com
patch subject: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
config: s390-randconfig-r072-20260520 (https://download.01.org/0day-ci/archive/20260520/202605200842.i0s39151-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 9.5.0
smatch: v0.5.0-9185-gbcc58b9c
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260520/202605200842.i0s39151-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605200842.i0s39151-lkp@intel.com/
All errors (new ones prefixed by >>, old ones prefixed by <<):
>> ERROR: modpost: "request_resource_conflict" [drivers/dax/dax.ko] undefined!
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
2026-05-20 0:14 ` kernel test robot
@ 2026-05-20 2:48 ` Alison Schofield
0 siblings, 0 replies; 9+ messages in thread
From: Alison Schofield @ 2026-05-20 2:48 UTC (permalink / raw)
To: Tomasz Wolski
Cc: Tomasz Wolski, smita.koralahallichannabasappa, oe-kbuild-all,
icheng, linux-cxl, linux-fsdevel, linux-kernel, linux-pm, nvdimm,
ardb, benjamin.cheatham, dave.jiang, jonathan.cameron
On Wed, May 20, 2026 at 08:14:43AM +0800, kernel test robot wrote:
> Hi Tomasz,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on cxl/next]
> [also build test ERROR on linus/master v7.1-rc4 next-20260519]
> [cannot apply to cxl/pending]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Tomasz-Wolski/dax-bus-Upgrade-resource-conflict-message-to-dev_err-in-alloc_dax_region/20260519-182401
> base: https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git next
> patch link: https://lore.kernel.org/r/20260519101832.31988-1-tomasz.wolski%40fujitsu.com
> patch subject: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
> config: s390-randconfig-r072-20260520 (https://download.01.org/0day-ci/archive/20260520/202605200842.i0s39151-lkp@intel.com/config)
> compiler: s390-linux-gcc (GCC) 9.5.0
> smatch: v0.5.0-9185-gbcc58b9c
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260520/202605200842.i0s39151-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202605200842.i0s39151-lkp@intel.com/
>
> All errors (new ones prefixed by >>, old ones prefixed by <<):
>
> >> ERROR: modpost: "request_resource_conflict" [drivers/dax/dax.ko] undefined!
>
Sorry Tomasz - I thought request_resource_conflict() looked sweet, but
apparently it's only available to built-in kernel code and not to
modules. I'd probably try a prep patch exporting it, based on looking
at its kernel doc comment and neighbots in kernel/resource.c that are
exported.
-- Alison
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
2026-05-19 10:18 [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region() Tomasz Wolski
2026-05-19 11:31 ` Jonathan Cameron
2026-05-20 0:14 ` kernel test robot
@ 2026-05-20 3:56 ` Dan Williams
2026-05-27 8:03 ` Tomasz Wolski
2 siblings, 1 reply; 9+ messages in thread
From: Dan Williams @ 2026-05-20 3:56 UTC (permalink / raw)
To: Tomasz Wolski, smita.koralahallichannabasappa, Alison Schofield,
Dan J Williams
Cc: icheng, linux-cxl, linux-fsdevel, linux-kernel, linux-pm, nvdimm,
ardb, benjamin.cheatham, Dave Jiang, Jonathan Cameron
On Tue, May 19, 2026, at 3:18 AM, Tomasz Wolski wrote:
> The dax_region resource conflict in alloc_dax_region() indicates a
> serious configuration problem — two subsystems (e.g. dax_hmem and
> dax_cxl) are attempting to register overlapping address ranges. This is
> not a transient or debug-level condition; it represents a genuine
> resource conflict that an administrator needs to be aware of.
>
> Switch from request_resource() + dev_dbg() to
> request_resource_conflict() + dev_err() so that the conflict is visible
> by default and the colliding resource is identified in the message.
>
> Suggested-by: Dan Williams <dan.j.williams@intel.com>
> Link:
> https://lore.kernel.org/linux-cxl/69c1a8d1c0fa9_7ee3100a1@dwillia2-mobl4.notmuch/
> Signed-off-by: Tomasz Wolski <tomasz.wolski@fujitsu.com>
> ---
> drivers/dax/bus.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
> index 68437c05e21d..66413c6c2ba0 100644
> --- a/drivers/dax/bus.c
> +++ b/drivers/dax/bus.c
> @@ -637,7 +637,7 @@ struct dax_region *alloc_dax_region(struct device
> *parent, int region_id,
> unsigned long flags)
> {
> struct dax_region *dax_region;
> - int rc;
> + struct resource *conflict;
>
> /*
> * The DAX core assumes that it can store its private data in
> @@ -670,10 +670,11 @@ struct dax_region *alloc_dax_region(struct device
> *parent, int region_id,
> .flags = IORESOURCE_MEM | flags,
> };
>
> - rc = request_resource(&dax_regions, &dax_region->res);
> - if (rc) {
> - dev_dbg(parent, "dax_region resource conflict for %pR\n",
> - &dax_region->res);
> + conflict = request_resource_conflict(&dax_regions, &dax_region->res);
Just report the request_resource() failure. This case does not warrant exporting request_resource _conflict(). Historically one driver can not mess with another driver's resource beyond conflict detection.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
2026-05-20 3:56 ` Dan Williams
@ 2026-05-27 8:03 ` Tomasz Wolski
2026-05-27 18:44 ` Alison Schofield
0 siblings, 1 reply; 9+ messages in thread
From: Tomasz Wolski @ 2026-05-27 8:03 UTC (permalink / raw)
To: djbw
Cc: alison.schofield, ardb, benjamin.cheatham, dan.j.williams,
dave.jiang, icheng, jonathan.cameron, linux-cxl, linux-fsdevel,
linux-kernel, linux-pm, nvdimm, smita.koralahallichannabasappa,
tomasz.wolski
Hello Dan & Alison,
Thanks for your remarks
>> Just report the request_resource() failure. This case does not warrant exporting request_resource _conflict(). Historically one driver can not mess with another driver's resource beyond conflict detection.
Do you think v1 of the patch is good enough or v3 is needed? (which in fact would be the same as v1)
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
2026-05-27 8:03 ` Tomasz Wolski
@ 2026-05-27 18:44 ` Alison Schofield
2026-05-28 6:40 ` Tomasz Wolski
0 siblings, 1 reply; 9+ messages in thread
From: Alison Schofield @ 2026-05-27 18:44 UTC (permalink / raw)
To: Tomasz Wolski
Cc: djbw, ardb, benjamin.cheatham, dan.j.williams, dave.jiang,
icheng, jonathan.cameron, linux-cxl, linux-fsdevel, linux-kernel,
linux-pm, nvdimm, smita.koralahallichannabasappa
On Wed, May 27, 2026 at 10:03:28AM +0200, Tomasz Wolski wrote:
> Hello Dan & Alison,
>
> Thanks for your remarks
>
> >> Just report the request_resource() failure. This case does not warrant exporting request_resource _conflict(). Historically one driver can not mess with another driver's resource beyond conflict detection.
> Do you think v1 of the patch is good enough or v3 is needed? (which in fact would be the same as v1)
Hi Tomasz,
As the person who caused the churn, I sympathize w you, but
as the person who will likely merge this, please send a v3 that
removes the Fixes tag, which was the other change in v2.
It'll keep the history cleaner.
Thanks!
Alison
>
> Best regards,
> Tomasz
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region()
2026-05-27 18:44 ` Alison Schofield
@ 2026-05-28 6:40 ` Tomasz Wolski
0 siblings, 0 replies; 9+ messages in thread
From: Tomasz Wolski @ 2026-05-28 6:40 UTC (permalink / raw)
To: alison.schofield
Cc: ardb, benjamin.cheatham, dan.j.williams, dave.jiang, djbw,
icheng, jonathan.cameron, linux-cxl, linux-fsdevel, linux-kernel,
linux-pm, nvdimm, smita.koralahallichannabasappa, tomasz.wolski
>> Hi Tomasz,
>>
>> As the person who caused the churn, I sympathize w you, but
>> as the person who will likely merge this, please send a v3 that
>> removes the Fixes tag, which was the other change in v2.
>>
>> It'll keep the history cleaner.
>>
>> Thanks!
>> Alison
Hello Alison,
No problem, I will post v3 :)
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-05-28 6:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-19 10:18 [PATCH v2] dax/bus: Upgrade resource conflict message to dev_err() in alloc_dax_region() Tomasz Wolski
2026-05-19 11:31 ` Jonathan Cameron
2026-05-19 23:27 ` Richard Cheng
2026-05-20 0:14 ` kernel test robot
2026-05-20 2:48 ` Alison Schofield
2026-05-20 3:56 ` Dan Williams
2026-05-27 8:03 ` Tomasz Wolski
2026-05-27 18:44 ` Alison Schofield
2026-05-28 6:40 ` Tomasz Wolski
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®