svn commit: r293688 - stable/10/sys/kern
Edward Tomasz Napierala
trasz at FreeBSD.org
Mon Jan 11 19:59:57 UTC 2016
Author: trasz
Date: Mon Jan 11 19:59:56 2016
New Revision: 293688
URL: https://svnweb.freebsd.org/changeset/base/293688
Log:
MFC r289111:
Provide better debug message on kernel module name clash.
Sponsored by: The FreeBSD Foundation
Modified:
stable/10/sys/kern/kern_module.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/kern/kern_module.c
==============================================================================
--- stable/10/sys/kern/kern_module.c Mon Jan 11 19:36:44 2016 (r293687)
+++ stable/10/sys/kern/kern_module.c Mon Jan 11 19:59:56 2016 (r293688)
@@ -158,16 +158,12 @@ module_register(const moduledata_t *data
newmod = module_lookupbyname(data->name);
if (newmod != NULL) {
MOD_XUNLOCK;
- printf("module_register: module %s already exists!\n",
- data->name);
+ printf("%s: cannot register %s from %s; already loaded from %s\n",
+ __func__, data->name, container->filename, newmod->file->filename);
return (EEXIST);
}
namelen = strlen(data->name) + 1;
newmod = malloc(sizeof(struct module) + namelen, M_MODULE, M_WAITOK);
- if (newmod == NULL) {
- MOD_XUNLOCK;
- return (ENOMEM);
- }
newmod->refs = 1;
newmod->id = nextid++;
newmod->name = (char *)(newmod + 1);
More information about the svn-src-stable
mailing list