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

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