summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-02-23 14:54:57 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-23 14:54:57 -0800
commitdfff0a0671baf4e69fc676bf8150635407548288 (patch)
treea477399030ef79029b7c8ef064a2695ea5f07c56 /kernel/module.c
parent82f0cf9b7c42684c29189ddb6d0bc86eb1137fc4 (diff)
downloadlinux-dfff0a0671baf4e69fc676bf8150635407548288.tar.bz2
Revert "Driver core: let request_module() send a /sys/modules/kmod/-uevent"
This reverts commit c353c3fb0700a3c17ea2b0237710a184232ccd7f. It turns out that we end up with a loop trying to load the unix module and calling netfilter to do that. Will redo the patch later to not have this loop. Acked-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 1ecf08106381..f77e893e4620 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -653,11 +653,20 @@ static void wait_for_zero_refcount(struct module *mod)
mutex_lock(&module_mutex);
}
-int delete_module(const char *name, unsigned int flags)
+asmlinkage long
+sys_delete_module(const char __user *name_user, unsigned int flags)
{
struct module *mod;
+ char name[MODULE_NAME_LEN];
int ret, forced = 0;
+ if (!capable(CAP_SYS_MODULE))
+ return -EPERM;
+
+ if (strncpy_from_user(name, name_user, MODULE_NAME_LEN-1) < 0)
+ return -EFAULT;
+ name[MODULE_NAME_LEN-1] = '\0';
+
if (mutex_lock_interruptible(&module_mutex) != 0)
return -EINTR;
@@ -718,21 +727,6 @@ int delete_module(const char *name, unsigned int flags)
return ret;
}
-asmlinkage long
-sys_delete_module(const char __user *name_user, unsigned int flags)
-{
- char name[MODULE_NAME_LEN];
-
- if (!capable(CAP_SYS_MODULE))
- return -EPERM;
-
- if (strncpy_from_user(name, name_user, MODULE_NAME_LEN-1) < 0)
- return -EFAULT;
- name[MODULE_NAME_LEN-1] = '\0';
-
- return delete_module(name, flags);
-}
-
static void print_unload_info(struct seq_file *m, struct module *mod)
{
struct module_use *use;