All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <randy.dunlap@verizon.net>
To: linux-kernel@vger.kernel.org
Subject: [trivial] module.c double init?
Date: Wed, 23 Oct 2002 20:53:36 -0700	[thread overview]
Message-ID: <3DB76EC0.F9EB4A36@verizon.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

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.
It's just a thinko, right?  or am I missing something?

Patch attached (to 2.5.44).

~Randy

[-- Attachment #2: module-dblinit-2544.patch --]
[-- Type: text/plain, Size: 358 bytes --]

--- ./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;

                 reply	other threads:[~2002-10-24  3:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DB76EC0.F9EB4A36@verizon.net \
    --to=randy.dunlap@verizon.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.