Messages in this thread Patch in this message | | | Date | Sat, 4 Oct 2003 15:58:00 +0200 (MEST) | From | Mikael Pettersson <> | Subject | [PATCH][2.6.0-test6] fix drivers/char/misc.c module autoloading breakage |
| |
drivers/char/misc.c was changed in 2.6.0-test6 to use the common list macros instead of its own list code. The first open does load the module and increment its use count, but a bug in test6 causes a failure to be reported anyway. This (1) signals an error to user-space where there is none, and (2) makes the module non-unloadable.
Fixed by the patch below. Tested. Please apply.
/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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |