diff --git a/sys/i386/ibcs2/ibcs2_sysi86.c b/sys/i386/ibcs2/ibcs2_sysi86.c index 179cd6336473..12321d1ea0e0 100644 --- a/sys/i386/ibcs2/ibcs2_sysi86.c +++ b/sys/i386/ibcs2/ibcs2_sysi86.c @@ -31,6 +31,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include @@ -78,8 +80,11 @@ ibcs2_sysi86(struct thread *td, struct ibcs2_sysi86_args *args) return (error); name[0] = CTL_KERN; name[1] = KERN_HOSTNAME; - return (userland_sysctl(td, name, 2, 0, 0, 0, - args->arg, 7, 0, 0)); + mtx_lock(&Giant); + 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 */