mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Lock Giant around a call to userland_sysctl() in ibcs2_sysi86().
Approved by: re (scottl)
This commit is contained in:
parent
e9ccc53c63
commit
a3b324f003
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147822
@ -31,6 +31,8 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user