linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the v4l-dvb-next tree with Linus' tree
@ 2022-12-06 22:23 Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2022-12-06 22:23 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Hans Verkuil, Hirokazu Honda, Linus Torvalds,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3600 bytes --]

Hi all,

Today's linux-next merge of the v4l-dvb-next tree got a conflict in:

  drivers/media/common/videobuf2/frame_vector.c

between commit:

  6647e76ab623 ("v4l2: don't fall back to follow_pfn() if pin_user_pages_fast() fails")

from Linus' tree and commit:

  e2fc6edd37ba ("media: videobuf2: revert "get_userptr: buffers are always writable"")

from the v4l-dvb-next 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.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/media/common/videobuf2/frame_vector.c
index 144027035892,aad72640f055..000000000000
--- a/drivers/media/common/videobuf2/frame_vector.c
+++ b/drivers/media/common/videobuf2/frame_vector.c
@@@ -32,10 -33,15 +33,11 @@@
   *
   * This function takes care of grabbing mmap_lock as necessary.
   */
- int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
+ int get_vaddr_frames(unsigned long start, unsigned int nr_frames, bool write,
  		     struct frame_vector *vec)
  {
 -	struct mm_struct *mm = current->mm;
 -	struct vm_area_struct *vma;
 -	int ret_pin_user_pages_fast = 0;
 -	int ret = 0;
 -	int err;
 +	int ret;
+ 	unsigned int gup_flags = FOLL_FORCE | FOLL_LONGTERM;
  
  	if (nr_frames == 0)
  		return 0;
@@@ -45,20 -51,62 +47,22 @@@
  
  	start = untagged_addr(start);
  
- 	ret = pin_user_pages_fast(start, nr_frames,
- 				  FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM,
+ 	if (write)
+ 		gup_flags |= FOLL_WRITE;
+ 
+ 	ret = pin_user_pages_fast(start, nr_frames, gup_flags,
  				  (struct page **)(vec->ptrs));
 -	if (ret > 0) {
 -		vec->got_ref = true;
 -		vec->is_pfns = false;
 -		goto out_unlocked;
 -	}
 -	ret_pin_user_pages_fast = ret;
 +	vec->got_ref = true;
 +	vec->is_pfns = false;
 +	vec->nr_frames = ret;
  
 -	mmap_read_lock(mm);
 -	vec->got_ref = false;
 -	vec->is_pfns = true;
 -	ret = 0;
 -	do {
 -		unsigned long *nums = frame_vector_pfns(vec);
 +	if (likely(ret > 0))
 +		return ret;
  
 -		vma = vma_lookup(mm, start);
 -		if (!vma)
 -			break;
 -
 -		while (ret < nr_frames && start + PAGE_SIZE <= vma->vm_end) {
 -			err = follow_pfn(vma, start, &nums[ret]);
 -			if (err) {
 -				if (ret)
 -					goto out;
 -				// If follow_pfn() returns -EINVAL, then this
 -				// is not an IO mapping or a raw PFN mapping.
 -				// In that case, return the original error from
 -				// pin_user_pages_fast(). Otherwise this
 -				// function would return -EINVAL when
 -				// pin_user_pages_fast() returned -ENOMEM,
 -				// which makes debugging hard.
 -				if (err == -EINVAL && ret_pin_user_pages_fast)
 -					ret = ret_pin_user_pages_fast;
 -				else
 -					ret = err;
 -				goto out;
 -			}
 -			start += PAGE_SIZE;
 -			ret++;
 -		}
 -		/* Bail out if VMA doesn't completely cover the tail page. */
 -		if (start < vma->vm_end)
 -			break;
 -	} while (ret < nr_frames);
 -out:
 -	mmap_read_unlock(mm);
 -out_unlocked:
 -	if (!ret)
 -		ret = -EFAULT;
 -	if (ret > 0)
 -		vec->nr_frames = ret;
 -	return ret;
 +	/* This used to (racily) return non-refcounted pfns. Let people know */
 +	WARN_ONCE(1, "get_vaddr_frames() cannot follow VM_IO mapping");
 +	vec->nr_frames = 0;
 +	return ret ? ret : -EFAULT;
  }
  EXPORT_SYMBOL(get_vaddr_frames);
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* linux-next: manual merge of the v4l-dvb-next tree with Linus' tree
@ 2023-01-22 23:01 Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2023-01-22 23:01 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Hans Verkuil, Jakub Kicinski, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]

Hi all,

Today's linux-next merge of the v4l-dvb-next tree got conflicts in:

  MAINTAINERS

between commit:

  e0be11a833e8 ("MAINTAINERS: add networking entries for Willem")

from Linus' tree and commit:

  3673237b62a8 ("media: zr364xx: remove deprecated driver")

from the v4l-dvb-next 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.

-- 
Cheers,
Stephen Rothwell

diff --cc MAINTAINERS
index 56c7cb44a42a,ba5254cd1002..000000000000
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@@ -21582,23 -21710,6 +21565,13 @@@ S:	Orpha
  W:	http://linux-lc100020.sourceforge.net
  F:	drivers/net/wireless/zydas/zd1201.*
  
- USB ZR364XX DRIVER
- M:	Antoine Jacquet <royale@zerezo.com>
- L:	linux-usb@vger.kernel.org
- L:	linux-media@vger.kernel.org
- S:	Maintained
- W:	http://royale.zerezo.com/zr364xx/
- T:	git git://linuxtv.org/media_tree.git
- F:	Documentation/admin-guide/media/zr364xx*
- F:	drivers/staging/media/deprecated/zr364xx/
- 
 +USER DATAGRAM PROTOCOL (UDP)
 +M:	Willem de Bruijn <willemdebruijn.kernel@gmail.com>
 +S:	Maintained
 +F:	include/linux/udp.h
 +F:	net/ipv4/udp.c
 +F:	net/ipv6/udp.c
 +
  USER-MODE LINUX (UML)
  M:	Richard Weinberger <richard@nod.at>
  M:	Anton Ivanov <anton.ivanov@cambridgegreys.com>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* linux-next: manual merge of the v4l-dvb-next tree with Linus' tree
@ 2020-06-05  1:30 Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2020-06-05  1:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

Hi all,

Today's linux-next merge of the v4l-dvb-next tree got a conflict in:

  drivers/staging/media/atomisp/pci/atomisp_v4l2.c

between commit:

  6929f71e46bd ("atomisp: avoid warning about unused function")

from Linus' tree and commit:

  48d15adb0032 ("media: atomisp: get rid of a warning message")

from the v4l-dvb-next tree.

I fixed it up (I just used the latter) 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.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-22 23:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06 22:23 linux-next: manual merge of the v4l-dvb-next tree with Linus' tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2023-01-22 23:01 Stephen Rothwell
2020-06-05  1:30 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).