Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
nexedi
linux
Commits
7696e0c3
Commit
7696e0c3
authored
12 years ago
by
Al Viro
Browse files
Options
Download
Email Patches
Plain Diff
binfmt_flat: use vm_munmap, we are missing ->mmap_sem there
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
5a5e4c2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
fs/binfmt_flat.c
fs/binfmt_flat.c
+4
-4
No files found.
fs/binfmt_flat.c
View file @
7696e0c3
...
...
@@ -562,7 +562,7 @@ static int load_flat_file(struct linux_binprm * bprm,
realdatastart
=
(
unsigned
long
)
-
ENOMEM
;
printk
(
"Unable to allocate RAM for process data, errno %d
\n
"
,
(
int
)
-
realdatastart
);
do
_munmap
(
current
->
mm
,
textpos
,
text_len
);
vm
_munmap
(
textpos
,
text_len
);
ret
=
realdatastart
;
goto
err
;
}
...
...
@@ -586,8 +586,8 @@ static int load_flat_file(struct linux_binprm * bprm,
}
if
(
IS_ERR_VALUE
(
result
))
{
printk
(
"Unable to read data+bss, errno %d
\n
"
,
(
int
)
-
result
);
do
_munmap
(
current
->
mm
,
textpos
,
text_len
);
do
_munmap
(
current
->
mm
,
realdatastart
,
len
);
vm
_munmap
(
textpos
,
text_len
);
vm
_munmap
(
realdatastart
,
len
);
ret
=
result
;
goto
err
;
}
...
...
@@ -654,7 +654,7 @@ static int load_flat_file(struct linux_binprm * bprm,
}
if
(
IS_ERR_VALUE
(
result
))
{
printk
(
"Unable to read code+data+bss, errno %d
\n
"
,(
int
)
-
result
);
do
_munmap
(
current
->
mm
,
textpos
,
text_len
+
data_len
+
extra
+
vm
_munmap
(
textpos
,
text_len
+
data_len
+
extra
+
MAX_SHARED_LIBS
*
sizeof
(
unsigned
long
));
ret
=
result
;
goto
err
;
...
...
This diff is collapsed.
Click to expand it.
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