Re: 2.6.18 xfs lockdep warning

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

 



On Wed, Oct 11, 2006 at 12:28:38PM +0200, NetArt - Grzegorz Nosek wrote:
> Hello all,
> 
> (not subscribed, please cc)
> 
> I'd like to report a lockdep warning with 2.6.18 while unmounting a
> xfs filesystem.
> 
> Tested on vanilla 2.6.18, the trace I get is as follows:

Right now, i don't think it is safe to use lockdep with XFS.  We've
just discovered that lockdep can panic the system or cause
use-after-free issues because of the fact that XFS often does not
unlock objects before freeing them. We are working on getting
full lockdep support in XFS, but we are not there yet.

FWIW, this patch might fix the problem you reported.

---
 fs/xfs/xfs_iget.c |    1 +
 1 file changed, 1 insertion(+)

Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c	2006-10-11 14:01:46.000000000 +1000
+++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c	2006-10-12 13:00:55.158588110 +1000
@@ -562,6 +562,7 @@ xfs_ireclaim(xfs_inode_t *ip)
 	/*
 	 * Free all memory associated with the inode.
 	 */
+	xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
 	xfs_idestroy(ip);
 }


Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux