aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_misc.c')
-rw-r--r--sys/compat/linux/linux_misc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 9989948c9772..e9fdccc38bb1 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -761,7 +761,9 @@ linux_newuname(struct thread *td, struct linux_newuname_args *args)
#else /* something other than i386 or amd64 - assume we and Linux agree */
strlcpy(utsname.machine, machine, LINUX_MAX_UTSNAME);
#endif /* __i386__ */
+ mtx_lock(&hostname_mtx);
strlcpy(utsname.domainname, domainname, LINUX_MAX_UTSNAME);
+ mtx_unlock(&hostname_mtx);
return (copyout(&utsname, args->buf, sizeof(utsname)));
}