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
nexedi
linux
Commits
70faa195
Commit
70faa195
authored
Jan 04, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't allow mremap of zero-sized areas.
parent
e37d5b22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
mm/mremap.c
mm/mremap.c
+4
-0
No files found.
mm/mremap.c
View file @
70faa195
...
@@ -315,6 +315,10 @@ unsigned long do_mremap(unsigned long addr,
...
@@ -315,6 +315,10 @@ unsigned long do_mremap(unsigned long addr,
old_len
=
PAGE_ALIGN
(
old_len
);
old_len
=
PAGE_ALIGN
(
old_len
);
new_len
=
PAGE_ALIGN
(
new_len
);
new_len
=
PAGE_ALIGN
(
new_len
);
/* Don't allow the degenerate cases */
if
(
!
(
old_len
|
new_len
))
goto
out
;
/* new_addr is only valid if MREMAP_FIXED is specified */
/* new_addr is only valid if MREMAP_FIXED is specified */
if
(
flags
&
MREMAP_FIXED
)
{
if
(
flags
&
MREMAP_FIXED
)
{
if
(
new_addr
&
~
PAGE_MASK
)
if
(
new_addr
&
~
PAGE_MASK
)
...
...
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