diff options
author | jhb <jhb@FreeBSD.org> | 2005-06-24 17:41:28 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-06-24 17:41:28 +0000 |
commit | 0a8b4194dc9bd96f74d83e1051d82e94d1815a80 (patch) | |
tree | 59b772f10a234fb0e5721fb72fe72c64f067a2d3 /sys/amd64 | |
parent | dacb5026fc879768faef2ca5e6ddf1f16de40dd9 (diff) | |
download | FreeBSD-src-0a8b4194dc9bd96f74d83e1051d82e94d1815a80.zip FreeBSD-src-0a8b4194dc9bd96f74d83e1051d82e94d1815a80.tar.gz |
Correct the amount of data to allocate in these local copies of
exec_copyin_strings() to catch up to rev 1.266 of kern_exec.c. This fixes
panics on amd64 with compat binaries since exec_free_args() was freeing
more memory than these functions were allocating and the mismatch could
cause memory to be freed out from under other concurrent execs.
Approved by: re (scottl)
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/linux32/linux32_machdep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index fa15b24..7f738bb 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -113,7 +113,8 @@ linux_exec_copyin_args(struct image_args *args, char *fname, * Allocate temporary demand zeroed space for argument and * environment strings */ - args->buf = (char *) kmem_alloc_wait(exec_map, PATH_MAX + ARG_MAX); + args->buf = (char *) kmem_alloc_wait(exec_map, + PATH_MAX + ARG_MAX + MAXSHELLCMDLEN); if (args->buf == NULL) return (ENOMEM); args->begin_argv = args->buf; |