[PATCH 41/46] mm/vma: call ->may_split() before a partial merge
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Mon Oct 26 17:14:12 PDT 2026
> From: Chris Mason <mason at kernel.org>
>
> A driver can use the ->may_split() hook to forbid a VMA boundary at
> certain addresses.
>
> A device-dax device is a character device that gives raw access to a
> range of memory through mmap(). device-dax refuses any address that is not
> a multiple of the device's alignment through vm_ops->may_split.
>
> vma_merge_existing_range() can move boundaries, but does not call
> vm_ops->may_split.
>
> If a range at the edge of a VMA gets the attributes of the adjacent VMA,
> the function moves only that range over to the neighbour: one VMA shrinks
> and the other grows. This is a partial merge, and vma_modify() tries it
> [ ... ]
> Cc: stable at vger.kernel.org
> Signed-off-by: Chris Mason <mason at kernel.org>
> Reviewed-by: Lorenzo Stoakes (ARM) <ljs at kernel.org>
> [ david: improve description; cleanup the code ]
> Signed-off-by: David Hildenbrand (Arm) <david at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261027-fixes_core-v1-0-6f74bec9a5bb@kernel.org?part=41
More information about the kexec
mailing list