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:
parent
537ca45a2e
commit
694b21cf7b
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user