Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1ec419d8
Commit
1ec419d8
authored
Feb 13, 2015
by
Andrea Arcangeli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userfaultfd: add vm_userfaultfd_ctx to the vm_area_struct
This adds the vm_userfaultfd_ctx to the vm_area_struct.
parent
c6bb4e14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
include/linux/mm_types.h
include/linux/mm_types.h
+11
-0
kernel/fork.c
kernel/fork.c
+1
-0
No files found.
include/linux/mm_types.h
View file @
1ec419d8
...
...
@@ -247,6 +247,16 @@ struct vm_region {
* this region */
};
#ifdef CONFIG_USERFAULTFD
#define NULL_VM_UFFD_CTX ((struct vm_userfaultfd_ctx) { NULL, })
struct
vm_userfaultfd_ctx
{
struct
userfaultfd_ctx
*
ctx
;
};
#else
/* CONFIG_USERFAULTFD */
#define NULL_VM_UFFD_CTX ((struct vm_userfaultfd_ctx) {})
struct
vm_userfaultfd_ctx
{};
#endif
/* CONFIG_USERFAULTFD */
/*
* This struct defines a memory VMM memory area. There is one of these
* per VM-area/task. A VM area is any part of the process virtual memory
...
...
@@ -313,6 +323,7 @@ struct vm_area_struct {
#ifdef CONFIG_NUMA
struct
mempolicy
*
vm_policy
;
/* NUMA policy for the VMA */
#endif
struct
vm_userfaultfd_ctx
vm_userfaultfd_ctx
;
};
struct
core_thread
{
...
...
kernel/fork.c
View file @
1ec419d8
...
...
@@ -451,6 +451,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
goto
fail_nomem_anon_vma_fork
;
tmp
->
vm_flags
&=
~
VM_LOCKED
;
tmp
->
vm_next
=
tmp
->
vm_prev
=
NULL
;
tmp
->
vm_userfaultfd_ctx
=
NULL_VM_UFFD_CTX
;
file
=
tmp
->
vm_file
;
if
(
file
)
{
struct
inode
*
inode
=
file_inode
(
file
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment