Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
ab4341a2
Commit
ab4341a2
authored
Jan 30, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kerndat: Close pagemap fd after getting zero page pfn
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
af510ae0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
kerndat.c
kerndat.c
+3
-1
No files found.
kerndat.c
View file @
ab4341a2
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include "sysctl.h"
#include "sysctl.h"
#include "asm/types.h"
#include "asm/types.h"
#include "cr_options.h"
#include "cr_options.h"
#include "util.h"
dev_t
kerndat_shmem_dev
;
dev_t
kerndat_shmem_dev
;
...
@@ -160,7 +161,7 @@ static int init_zero_page_pfn()
...
@@ -160,7 +161,7 @@ static int init_zero_page_pfn()
void
*
addr
;
void
*
addr
;
loff_t
off
;
loff_t
off
;
u64
pfn
;
u64
pfn
;
int
fd
;
int
fd
=
-
1
;
addr
=
mmap
(
NULL
,
PAGE_SIZE
,
PROT_READ
,
MAP_PRIVATE
|
MAP_ANONYMOUS
,
-
1
,
0
);
addr
=
mmap
(
NULL
,
PAGE_SIZE
,
PROT_READ
,
MAP_PRIVATE
|
MAP_ANONYMOUS
,
-
1
,
0
);
if
(
addr
==
MAP_FAILED
)
{
if
(
addr
==
MAP_FAILED
)
{
...
@@ -199,6 +200,7 @@ static int init_zero_page_pfn()
...
@@ -199,6 +200,7 @@ static int init_zero_page_pfn()
zero_page_pfn
=
pfn
;
zero_page_pfn
=
pfn
;
err:
err:
munmap
(
addr
,
PAGE_SIZE
);
munmap
(
addr
,
PAGE_SIZE
);
close_safe
(
&
fd
);
return
zero_page_pfn
?
0
:
-
1
;
return
zero_page_pfn
?
0
:
-
1
;
}
}
...
...
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