On Friday 22 October 2004 14:55, Mauricio Lin wrote: > Hi all, > > I have tried to use some functions from list.h. > Below is the snippet of the code: > > list_for_each(tmp, &pidqueue_head) { > candidate = list_entry(tmp, struct > candidate_process, pid_list); > list_del(&candidate->pid_list); > } > > I am using this in a module, so this is executed when > I remove the module using rmmod module.ko and the > segmentation fault is printed on my screen. Try using list_for_each_safe instead of list_for_each. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/