[PATCH] <trivial> module.c double init

Randy.Dunlap (rddunlap@osdl.org)
Sat, 26 Oct 2002 20:21:34 -0700 (PDT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

--------------343A2A36B592C87E961DF027
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.LNX.4.33L2.0210262018292.30019@dragon.pdx.osdl.net>

in 2.5.44: kernel/module.c, function s_start(), there is:
loff_t n = *pos;

and then same "n = *pos" is done in the for-loop initializer.

Patch attached (to 2.5.44). Please apply. 8:)

~Randy

--------------343A2A36B592C87E961DF027
Content-Type: TEXT/PLAIN; CHARSET=us-ascii; NAME="module-dblinit-2544.patch"
Content-ID: <Pine.LNX.4.33L2.0210262018293.30019@dragon.pdx.osdl.net>
Content-Description:
Content-Disposition: INLINE; FILENAME="module-dblinit-2544.patch"

--- ./kernel/module.c.fixit Fri Oct 18 21:01:17 2002
+++ ./kernel/module.c Wed Oct 23 19:54:10 2002
@@ -1165,7 +1165,7 @@
if (!p)
return ERR_PTR(-ENOMEM);
lock_kernel();
- for (v = module_list, n = *pos; v; n -= v->nsyms, v = v->next) {
+ for (v = module_list; v; n -= v->nsyms, v = v->next) {
if (n < v->nsyms) {
p->mod = v;
p->index = n;

--------------343A2A36B592C87E961DF027--
-
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/