[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: task_struct and it's fields
I tried that one too,but to no avail.I think the problem is not
that, for some reason, if i am trying to access these file_struct or
struct file pointers in task_struct, i get bombed.I put all the checks
needed, like testing for NULL or going over array boundry etc, but
of no use.
Who populates these task_struct members?When a task is not executing
what will happen to these members and their members?When a task finds
out that it need to get pages from VM space of process, where does it
go and get them, from disk?
Questions leads to more questions;-)
Thanks for your patience.
every bit of help makes me move forward.
Thanks and Regards
Venkat
-----Original Message-----
From: Greg KH [mailto:greg@wirex.com]
Sent: Friday, March 09, 2001 5:23 PM
To: Narayana, Venkat A.
Cc: 'kernelnewbies@nl.linux.org'
Subject: Re: task_struct and it's fields
Try changing:
> if ( fileP++ )
> {
> printk("owner = [%d]\n",fileP->f_uid);
> ^^^^^^^^^^^
> <offending variable.>
> }
To
if (fileP) {
printk("owner = [%d]\n",fileP->f_uid);
}
++fileP;
Problem is that you are testing fileP, then incrementing it, and then
using the incremented version for the printk, boom, not good :)
greg k-h
--
greg@(kroah|wirex).com
http://immunix.org/~greg
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.surriel.com/kernelnewbies.shtml