* Is this normal or wrong?
@ 2013-03-07 14:45 ishare
2013-03-12 13:23 ` Prabhu nath
0 siblings, 1 reply; 3+ messages in thread
From: ishare @ 2013-03-07 14:45 UTC (permalink / raw)
To: kernelnewbies
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!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Is this normal or wrong?
2013-03-07 14:45 Is this normal or wrong? ishare
@ 2013-03-12 13:23 ` Prabhu nath
2013-03-13 4:38 ` ishare
0 siblings, 1 reply; 3+ messages in thread
From: Prabhu nath @ 2013-03-12 13:23 UTC (permalink / raw)
To: kernelnewbies
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.
It would not initialize this memory. What you are seeing is a stale value
which is unwarranted in this context.
--
Regards,
Prabhunath G
Linux Trainer
Bangalore
On Thu, Mar 7, 2013 at 8:15 PM, ishare <june.tune.sea@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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130312/79d770d9/attachment.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Is this normal or wrong?
2013-03-12 13:23 ` Prabhu nath
@ 2013-03-13 4:38 ` ishare
0 siblings, 0 replies; 3+ messages in thread
From: ishare @ 2013-03-13 4:38 UTC (permalink / raw)
To: kernelnewbies
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@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
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-13 4:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 14:45 Is this normal or wrong? ishare
2013-03-12 13:23 ` Prabhu nath
2013-03-13 4:38 ` ishare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).