Acquire Giant in link() so that we can mark it as MSTD in

syscalls.master.  Don't want to do it in kern_link() since the
Linux emulation code calls kern_link() after performing other
actions requiring Giant.
This commit is contained in:
Robert Watson 2004-06-22 04:29:07 +00:00
parent 537ca45a2e
commit 694b21cf7b
2 changed files with 10 additions and 2 deletions

View File

@ -1338,8 +1338,12 @@ link(td, uap)
char *link;
} */ *uap;
{
int error;
return (kern_link(td, uap->path, uap->link, UIO_USERSPACE));
mtx_lock(&Giant);
error = kern_link(td, uap->path, uap->link, UIO_USERSPACE);
mtx_unlock(&Giant);
return (error);
}
SYSCTL_DECL(_security_bsd);

View File

@ -1338,8 +1338,12 @@ link(td, uap)
char *link;
} */ *uap;
{
int error;
return (kern_link(td, uap->path, uap->link, UIO_USERSPACE));
mtx_lock(&Giant);
error = kern_link(td, uap->path, uap->link, UIO_USERSPACE);
mtx_unlock(&Giant);
return (error);
}
SYSCTL_DECL(_security_bsd);