Is this normal or wrong?

ishare june.tune.sea at gmail.com
Wed Mar 13 00:38:33 EDT 2013


On Tue, Mar 12, 2013 at 06:53:49PM +0530, Prabhu nath wrote:
> kmem_cache_alloc() is used to allocate a memory object from a respective
> cache.
> Can you elaborate on what is ur objective or can you get us how you have
> invoked this function.
> 
> To my understanding kmem_cache_alloc() will just return a linear virtual
> address (void *) of a memory object.
>
  yes, it returns to me a struct inode * , whose valuse is reasonable ,  
  the value of its member  struct list_head i_dentry is {0x1,0x3 },their structures 
  is as below :
  
  struct inode 
 {
       struct hlist_node	i_hash;
       struct list_head		i_list;
       struct list_head		i_dentry;
       unsigned long		i_ino; 
 ....


 }

 struct list_head 
 {
     struct list_head *next, *prev;
 };

  After locate memory from cache , the i_dentry's **next** member,  whose valuse is 0x1 , will be used to
  linked with another list_head , in this procedure there is a addressing instruction to 0x1,but this time
  the low memory region has been zaped by setting pde at 0x0 to zero , so this addressing  causes a 
  page_fault, then goto reboot .

 how to resolve this ? 









 










> 
> -- 
> Regards,
> Prabhunath G
> Linux Trainer
> Bangalore
> 
> 
> On Thu, Mar 7, 2013 at 8:15 PM, ishare <june.tune.sea at gmail.com> wrote:
> 
> >
> >   In init procedure ,I use kmem_cache_alloc to apply for memory to locate
> > a inode struct.
> >   it returns to me a inode whose i_dentry element cantain a struct
> > list_head pointing to address 0x3,
> >   Is the address within low momery resonable or illegal?
> >
> >   thanks!
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >



More information about the Kernelnewbies mailing list