static void nfs_print_path(struct dentry *d) {
struct dentry *parent;
struct inode *inode_parent, *inode;
unsigned long p, me;
if(!d) {
return;
}
parent = d->d_parent;
if(parent) {
inode_parent = parent->d_inode;
inode = d->d_inode;
// till here everything works just fine
/* the following code just doesn't work. None of it
works, neither the assignments to 'p' and 'me', nor
the printk, nor the comparision in the if statement
after that. I tested each of these 3 different cases
separately and each time i got the same error (see
below) */
p = (unsigned long)inode_parent;
me = (unsigned long)inode;
printk("parent inode: %x child inode: %x\n",
inode_parent, inode);
if( ((char *)inode_parent ==
(char *)inode) ) {
............
}
I got an error something like this:
Unable to handle kernel NULL pointer dereference at
virtual address 0...0f
printing eip ....
As i see it, if there is really an error where it
appears to be to me, there is error in just 'reading'
the values of the variable 'inode_parent' and 'inode'.
But considering the object code the C Compiler must
have produced, there is nothing that actually *does*
some real task - all that is being done is reading
some
arbit value from the function's stack: whats so wrong
with that ???
thanks in advance
abhishek
__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/