Re: linux-next: manual merge of the mm tree with the origin tree
From: Andrew Morton
Date: Fri Nov 27 2026 - 16:04:12 EST
On Fri, 27 Nov 2026 14:27:29 +0000 Mark Brown <broonie@xxxxxxxxxx> wrote:
> Hi all,
>
> Today's linux-next merge of the mm tree got a conflict in:
>
> drivers/ptp/ptp_vmclock.c
>
> between commit:
>
> e6474ead54b8a ("ptp: vmclock: keep the device state until the last file is closed")
>
> from the origin tree and commit:
>
> 92cdcfbf70344 ("ptp: vmclock: convert mmap hook to mmap_prepare")
>
> from the mm tree.
>
Yup, thanks. I've resynced with upstream, hit the same thing and
resolved it thusly:
static int vmclock_miscdev_mmap_prepare(struct vm_area_desc *desc)
{
struct vmclock_file_state *fst = desc->file->private_data;
struct vmclock_state *st = fst->st;
if (READ_ONCE(st->removed))
return -ENODEV;
if (!vma_desc_test(desc, VMA_READ_BIT) ||
vma_desc_test(desc, VMA_WRITE_BIT))
return -EROFS;
/*
* Restrict the read-only mapping so it cannot be upgraded to
* writable later with mprotect().
*/
vma_desc_clear_flags(desc, VMA_MAYWRITE_BIT);
if (vma_desc_size(desc) != PAGE_SIZE || desc->pgoff)
return -EINVAL;
mmap_action_ioremap_full(desc, st->res.start >> PAGE_SHIFT);
desc->action.error_override = -EAGAIN;
return 0;
}