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

From: Stephen Rothwell
Date: Mon May 25 2020 - 08:17:08 EST


Hi all,

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

In file included from include/linux/kernel.h:14,
from mm/gup.c:2:
mm/gup.c: In function 'internal_get_user_pages_fast':
mm/gup.c:2732:33: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
2732 | might_lock_read(&current->mm->mmap_sem);
| ^~~~~~~~

Caused by commit

64fe66e8a95e ("mmap locking API: rename mmap_sem to mmap_lock")

fron the akpm tree interacting with commit

b1fc8b5ddb4e ("mm/gup: might_lock_read(mmap_sem) in get_user_pages_fast()")

from the akpm-current tree.

I added the following patch for today.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Mon, 25 May 2020 22:11:51 +1000
Subject: [PATCH] mm/gup: update for mmap_sem rename

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
mm/gup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/gup.c b/mm/gup.c
index 8977e5fe9843..f4bca3de0b4b 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2729,7 +2729,7 @@ static int internal_get_user_pages_fast(unsigned long start, int nr_pages,
return -EINVAL;

if (!(gup_flags & FOLL_FAST_ONLY))
- might_lock_read(&current->mm->mmap_sem);
+ might_lock_read(&current->mm->mmap_lock);

start = untagged_addr(start) & PAGE_MASK;
addr = start;
--
2.26.2

--
Cheers,
Stephen Rothwell

Attachment: pgpjpK02jtBOE.pgp
Description: OpenPGP digital signature