NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/45125: Kernel object loader can't detect duplication of global symbol
>Number: 45125
>Category: kern
>Synopsis: Kernel object loader can't detect duplication of global symbol
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jul 08 02:35:00 +0000 2011
>Originator: Akinobu Mita
>Release:
>Organization:
Fixstars
>Environment:
>Description:
The kernel object loader checks duplication of global symbol with already
loaded objects in sys/kern/subr_kobject.c:kobj_checksyms(). But the check
doesn't work very well.
>How-To-Repeat:
>Fix:
Looks like the fix is trivial. Also remove trailing \n in error
message because kobj_error() appends \n.
--- subr_kobj.c.orig 2011-07-08 10:55:12.000000000 +0900
+++ subr_kobj.c 2011-07-08 10:56:28.000000000 +0900
@@ -861,10 +861,10 @@ kobj_checksyms(kobj_t ko, bool undefined
strcmp(name, "__end") == 0 ||
strcmp(name, "__end__") == 0 ||
strncmp(name, "__start_link_set_", 17) == 0 ||
- strncmp(name, "__stop_link_set_", 16)) {
+ strncmp(name, "__stop_link_set_", 16) == 0) {
continue;
}
- kobj_error("global symbol `%s' redefined\n", name);
+ kobj_error("global symbol `%s' redefined", name);
error = ENOEXEC;
}
Home |
Main Index |
Thread Index |
Old Index