summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c
index e89149de9..dd02b40cd 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -100,7 +100,8 @@ void inter_module_register(const char *im_name, struct module *owner, const void
spin_unlock(&ime_lock);
kfree(ime_new);
/* Program logic error, fatal */
- panic("inter_module_register: duplicate im_name '%s'", im_name);
+ printk(KERN_ERR "inter_module_register: duplicate im_name '%s'", im_name);
+ BUG();
}
}
list_add(&(ime_new->list), &ime_list);
@@ -140,7 +141,8 @@ void inter_module_unregister(const char *im_name)
}
else {
/* Program logic error, fatal */
- panic("inter_module_unregister: no entry for '%s'", im_name);
+ printk(KERN_ERR "inter_module_unregister: no entry for '%s'", im_name);
+ BUG();
}
}
@@ -211,7 +213,8 @@ void inter_module_put(const char *im_name)
}
}
spin_unlock(&ime_lock);
- panic("inter_module_put: no entry for '%s'", im_name);
+ printk(KERN_ERR "inter_module_put: no entry for '%s'", im_name);
+ BUG();
}
@@ -480,7 +483,9 @@ sys_init_module(const char *name_user, struct module *mod_user)
/* Ok, that's about all the sanity we can stomach; copy the rest. */
- if (copy_from_user(mod+1, mod_user+1, mod->size-sizeof(*mod))) {
+ if (copy_from_user((char *)mod+mod_user_size,
+ (char *)mod_user+mod_user_size,
+ mod->size-mod_user_size)) {
error = -EFAULT;
goto err3;
}