linux-next: build failure after merge of the tip tree

Stephen Rothwell
2022-12-05T01:15:50Z

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

Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

In file included from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/huge_mm.h:8,
from include/linux/mm.h:726,
from drivers/media/common/videobuf2/frame_vector.c:5:
drivers/media/common/videobuf2/frame_vector.c: In function 'get_vaddr_frames':
drivers/media/common/videobuf2/frame_vector.c:46:31: error: 'mm' undeclared (first use in this function); did you mean 'tm'?
46 | start = untagged_addr(mm, start);
| ^~
arch/x86/include/asm/uaccess.h:38:28: note: in definition of macro 'untagged_addr'
38 | __addr &= (mm)->context.untag_mask | sign; \
| ^~
drivers/media/common/videobuf2/frame_vector.c:46:31: note: each undeclared identifier is reported only once for each function it appears in
46 | start = untagged_addr(mm, start);
| ^~
arch/x86/include/asm/uaccess.h:38:28: note: in definition of macro 'untagged_addr'
38 | __addr &= (mm)->context.untag_mask | sign; \
| ^~

Caused by commit

062c9b2996e9 ("mm: Pass down mm_struct to untagged_addr()")

interacting with commit

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

from Linus' tree.

I have applied the following merge fix patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 5 Dec 2022 11:55:52 +1100
Subject: [PATCH] fix up for "mm: Pass down mm_struct to untagged_addr()"

interacting with "v4l2: don't fall back to follow_pfn() if pin_user_pages_fast() fails"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/media/common/videobuf2/frame_vector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/common/videobuf2/frame_vector.c b/drivers/media/common/videobuf2/frame_vector.c
index 18124929b18d..13455a76a37e 100644
--- a/drivers/media/common/videobuf2/frame_vector.c
+++ b/drivers/media/common/videobuf2/frame_vector.c
@@ -43,7 +43,7 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
if (WARN_ON_ONCE(nr_frames > vec->nr_allocated))
nr_frames = vec->nr_allocated;

- start = untagged_addr(mm, start);
+ start = untagged_addr(current->mm, start);

ret = pin_user_pages_fast(start, nr_frames,
FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM,
--
2.35.1

--
Cheers,
Stephen Rothwell

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