From: "Vamsi Krishna S ." <vamsi@in.ibm.com>
To: rusty@rustcorp.com.au
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: [BUG] module-init-tools 0.9.3, rmmod modules with '-'
Date: Mon, 16 Dec 2002 16:36:34 +0530 [thread overview]
Message-ID: <20021216163634.A29099@in.ibm.com> (raw)
Hi Rusty,
It seems we cannot unload modules if they have a '-' in their name.
filename2modname() in rmmod.c converts a '-' in the filename
to '_'. Why? Are dashes not allowed as part of module names?
For eg: (kernel 2.5.52/module-init-tools 0.9.3)
[root@llm10 test-modules]# ./insmod probe-test.o
[root@llm10 test-modules]# ./lsmod
Module Size Used by
probe-test 943 0
[root@llm10 test-modules]# cat /proc/modules
probe-test 943 0
[root@llm10 test-modules]# ./rmmod -V
module-init-tools version 0.9.3
[root@llm10 test-modules]# ./rmmod probe-test
ERROR: Module probe_test does not exist in /proc/modules
^note this
Editing filename2modname() to remove this special test for
'-' seems to fix it. But, this is done explicitly, so
I wonder if there is a deeper meaning to this. Can you
please take a look and explain?
Thanks,
Vamsi.
--
Vamsi Krishna S.
Linux Technology Center,
IBM Software Lab, Bangalore.
Ph: +91 80 5044959
Internet: vamsi@in.ibm.com
--
--- rmmod-old.c 2002-12-13 21:11:57.000000000 +0530
+++ rmmod.c 2002-12-13 21:10:44.000000000 +0530
@@ -157,9 +157,12 @@
else
afterslash++;
- /* stop at first . */
+ /* Convert to underscores, stop at first . */
for (i = 0; afterslash[i] && afterslash[i] != '.'; i++) {
- modname[i] = afterslash[i];
+ if (afterslash[i] == '-')
+ modname[i] = '_';
+ else
+ modname[i] = afterslash[i];
}
modname[i] = '\0';
}
next reply other threads:[~2002-12-16 10:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-16 11:06 Vamsi Krishna S . [this message]
2002-12-16 21:36 ` [BUG] module-init-tools 0.9.3, rmmod modules with '-' Rusty Russell
2002-12-16 23:39 ` Zwane Mwaikambo
2002-12-17 0:17 ` Rusty Russell
2002-12-17 6:18 ` Vamsi Krishna S .
2002-12-18 0:23 ` Rusty Russell
2002-12-18 17:47 ` Kai Germaschewski
2002-12-19 0:39 ` Rusty Russell
2002-12-19 7:11 ` Vamsi Krishna S .
-- strict thread matches above, loose matches on Subject: below --
2002-12-17 6:55 Osamu Tomita
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=20021216163634.A29099@in.ibm.com \
--to=vamsi@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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