diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 5b62aa0a2b..6278655574 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -747,7 +747,10 @@ int load_flt_binary(struct linux_binprm *bprm, struct image_info *info) stack_len += (bprm->envc + 1) * 4; /* the envp array */ + mmap_lock(); res = load_flat_file(bprm, libinfo, 0, &stack_len); + mmap_unlock(); + if (is_error(res)) { return res; }