Lock Giant around a call to userland_sysctl() in ibcs2_sysi86().

Approved by:	re (scottl)
This commit is contained in:
John Baldwin 2005-07-07 19:30:30 +00:00
parent e9ccc53c63
commit a3b324f003
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147822

View File

@ -31,6 +31,8 @@
__FBSDID("$FreeBSD$"); __FBSDID("$FreeBSD$");
#include <sys/param.h> #include <sys/param.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/systm.h> #include <sys/systm.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
@ -78,8 +80,11 @@ ibcs2_sysi86(struct thread *td, struct ibcs2_sysi86_args *args)
return (error); return (error);
name[0] = CTL_KERN; name[0] = CTL_KERN;
name[1] = KERN_HOSTNAME; name[1] = KERN_HOSTNAME;
return (userland_sysctl(td, name, 2, 0, 0, 0, mtx_lock(&Giant);
args->arg, 7, 0, 0)); error = userland_sysctl(td, name, 2, 0, 0, 0,
args->arg, 7, 0, 0);
mtx_unlock(&Giant);
return (error);
} }
case SI86_MEM: /* size of physical memory */ case SI86_MEM: /* size of physical memory */