dax-kmem-account-for-partial-dis-contiguous-resource-upon-removal.patch removed from -mm tree
The quilt patch titled
Subject: dax/kmem: account for partial discontiguous resource upon removal
has been removed from the -mm tree. Its filename was
dax-kmem-account-for-partial-dis-contiguous-resource-upon-removal.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Davidlohr Bueso <[email protected]>
Subject: dax/kmem: account for partial discontiguous resource upon removal
Date: Mon, 23 Feb 2026 12:15:16 -0800
When dev_dax_kmem_probe() partially succeeds (at least one range is mapped) but a subsequent range fails request_mem_region() or add_memory_driver_managed(), the probe silently continues, ultimately returning success, but with the corresponding range resource NULL'ed out.
dev_dax_kmem_remove() iterates over all dax_device ranges regardless of if the underlying resource exists. When remove_memory() is called later, it returns 0 because the memory was never added which causes dev_dax_kmem_remove() to incorrectly assume the (nonexistent) resource can be removed and attempts cleanup on a NULL pointer.
Fix this by skipping these ranges altogether, noting that these cases are considered success, such that the cleanup is still reached when all actually-added ranges are successfully removed.
---
drivers/dax/kmem.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/dax/kmem.c renamed from drivers/dax/kmem.c~dax-kmem-account-for-partial-dis-contiguous-resource-upon-removal +6 -0
@@ -227,6 +227,12 @@ static void dev_dax_kmem_remove(struct dif (rc)continue ; +/* range was never added during probe */ +if (!data->res[i]) { + success++; +continue ; + } + rc =remove_memory (range.start,range_len (&range));if (rc ==0 ) {remove_resource (data->res[i]);
_
Patches currently in -mm which might be from [email protected] are