Linux' XArray allows to store a NULL pointer as a value. xa_load() would return NULL for both an unused index and an index set to NULL. But it impacts xa_alloc() which needs to find the next available index.
However, our implementation relies on a radix tree (see linux_radix.c) which does not accept NULL pointers as values. I'm not sure if this is a limitation or a feature, so to work around this, a NULL value is replaced by NULL_VALUE, an unlikely address, when we pass it to linux_radix.
This is part of the update of the DRM drivers to Linux 5.15.