xfs
[Top] [All Lists]

[XFS updates] XFS development tree branch, for-linus, updated. v2.6.28-r

To: xfs@xxxxxxxxxxx
Subject: [XFS updates] XFS development tree branch, for-linus, updated. v2.6.28-rc3-21345-g28e2117
From: xfs@xxxxxxxxxxx
Date: Thu, 30 Apr 2009 00:29:21 -0500
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "XFS development tree".

The branch, for-linus has been updated
  28e2117 xfs: fix getbmap vs mmap deadlock
  5f79ed6 xfs: a couple getbmap cleanups
  b9ec906 xfs: add more checks to superblock validation
  def6b3b xfs_file_last_byte() needs to acquire ilock
      from  dc2a5536d633dd2318f82f3d5ad3c9e43cfc21d7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 28e211700a81b0a934b6c7a4b8e7dda843634d2f
Author: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date:   Tue Feb 24 08:39:02 2009 -0500

    xfs: fix getbmap vs mmap deadlock
    
    xfs_getbmap (or rather the formatters called by it) copy out the getbmap
    structures under the ilock, which can deadlock against mmap.  This has
    been reported via bugzilla a while ago (#717) and has recently also
    shown up via lockdep.
    
    So allocate a temporary buffer to format the kernel getbmap structures
    into and then copy them out after dropping the locks.
    
    A little problem with this is that we limit the number of extents we
    can copy out by the maximum allocation size, but I see no real way
    around that.
    
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
    Reviewed-by: Felix Blyakher <felixb@xxxxxxx>
    Signed-off-by: Felix Blyakher <felixb@xxxxxxx>

commit 5f79ed685fc6122018c4b5826e2e5bdb7bc6f109
Author: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date:   Wed Apr 29 10:50:48 2009 -0400

    xfs: a couple getbmap cleanups
    
     - reshuffle various conditionals for data vs attr fork to make the code
       more readable
     - do fine-grainded goto-based error handling
     - exit early from conditionals instead of keeping a long else branch around
     - allow kmem_alloc to fail
    
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
    Reviewed-by: Felix Blyakher <felixb@xxxxxxx>
    Signed-off-by: Felix Blyakher <felixb@xxxxxxx>

commit b9ec9068d79e039507a247ebc5bc9c0ce53654ce
Author: Olaf Weber <olaf@xxxxxxx>
Date:   Fri Apr 17 16:12:45 2009 -0500

    xfs: add more checks to superblock validation
    
    There had been reports where xfs filesystem was randomly
    corrupted with fsfuzzer, and xfs failed to handle it
    gracefully. This patch fixes couple of reported problem
    by providing additional checks in the superblock
    validation routine.
    
    Signed-off-by: Olaf Weber <olaf@xxxxxxx>
    Reviewed-by: Josef 'Jeff' Sipek <jeffpc@xxxxxxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Felix Blyakher <felixb@xxxxxxx>

commit def6b3ba56b637d58126ef67fc19bab57945fcc4
Author: Lachlan McIlroy <lmcilroy@xxxxxxxxxx>
Date:   Thu Apr 23 22:18:00 2009 -0400

    xfs_file_last_byte() needs to acquire ilock
    
    We had some systems crash with this stack:
    
    [<a00000010000cb20>] ia64_leave_kernel+0x0/0x280
    [<a00000021291ca00>] xfs_bmbt_get_startoff+0x0/0x20 [xfs]
    [<a0000002129080b0>] xfs_bmap_last_offset+0x210/0x280 [xfs]
    [<a00000021295b010>] xfs_file_last_byte+0x70/0x1a0 [xfs]
    [<a00000021295b200>] xfs_itruncate_start+0xc0/0x1a0 [xfs]
    [<a0000002129935f0>] xfs_inactive_free_eofblocks+0x290/0x460 [xfs]
    [<a000000212998fb0>] xfs_release+0x1b0/0x240 [xfs]
    [<a0000002129ad930>] xfs_file_release+0x70/0xa0 [xfs]
    [<a000000100162ea0>] __fput+0x1a0/0x420
    [<a000000100163160>] fput+0x40/0x60
    
    The problem here is that xfs_file_last_byte() does not acquire the
    inode lock and can therefore race with another thread that is modifying
    the extext list.  While xfs_bmap_last_offset() is trying to lookup
    what was the last extent some extents were merged and the extent list
    shrunk so the index we lookup is now beyond the end of the extent list
    and potentially in a freed buffer.
    
    Signed-off-by: Lachlan McIlroy <lmcilroy@xxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Felix Blyakher <felixb@xxxxxxx>
    Signed-off-by: Felix Blyakher <felixb@xxxxxxx>

-----------------------------------------------------------------------

Summary of changes:
 fs/xfs/xfs_bmap.c  |  192 ++++++++++++++++++++++++++++------------------------
 fs/xfs/xfs_inode.c |    2 +
 fs/xfs/xfs_mount.c |    3 +
 3 files changed, 108 insertions(+), 89 deletions(-)


hooks/post-receive
-- 
XFS development tree

<Prev in Thread] Current Thread [Next in Thread>
  • [XFS updates] XFS development tree branch, for-linus, updated. v2.6.28-rc3-21345-g28e2117, xfs <=