1. 05 Feb, 2005 4 commits
    • Hugh Dickins's avatar
      [PATCH] do_munmap() hugetlb fix · 3c5533e1
      Hugh Dickins authored
      The hugetlb_page test in do_munmap is too permissive.  It checks start vma,
      but forgets that end vma might be different and huge though start is not:
      so hits unmap_hugepage_range BUG if misaligned end was given.
      
      And it's too restrictive: munmap has always succeeded on unmapped areas
      within its range, why should it behave differently near a hugepage vma?
      
      And the additional checks in is_aligned_hugepage_range are irrelevant here,
      when the hugepage vma already exists.  But the function is still required
      (on some arches), as the default for prepare_hugepage_range - leave
      renaming cleanup to another occasion.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Acked-by: default avatarWilliam Irwin <wli@holomorphy.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      3c5533e1
    • Andreas Gruenbacher's avatar
      [PATCH] Long-standing xattr sharing bug · c2a7650d
      Andreas Gruenbacher authored
      When looking for identical xattr blocks to share, we were not comparing the
      name_index fields.  This could lead to false sharing when two xattr blocks
      ended up with identical attribute names and values, and the only default
      acls.  Because acls are cached, the bug was hidden until the next reload of
      the affected inode.
      
        $ mkdir -m 700 a b
        $ setfacl -m u:bin:rwx a
      	< acl of a goes in the mbcache
      
        $ setfacl -dm u:bin:rwx b
      	< acl of b differs only in name_index, so a's acl is reused
      
        $ getfacl b
      	< shows the result from the inode cache
      
        < empty inode cache (remount, etc.)
      
        $ getfacl b
      	< shows an access acl instead of a default acl.
      Signed-off-by: default avatarAndreas Gruenbacher <agruen@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c2a7650d
    • Hugh Dickins's avatar
      [PATCH] remove truncate mapped BUG · 315cbe59
      Hugh Dickins authored
      It's time to remove truncate_complete_page's BUG_ON(page_mapped(page)): it
      was there to give confidence in the new vm_truncate_count mechanism. 
      Earlier releases had no such check, and it wouldn't be at all helpful if it
      ever bugged up file truncation on a production system - though we don't
      know of any scenario in which that could happen now.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      315cbe59
    • Hugh Dickins's avatar
      [PATCH] tmpfs caused truncate BUG · dfceb6d6
      Hugh Dickins authored
      Just before removing truncate_complete_page's BUG_ON(page_mapped(page)),
      thought I'd recheck on a few filesystems.  The shame!  Easily triggered
      with tmpfs: not because of recent changes, but because shmem_nopage omitted
      the i_size_read from Andrea's careful truncate_count/i_size_read
      /cachelookup/truncate_count sequence.  For varying reasons, other users of
      shmem_getpage can't go beyond i_size, so just add it to shmem_nopage.
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      dfceb6d6
  2. 04 Feb, 2005 36 commits