[lkml]   [2003]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
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.


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;
- 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
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:49    [W:0.021 / U:5.512 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site