On 8/26/05, Vincenzo Mallozzi <vinjunior@xxxxxxxx> wrote: > On Thursday 25 August 2005 05:15, Gaurav Dhiman wrote: > > I think you are not initializing the list element of page structure in > > above function, you need to do that before adding it to page list. If > > you are not doing it, just tey this, hope it will resolve your > > problem. > > > > Its the basic rule, do initialize all the elements of a structure > > before adding that to any global list. > > > > > list_add_tail(&page->list,&wr_vma->pages_list); > > > /* or list_del_init(page_list); */ > > > } > > > > > > > you need to do this all under the control of spinlocks, I hope you are > > doing that ...... > > I've skipped the problem by not adding or removing further elements to/from > the list. In fact, after the initialization I fill the list and then no > element is added/removed. I've not much time. > Also, I do not use the spinlock as my module runs in a uniprocessor system. Still I think you should do list manuplation under the control of spinlock, as page fault can occur any time and as far as I could understand you code, you are manupulating (reading/writting) these lists from normal code as well as from you page fault handle, so you need to synchornze the access to these list with either putting the interrupts off (on uniprocessor) or by using the spinlocks (on SMP) .... -Gaurav > Thanks. > Vincenzo Mallozzi. > > > > > > ___________________________________ > Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB > http://mail.yahoo.it > > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/