diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 05:27:25 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 05:27:25 +0000 |
commit | c9c06167e7933d93a6e396174c68abf242294abb (patch) | |
tree | d9a8bb30663e9a3405a1ef37ffb62bc14b9f019f /kernel/module.c | |
parent | f79e8cc3c34e4192a3e5ef4cc9c6542fdef703c0 (diff) |
Merge with Linux 2.4.0-test12.
Diffstat (limited to 'kernel/module.c')
-rw-r--r-- | kernel/module.c | 13 |
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; } |