From: youling 257 <youling257@gmail.com>
To: walken@google.com
Cc: Liam.Howlett@oracle.com, akpm@linux-foundation.org,
daniel.m.jordan@oracle.com, dave@stgolabs.net, hughd@google.com,
jgg@ziepe.ca, jglisse@redhat.com, jhubbard@nvidia.com,
ldufour@linux.ibm.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, peterz@infradead.org, rientjes@google.com,
vbabka@suse.cz, willy@infradead.org, yinghan@google.com,
youling257 <youling257@gmail.com>
Subject: Re: [PATCH v6 10/12] mmap locking API: rename mmap_sem to mmap_lock
Date: Thu, 4 Jun 2020 12:35:06 +0800 [thread overview]
Message-ID: <CAOzgRdZQjuDfA1wa9AGYjRa-mNWbTNQNCOS60eHzDLeW9WCXpg@mail.gmail.com> (raw)
I have build error about kernel/sys.c,
kernel/sys.c: In function ‘prctl_set_vma’:
kernel/sys.c:2392:18: error:
‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean
‘mmap_base’?
2392 | down_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
kernel/sys.c:2402:16: error:
‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean
‘mmap_base’?
2402 | up_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
why not rename kernel/sys.c mmap_sem to mmap_lock?
diff --git a/kernel/sys.c b/kernel/sys.c
index 113955fe1c6b..043c04a745a9 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2389,7 +2389,7 @@ static int prctl_set_vma(unsigned long opt,
unsigned long start,
if (end == start)
return 0;
- down_write(&mm->mmap_sem);
+ down_write(&mm->mmap_lock);
switch (opt) {
case PR_SET_VMA_ANON_NAME:
@@ -2399,7 +2399,7 @@ static int prctl_set_vma(unsigned long opt,
unsigned long start,
error = -EINVAL;
}
- up_write(&mm->mmap_sem);
+ up_write(&mm->mmap_lock);
return error;
}
next reply other threads:[~2020-06-04 4:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 4:35 youling 257 [this message]
2020-06-04 5:57 ` Michel Lespinasse
2020-06-04 8:06 ` youling 257
2020-06-04 8:16 ` youling 257
2020-06-04 8:38 ` Michel Lespinasse
2020-06-13 4:44 ` youling 257
-- strict thread matches above, loose matches on Subject: below --
2020-05-20 5:28 [PATCH v6 00/12] Add a new mmap locking API wrapping mmap_sem calls Michel Lespinasse
2020-05-20 5:29 ` [PATCH v6 10/12] mmap locking API: rename mmap_sem to mmap_lock Michel Lespinasse
2020-05-22 14:16 ` Davidlohr Bueso
2020-05-29 20:42 ` Daniel Jordan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOzgRdZQjuDfA1wa9AGYjRa-mNWbTNQNCOS60eHzDLeW9WCXpg@mail.gmail.com \
--to=youling257@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=daniel.m.jordan@oracle.com \
--cc=dave@stgolabs.net \
--cc=hughd@google.com \
--cc=jgg@ziepe.ca \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=ldufour@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=walken@google.com \
--cc=willy@infradead.org \
--cc=yinghan@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox