Take the lock shared in linker_search_symbol_name.

This helps sysctl kern.proc.stack.
This commit is contained in:
Mateusz Guzik 2014-10-21 21:29:20 +00:00
parent 12e2a30ef9
commit 2afec8edfc

View File

@ -986,9 +986,9 @@ linker_search_symbol_name(caddr_t value, char *buf, u_int buflen,
{
int error;
sx_xlock(&kld_sx);
sx_slock(&kld_sx);
error = linker_debug_search_symbol_name(value, buf, buflen, offset);
sx_xunlock(&kld_sx);
sx_sunlock(&kld_sx);
return (error);
}