Skip to contentSkip to conversation

linux-next: manual merge of the mm tree with the origin tree

PATCH Mark Brown 2 participants 2 messages Nov 27

Subsystems (4)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

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.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

drivers/ptp/ptp_vmclock.c +0 -0
diff --cc drivers/ptp/ptp_vmclock.c
index 3e32a90306616,6a1d5f40a5661..0000000000000
@@@ -367,15 -364,13 +367,16 @@@ struct vmclock_file_state 
  	atomic_t seq;
  };
  
- static int vmclock_miscdev_mmap(struct file *fp, struct vm_area_struct *vma)
+ static int vmclock_miscdev_mmap_prepare(struct vm_area_desc *desc)
  {
- 	struct vmclock_file_state *fst = fp->private_data;
+ 	struct vmclock_file_state *fst = desc->file->private_data;
  	struct vmclock_state *st = fst->st;
  
 +	if (READ_ONCE(st->removed))
 +		return -ENODEV;
 +
- 	if ((vma->vm_flags & (VM_READ|VM_WRITE)) != VM_READ)
+ 	if (!vma_desc_test(desc, VMA_READ_BIT) ||
+ 	    vma_desc_test(desc, VMA_WRITE_BIT))
  		return -EROFS;
  
  	/*
#1 lore raw
Quoted 37 lines · Mark Brown

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.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

drivers/ptp/ptp_vmclock.c +2 -2
diff --cc drivers/ptp/ptp_vmclock.c
index 3e32a90306616,6a1d5f40a5661..0000000000000
@@@ -367,15 -364,13 +367,16 @@@ struct vmclock_file_state
  	atomic_t seq;
  };
 
- static int vmclock_miscdev_mmap(struct file *fp, struct vm_area_struct *vma)
+ static int vmclock_miscdev_mmap_prepare(struct vm_area_desc *desc)
  {
- 	struct vmclock_file_state *fst = fp->private_data;
+ 	struct vmclock_file_state *fst = desc->file->private_data;
  	struct vmclock_state *st = fst->st;

drivers/ptp/ptp_vmclock.c

Quoted 10 lines
drivers/ptp/ptp_vmclock.c +2 -1
 
 +	if (READ_ONCE(st->removed))
 +		return -ENODEV;
 +
- 	if ((vma->vm_flags & (VM_READ|VM_WRITE)) != VM_READ)
+ 	if (!vma_desc_test(desc, VMA_READ_BIT) ||
+ 	    vma_desc_test(desc, VMA_WRITE_BIT))
  		return -EROFS;
 
  	/*

LGTM thanks!

--
Cheers, Lorenzo