linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* queer error in kernel
@ 2003-04-21  8:18 Yours Lovingly
  0 siblings, 0 replies; only message in thread
From: Yours Lovingly @ 2003-04-21  8:18 UTC (permalink / raw)
  To: linux-kernel

Hi,
  I have a small hack for the linux kernel's nfs
module which was working just fine before the
following code was introduced:

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

________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
       visit http://in.tv.yahoo.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-04-21  8:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-21  8:18 queer error in kernel Yours Lovingly

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).