A very nice way to get a system into trouble is to forget removing a proc file in the cleanup_module of a kernel module. So anything created with any of the calls above needs a remove_proc_entry in cleanup_module. The symptom of forgetting this is that ls -l /proc results in a segmentation fault.
extern void *remove_proc_entry( const char *name, struct proc_dir_entry *parent);
remove_proc_entry returns void. There seems to be no simple way to detect failures of remove_proc_entry. proc entries have to be removed in reverse order to creation.