public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* xfs vs. lockdep
@ 2006-10-09 17:58 Eric Sandeen
  2006-10-09 23:36 ` Vlad Apostolov
  2006-10-10  0:47 ` David Chinner
  0 siblings, 2 replies; 9+ messages in thread
From: Eric Sandeen @ 2006-10-09 17:58 UTC (permalink / raw)
  To: xfs

FC6 kernels are oopsing when lockdep & memory debugging are turned on,
looks like due to this code:

xfs_ireclaim(xfs_inode_t *ip)
{
   ...
        /*
         * Here we do a spurious inode lock in order to coordinate with
         * xfs_sync().  This is because xfs_sync() references the inodes
         * in the mount list without taking references on the corresponding
         * vnodes.  We make that OK here by ensuring that we wait until
         * the inode is unlocked in xfs_sync() before we go ahead and
         * free it.  We get both the regular lock and the io lock because
         * the xfs_sync() code may need to drop the regular one but will
         * still hold the io lock.
         */
        xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
...
        /*
         * Free all memory associated with the inode.
         */
        xfs_idestroy(ip);
}

So, lock & free.  This frees memory that lockdep is still pointing to,
and tries to use later.

Calling xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); just before
xfs_idestroy seems to solve it, but is this safe...?

-Eric

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-10-10  4:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-09 17:58 xfs vs. lockdep Eric Sandeen
2006-10-09 23:36 ` Vlad Apostolov
2006-10-10  3:06   ` Eric Sandeen
2006-10-10  3:23     ` Vlad Apostolov
2006-10-10  0:47 ` David Chinner
2006-10-10  1:45   ` Timothy Shimmin
2006-10-10  2:21     ` Eric Sandeen
2006-10-10  4:55       ` Timothy Shimmin
2006-10-10  2:25   ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox