diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c index 40deced2cf01..42424d16b5fa 100644 --- a/sys/alpha/linux/linux_sysvec.c +++ b/sys/alpha/linux/linux_sysvec.c @@ -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; diff --git a/sys/compat/linux/linux_mib.c b/sys/compat/linux/linux_mib.c index 53fee72d54fe..9d908745888e 100644 --- a/sys/compat/linux/linux_mib.c +++ b/sys/compat/linux/linux_mib.c @@ -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) { diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index 42d9d899266b..b68e57fd3238 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -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); diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index c324f82837a4..f8cc10888454 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -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;