From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "Neil Brown" <neilb@suse.de>
Cc: "David CHANIAL" <david.ml@euro-web.fr>,
"Linux Kernel Mailinglist" <linux-kernel@vger.kernel.org>
Subject: Re: BUG: unable to handle kernel NULL pointer dereference - nfs v3
Date: Thu, 19 Jul 2007 19:41:17 +0530 [thread overview]
Message-ID: <a781481a0707190711s58d7ab24xa53c6975d4172597@mail.gmail.com> (raw)
In-Reply-To: <18076.42052.961808.528867@notabene.brown>
Hi Neil,
[ okay, just searching through my lkml folder looking for
"unable to handle" :-) ]
On 7/17/07, Neil Brown <neilb@suse.de> wrote:
> On Monday July 16, david.ml@euro-web.fr wrote:
> >
> > ************
> > BUG: unable to handle kernel NULL pointer dereference at virtual address
> > 00000004
> > EIP is at encode_fsid+0x67/0x89
>
> This is presumably where the illegal access happened.
>
> > eax: e5bde8c0 ebx: f7593404 ecx: 00000000 edx: 00000006
> > esi: dc569048 edi: f75934ec ebp: f7593404 esp: f75f1f18
Yup, ecx is to blame here ...
> > Code: e2 08 09 d1 09 c1 eb 10 8b 83 88 00 00 00 8b 40 30 89 c3 89 c1 c1 fb 1f
> > 89 d8 0f c8 89 06 89 c8 eb 1e
>
> Unfortunately "ksymoops" does seem to decode this into something quite
> useful enough. Normally one of the numbers has <> around it. Are you
> should you copied the number across exactly?
Yes, I think David missed posting the full "Code:" here. Unfortunate.
> In any case, there is no place in encode_fsid where an offset of 4
> from any register is indexed, nor an offset of -2.
But I went ahead and disassembled encode_fsid() anyway. I did
stumble across a "mov 0x4(%ecx), %edx" -- which turns out to be:
static __be32 *encode_fsid(__be32 *p, struct svc_fh *fhp)
{
u64 f;
switch(fsid_source(fhp)) {
default:
case FSIDSOURCE_DEV:
p = xdr_encode_hyper(p, (u64)huge_encode_dev
(fhp->fh_dentry->d_inode->i_sb->s_dev));
break;
case FSIDSOURCE_FSID:
p = xdr_encode_hyper(p, (u64) fhp->fh_export->ex_fsid);
break;
case FSIDSOURCE_UUID:
f = ((u64*)fhp->fh_export->ex_uuid)[0];
f ^= ((u64*)fhp->fh_export->ex_uuid)[1]; /* ***** HERE ***** */
p = xdr_encode_hyper(p, f);
break;
}
return p;
}
Note that fhp->fh_export->ex_uuid is an unsigned char *, which is
4 bytes on an i386 (which is what David's system is). For some
reason fhp->fh_export->ex_uuid (%ecx) is NULL here, which leads
to the oops. I have _zero_ other knowledge of knfsd code, and
not really be of any other use, sorry.
Satyam
next prev parent reply other threads:[~2007-07-19 14:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-16 4:38 David CHANIAL
2007-07-17 11:13 ` Neil Brown
2007-07-17 13:11 ` David CHANIAL
2007-07-19 14:11 ` Satyam Sharma [this message]
2007-07-19 15:11 ` Satyam Sharma
2007-07-20 6:41 ` Neil Brown
2007-07-20 7:13 ` Satyam Sharma
2007-07-20 13:33 ` David CHANIAL
2007-07-20 13:36 ` Satyam Sharma
2007-07-27 7:28 ` David CHANIAL
2007-09-03 23:55 ` Satyam Sharma
2007-09-04 7:14 ` David CHANIAL
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a781481a0707190711s58d7ab24xa53c6975d4172597@mail.gmail.com \
--to=satyam.sharma@gmail.com \
--cc=david.ml@euro-web.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®