error in module.c

Jaroslav Kysela (perex@jcu.cz)
Sun, 3 May 1998 23:58:05 +0200 (MET DST)


Hi all!

Looks that get_module_symbol function in kernel/module.c is a little
bit broken (I checked only kernels from 2.1.95 - 2.1.99). This function
is working properly only in special case.

Jaroslav

Here is patch:

--- linux/kernel/module.c.old Sun May 3 22:01:09 1998
+++ linux/kernel/module.c Sun May 3 22:14:22 1998
@@ -961,7 +961,8 @@

for (mp = module_list; mp; mp = mp->next) {
if (((modname == NULL) || (strcmp(mp->name, modname) == 0)) &&
- (mp->flags == MOD_RUNNING) && (mp->nsyms > 0)) {
+ ((mp->flags & (MOD_RUNNING|MOD_DELETED)) == MOD_RUNNING) &&
+ (mp->nsyms > 0)) {
for (i = mp->nsyms, sym = mp->syms;
i > 0; --i, ++sym) {

-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu