Re: RFC: changes to microcode update driver.

From: Mikael Pettersson
Date: Wed Oct 08 2003 - 05:08:46 EST


Tigran Aivazian writes:
> The patch was almost ready (together with Intel's changes) but I
> discovered that microcode module (or in fact ANY module that is loaded
> first on my system, 2.6.0-test6) is not unloadable, i.e. usage count stays
> at 1 even though nothing is using it. I am not aware of this general

Maybe unrelated, but 2.6.0-test6 has a bug in drivers/char/misc.c's
module autoloading code, which causes device open() failures, and
subsequent unloading failures due to the usage count being 1 too high.

I posted the fix below, and Linus included it in a recent -bk snapshot.

/Mikael

diff -ruN linux-2.6.0-test6/drivers/char/misc.c linux-2.6.0-test6.char-misc-fix/drivers/char/misc.c
--- linux-2.6.0-test6/drivers/char/misc.c 2003-09-28 12:19:40.000000000 +0200
+++ linux-2.6.0-test6.char-misc-fix/drivers/char/misc.c 2003-10-04 14:55:45.000000000 +0200
@@ -157,12 +157,11 @@
list_for_each_entry(c, &misc_list, list) {
if (c->minor == minor) {
new_fops = fops_get(c->fops);
- if (!new_fops)
- goto fail;
break;
}
}
- goto fail;
+ if (!new_fops)
+ goto fail;
}

err = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/