1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Add a cleanup function to destroy the osname_lock and call it on module

unload.

Submitted by:	gallatin
Reported by:	Martin Karlsson <mk-freebsd@bredband.net>
This commit is contained in:
John Baldwin 2003-03-26 18:29:44 +00:00
parent 0c0bdf85fa
commit 35eb8c5aa2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112682
4 changed files with 11 additions and 0 deletions

View File

@ -264,6 +264,7 @@ linux_elf_modevent(module_t mod, int type, void *data)
linux_ioctl_unregister_handler(*lihp);
if (bootverbose)
printf("Linux ELF exec handler removed\n");
linux_mib_destroy();
} else
printf("Could not deinstall ELF interpreter entry\n");
break;

View File

@ -148,6 +148,13 @@ linux_get_prison(struct thread *td)
return (pr);
}
void
linux_mib_destroy(void)
{
mtx_destroy(&osname_lock);
}
void
linux_get_osname(struct thread *td, char *dst)
{

View File

@ -31,6 +31,8 @@
#ifndef _LINUX_MIB_H_
#define _LINUX_MIB_H_
void linux_mib_destroy(void);
void linux_get_osname(struct thread *td, char *dst);
int linux_set_osname(struct thread *td, char *osname);

View File

@ -925,6 +925,7 @@ linux_elf_modevent(module_t mod, int type, void *data)
linux_ioctl_unregister_handler(*lihp);
if (bootverbose)
printf("Linux ELF exec handler removed\n");
linux_mib_destroy();
} else
printf("Could not deinstall ELF interpreter entry\n");
break;