mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: Loading a module multtiple times
Date: Thu, 01 May 2003 12:12:12 +1000	[thread overview]
Message-ID: <20030501050235.045232C051@lists.samba.org> (raw)
In-Reply-To: Your message of "Wed, 30 Apr 2003 14:05:57 MST." <20030430140557.12e13f1a.rddunlap@osdl.org>

In message <20030430140557.12e13f1a.rddunlap@osdl.org> you write:
> 
> Hi Rusty-
> 
> I was looking into a bug in /proc/net/dev truncated output.
> /proc/net/dev lists {if (!buggy)} all loaded network interfaces.
> 
> To get a large number of network interfaces, Christian (below)
> told me to copy driver/net/dummy.o to several different file names
> and then insmod them.  It seems to have worked for him, and it works
> that way in 2.4.recent, but it's not working for me.  See error
> messages below.
> 
> Which way is expected behavior?
> What should be the expected behavior?
> or am I just seeing bugs (failures) that noone else sees?

No, it's a 2.5 thing: modules know their own name.  This is because
(1) the names are used to set new-style boot parameters, (2) needing
to insert two modules is usually wrong, since how would that work if
the module was built-in?

It also opens us up to the possibility of a list of built-in modules,
if we wanted to.

However, the -o option to modprobe replaces the module name (by
hacking the elf object, yes), because programmers are basically lazy,
and multiple modules are useful for testing.

So, you want:
	for i in `seq 1 100`; do modprobe -o dummy$i dummy; done

This works on 2.4 as well.  Note that insmod doesn't support -o, being
a trivial program by design.

> It seems like not supporting this is likely to cause some problems.

Yes.  Removing any feature causes problems 8(.  But adding every
feature is usually worse.

Hope this clarifies?
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  parent reply	other threads:[~2003-05-01  4:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-30 21:05 Randy.Dunlap
2003-04-30 22:42 ` Kai Germaschewski
2003-05-01  2:12 ` Rusty Russell [this message]
2003-05-01  5:10   ` Randy.Dunlap
2003-05-01  6:22     ` Rusty Russell
2003-05-01 10:09       ` Alan Cox
2003-04-30 21:59 Chuck Ebbert
2003-05-01 11:54 Chuck Ebbert

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=20030501050235.045232C051@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®