Product: Red Hat Enterprise Linux 7
https://bugzilla.redhat.com/show_bug.cgi?id=922201
Bug ID: 922201
Summary: rmmod confused by built-ins
Product: Red Hat Enterprise Linux 7
Version: 7.0
Component: kmod
Severity: medium
Priority: medium
Assignee: kay(a)redhat.com
Reporter: bmr(a)redhat.com
CC: gansalmon(a)Gmail.com, itamar(a)ispbrasil.com.br,
jonathan(a)jonmasters.org, kernel-maint(a)redhat.com,
kmod-maint(a)lists.fedoraproject.org,
madhu.chinakonda(a)gmail.com, msivak(a)redhat.com
Depends On: 922187
+++ This bug was initially created as a clone of Bug #922187 +++
Description of problem:
Attempting to rmmod something that's not actually built as a module now gives a
slightly confusing error:
# rmmod loop
libkmod: kmod_module_get_holders: could not open '/sys/module/loop/holders': No
such file or directory
Error: Module loop is in use
Previously rmmod from module-init-tools gave a still vague but better "not
found" message:
# rmmod ext2
ERROR: Module ext2 does not exist in /proc/modules
Version-Release number of selected component (if applicable):
kmod-*
How reproducible:
100%
Steps to Reproduce:
1. compile something that can be built as a module as a built-in
2. rmmod $thing
Actual results:
# rmmod loop
libkmod: kmod_module_get_holders: could not open '/sys/module/loop/holders': No
such file or directory
Error: Module loop is in use
Which isn't really true: it's not in use, it's simply built in to vmlinuz so
unloading makes no sense.
Expected results:
modprobe does the right thing:
# modprobe -r loop
FATAL: Module loop is builtin.
Additional info:
I know rmmod is the low-level tool and users should be using modprobe -r (or
just not messing with this in the first place.. :) but knowledge of modprobe to
load and rmmod to unload seems much more widespread among admins and the
current behaviour looks at first like a kernel bug (if you didn't realise that
there are paths directories missing in /sys/modules/$thing and the module name
isn't present in /proc/modules you might think some refcount was broken etc.).
--- Additional comment from Bryn M. Reeves on 2013-03-15 13:12:04 EDT ---
Error is slightly different from 0:12-1.fc18 but same basic problem:
# rmmod loop
rmmod: ERROR: could not open '/sys/module/loop/holders': No such file or
directory
rmmod: ERROR: Module loop is in use
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug
https://bugzilla.redhat.com/token.cgi?t=NR8Odg50eP&a=cc_unsubscribe