Re: Free a list_head

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/17/06, Fernando Apesteguía <fernando.apesteguia@xxxxxxxxx> wrote:
Umm I read linux kernel development and took a look at the example for using
semaphores. But I still have the same problem.

retval = down_interruptible(&process_lock);

        if (!retval) {
                /*We need also to initialize the call_list list */

                list_for_each_entry_safe(p, my_node, &nodeList, list) {
                        list_del(&my_node->list);
Change it to &p->list
Read Linux Device drivers 3ed. Page 299.
For reference look into some working, in kernel driver sources (e.g:
linux-2.6.16/drivers/char/drm/drm_context.c)

HTH.
Om.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux