patch-2.4.0-test12 linux/kernel/module.c
Next file: linux/kernel/sched.c
Previous file: linux/kernel/ksyms.c
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Mon Nov 27 17:38:07 2000
- Orig file:
v2.4.0-test11/linux/kernel/module.c
- Orig date:
Sun Nov 19 18:44:23 2000
diff -u --recursive --new-file v2.4.0-test11/linux/kernel/module.c linux/kernel/module.c
@@ -100,7 +100,8 @@
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 @@
}
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 @@
}
}
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 @@
/* 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;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)