xfs
[Top] [All Lists]

Re: Unable to handle kernel NULL pointer dereference with2.4.19-rc3-xfs

To: James Pearson <james-p@xxxxxxxxxxxxxxxxxx>
Subject: Re: Unable to handle kernel NULL pointer dereference with2.4.19-rc3-xfs
From: Stephen Lord <lord@xxxxxxx>
Date: 01 Aug 2002 09:32:12 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <3D494240.7C5978E9@moving-picture.com>
References: <3D46738B.308AD0BF@moving-picture.com> <1028030060.2171.1.camel@laptop.americas.sgi.com> <3D494240.7C5978E9@moving-picture.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Thu, 2002-08-01 at 09:14, James Pearson wrote:
> Stephen Lord wrote:
> > 
> > On Tue, 2002-07-30 at 06:07, James Pearson wrote:
> > > I've just had the following oops with nfsd on an XFS file system using a
> > > CVS kernel from July 22nd - not sure if it's XFS or NFS related ...
> > >
> > 
> > It looks like XFS, I see a problem, will take a little bit to work out
> > the correct fix.
> > 
> > Steve
> 
> Is there anything I can do/not do that may help the situation? 
> 
> The problem hasn't occurred again (yet!).

Well, it looks like a pretty narrow window. I can certainly prevent the
oops, understanding the root cause of the oops is what I am trying to
dig into - in my spare time which is somewhat minimal at the moment.
This code will stop the oops, if I read things wrong it will turn it 
into a cpu loop though.

Steve

===========================================================================
Index: linux/fs/xfs/xfs_iget.c
===========================================================================

--- /usr/tmp/TmpDir.14466-0/linux/fs/xfs/xfs_iget.c_1.167       Thu Aug  1 
09:33:25 2002
+++ linux/fs/xfs/xfs_iget.c     Tue Jul 30 12:31:32 2002
@@ -477,6 +477,10 @@
                        }
 
                        bdp = vn_bhv_lookup(VN_BHV_HEAD(vp), &xfs_vnodeops);
+                       if (!bdp) {
+                               iput(inode);
+                               goto retry;
+                       }
                        ip = XFS_BHVTOI(bdp);
                        if (lock_flags != 0) {
                                xfs_ilock(ip, lock_flags);



<Prev in Thread] Current Thread [Next in Thread>