CVE-2026-74379: dax/kmem: account for partial discontiguous resource upon removal
In the Linux kernel, the following vulnerability has been resolved:
dax/kmem: account for partial discontiguous resource upon removal
When devdaxkmemprobe() partially succeeds (at least one range is mapped) but a subsequent range fails requestmemregion() or addmemorydrivermanaged(), the probe silently continues, ultimately returning success, but with the corresponding range resource NULL'ed out.
devdaxkmemremove() iterates over all daxdevice ranges regardless of if the underlying resource exists. When removememory() is called later, it returns 0 because the memory was never added which causes devdaxkmemremove() 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.