1. 22 1月, 2007 4 次提交
  2. 18 1月, 2007 2 次提交
  3. 13 1月, 2007 1 次提交
  4. 12 1月, 2007 2 次提交
    • D
      [PATCH] Revert bd_mount_mutex back to a semaphore · f73ca1b7
      David Chinner 提交于
      Revert bd_mount_mutex back to a semaphore so that xfs_freeze -f /mnt/newtest;
      xfs_freeze -u /mnt/newtest works safely and doesn't produce lockdep warnings.
      
      (XFS unlocks the semaphore from a different task, by design.  The mutex
      code warns about this)
      Signed-off-by: NDave Chinner <dgc@sgi.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f73ca1b7
    • T
      [PATCH] NFS: Fix race in nfs_release_page() · e3db7691
      Trond Myklebust 提交于
          NFS: Fix race in nfs_release_page()
      
          invalidate_inode_pages2() may find the dirty bit has been set on a page
          owing to the fact that the page may still be mapped after it was locked.
          Only after the call to unmap_mapping_range() are we sure that the page
          can no longer be dirtied.
          In order to fix this, NFS has hooked the releasepage() method and tries
          to write the page out between the call to unmap_mapping_range() and the
          call to remove_mapping(). This, however leads to deadlocks in the page
          reclaim code, where the page may be locked without holding a reference
          to the inode or dentry.
      
          Fix is to add a new address_space_operation, launder_page(), which will
          attempt to write out a dirty page without releasing the page lock.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      
          Also, the bare SetPageDirty() can skew all sort of accounting leading to
          other nasties.
      
      [akpm@osdl.org: cleanup]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e3db7691
  5. 11 1月, 2007 1 次提交
  6. 10 1月, 2007 2 次提交
  7. 07 1月, 2007 1 次提交
    • L
      Revert "[PATCH] binfmt_elf: randomize PIE binaries (2nd try)" · 90cb28e8
      Linus Torvalds 提交于
      This reverts commit 59287c09.
      
      Hugh Dickins reports that it causes random failures on x86 with SuSE
      10.2, and points out
      
        "Isn't that randomization, anywhere from 0x10000 to ELF_ET_DYN_BASE,
         sure to place the ET_DYN from time to time just where the comment
         says it's trying to avoid? I assume that somehow results in the error
         reported."
      
      (where the comment in question is the existing comment in the source
      code about mmap/brk clashes).
      Suggested-by: NHugh Dickins <hugh@veritas.com>
      Acked-by: NMarcus Meissner <meissner@suse.de>
      Cc: Andrew Morton <akpm@osdl.org>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      90cb28e8
  8. 06 1月, 2007 3 次提交
    • E
      [PATCH] fix garbage instead of zeroes in UFS · d63b7090
      Evgeniy Dushistov 提交于
      Looks like this is the problem, which point Al Viro some time ago:
      
      ufs's get_block callback allocates 16k of disk at a time, and links that
      entire 16k into the file's metadata.  But because get_block is called for only
      a single buffer_head (a 2k buffer_head in this case?) we are only able to tell
      the VFS that this 2k is buffer_new().
      
      So when ufs_getfrag_block() is later called to map some more data in the file,
      and when that data resides within the remaining 14k of this fragment,
      ufs_getfrag_block() will incorrectly return a !buffer_new() buffer_head.
      
      I don't see _right_ way to do nullification of whole block, if use inode
      page cache, some pages may be outside of inode limits (inode size), and
      will be lost; if use blockdev page cache it is possible to zero real data,
      if later inode page cache will be used.
      
      The simpliest way, as can I see usage of block device page cache, but not only
      mark dirty, but also sync it during "nullification".  I use my simple tests
      collection, which I used for check that create,open,write,read,close works on
      ufs, and I see that this patch makes ufs code 18% slower then before.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d63b7090
    • E
      [PATCH] fix memory corruption from misinterpreted bad_inode_ops return values · be6aab0e
      Eric Sandeen 提交于
      CVE-2006-5753 is for a case where an inode can be marked bad, switching
      the ops to bad_inode_ops, which are all connected as:
      
      static int return_EIO(void)
      {
              return -EIO;
      }
      
      #define EIO_ERROR ((void *) (return_EIO))
      
      static struct inode_operations bad_inode_ops =
      {
              .create         = bad_inode_create
      ...etc...
      
      The problem here is that the void cast causes return types to not be
      promoted, and for ops such as listxattr which expect more than 32 bits of
      return value, the 32-bit -EIO is interpreted as a large positive 64-bit
      number, i.e. 0x00000000fffffffa instead of 0xfffffffa.
      
      This goes particularly badly when the return value is taken as a number of
      bytes to copy into, say, a user's buffer for example...
      
      I originally had coded up the fix by creating a return_EIO_<TYPE> macro
      for each return type, like this:
      
      static int return_EIO_int(void)
      {
      	return -EIO;
      }
      #define EIO_ERROR_INT ((void *) (return_EIO_int))
      
      static struct inode_operations bad_inode_ops =
      {
      	.create		= EIO_ERROR_INT,
      ...etc...
      
      but Al felt that it was probably better to create an EIO-returner for each
      actual op signature.  Since so few ops share a signature, I just went ahead
      & created an EIO function for each individual file & inode op that returns
      a value.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      be6aab0e
    • J
      [PATCH] adfs: fix filename handling · 3223ea8c
      James Bursa 提交于
      Fix filenames on adfs discs being terminated at the first character greater
      than 128 (adfs filenames are Latin 1).  I saw this problem when using a
      loopback adfs image on a 2.6.17-rc5 x86_64 machine, and the patch fixed it
      there.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3223ea8c
  9. 03 1月, 2007 1 次提交
  10. 31 12月, 2006 2 次提交
  11. 29 12月, 2006 5 次提交
  12. 24 12月, 2006 2 次提交
  13. 23 12月, 2006 5 次提交
    • H
      [PATCH] jbd: wait for already submitted t_sync_datalist buffer to complete · 6f5a9da1
      Hisashi Hifumi 提交于
      In the current jbd code, if a buffer on BJ_SyncData list is dirty and not
      locked, the buffer is refiled to BJ_Locked list, submitted to the IO and
      waited for IO completion.
      
      But the fsstress test showed the case that when a buffer was already
      submitted to the IO just before the buffer_dirty(bh) check, the buffer was
      not waited for IO completion.
      
      Following patch solves this problem.  If it is assumed that a buffer is
      submitted to the IO before the buffer_dirty(bh) check and still being
      written to disk, this buffer is refiled to BJ_Locked list.
      Signed-off-by: NHisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
      Cc: Jan Kara <jack@ucw.cz>
      Cc: "Stephen C. Tweedie" <sct@redhat.com>
      Cc: <linux-ext4@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6f5a9da1
    • V
      [PATCH] fdtable: Provide free_fdtable() wrapper · 01b2d93c
      Vadim Lobanov 提交于
      Christoph Hellwig has expressed concerns that the recent fdtable changes
      expose the details of the RCU methodology used to release no-longer-used
      fdtable structures to the rest of the kernel.  The trivial patch below
      addresses these concerns by introducing the appropriate free_fdtable()
      calls, which simply wrap the release RCU usage.  Since free_fdtable() is a
      one-liner, it makes sense to promote it to an inline helper.
      Signed-off-by: NVadim Lobanov <vlobanov@speakeasy.net>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      01b2d93c
    • J
      [PATCH] Make JFFS depend on CONFIG_BROKEN · 163ca88b
      Josh Boyer 提交于
      Mark JFFS as broken and provide a warning to users that it is deprecated
      and scheduled for removal in 2.6.21
      Signed-off-by: NJosh Boyer <jwboyer@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      163ca88b
    • M
      [PATCH] fsstack: Remove inode copy · ba3ff12f
      Michael Halcrow 提交于
      Trevor found a file size problem in eCryptfs in recent kernels, and he
      tracked it down to an fsstack change.
      
      This was the eCryptfs copy_attr_all:
      
      > -void ecryptfs_copy_attr_all(struct inode *dest, const struct inode *src)
      > -{
      > -       dest->i_mode = src->i_mode;
      > -       dest->i_nlink = src->i_nlink;
      > -       dest->i_uid = src->i_uid;
      > -       dest->i_gid = src->i_gid;
      > -       dest->i_rdev = src->i_rdev;
      > -       dest->i_atime = src->i_atime;
      > -       dest->i_mtime = src->i_mtime;
      > -       dest->i_ctime = src->i_ctime;
      > -       dest->i_blkbits = src->i_blkbits;
      > -       dest->i_flags = src->i_flags;
      > -}
      
      This is the fsstack copy_attr_all:
      
      > +void fsstack_copy_attr_all(struct inode *dest, const struct inode *src,
      > +                               int (*get_nlinks)(struct inode *))
      > +{
      > +       if (!get_nlinks)
      > +               dest->i_nlink = src->i_nlink;
      > +       else
      > +               dest->i_nlink = (*get_nlinks)(dest);
      > +
      > +       dest->i_mode = src->i_mode;
      > +       dest->i_uid = src->i_uid;
      > +       dest->i_gid = src->i_gid;
      > +       dest->i_rdev = src->i_rdev;
      > +       dest->i_atime = src->i_atime;
      > +       dest->i_mtime = src->i_mtime;
      > +       dest->i_ctime = src->i_ctime;
      > +       dest->i_blkbits = src->i_blkbits;
      > +       dest->i_flags = src->i_flags;
      > +
      > +       fsstack_copy_inode_size(dest, src);
      > +}
      
      The addition of copy_inode_size breaks eCryptfs, since eCryptfs needs to
      interpolate the file sizes (eCryptfs has extra space in the lower file for
      the header).  The setting of the upper inode size occurs elsewhere in
      eCryptfs, and the new copy_attr_all now undoes what eCryptfs was doing
      right beforehand.
      
      I see three ways of going forward from here.  (1) Something like this patch
      needs to go in (assuming it jives with Unionfs), (2) we need to make a
      change to the fsstack API for more fine-grained control over copying
      attributes (e.g., by also including a callback function for calculating the
      right file size, which will require some more work on both eCryptfs and
      Unionfs), or (3) the fsstack patch on eCryptfs (commit
      0cc72dc7 made on Fri Dec 8 02:36:31 2006
      -0800) needs to be yanked in 2.6.20.
      
      I think the simplest solution, from eCryptfs' perspective, is to just
      remove the inode size copy.
      
      Remove inode size copy in general fsstack attr copy code. Stacked
      filesystems may need to interpolate the inode size, since the file
      size in the lower file may be different than the file size in the
      stacked layer.
      Signed-off-by: NMichael Halcrow <mhalcrow@us.ibm.com>
      Acked-by: NJosef "Jeff" Sipek <jsipek@cs.sunysb.edu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ba3ff12f
    • A
      [PATCH] fs/sysv/: proper prototypes for 2 functions · 3b2b96ab
      Adrian Bunk 提交于
      Add proper prototypes for sysv_{init,destroy}_icache() in sysv.h
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3b2b96ab
  14. 22 12月, 2006 5 次提交
    • D
      [PATCH] Fix XFS after clear_page_dirty() removal · 92132021
      David Chinner 提交于
      XFS appears to call clear_page_dirty to get the mapping tree dirty tag
      set correctly at the same time the page dirty flag is cleared.  I note
      that this can be done by set_page_writeback() if we clear the dirty flag
      on the page first when we are writing back the entire page.
      
      Hence it seems to me that the XFS call to clear_page_dirty() could
      easily be substituted by clear_page_dirty_for_io() followed by a call to
      set_page_writeback() to get the mapping tree tags set correctly after
      the page has been marked clean.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      92132021
    • M
      [PATCH] fuse: remove clear_page_dirty() call · 9280f682
      Miklos Szeredi 提交于
      The use by FUSE was just a remnant of an optimization from the time
      when writable mappings were supported.
      
      Now FUSE never actually allows the creation of dirty pages, so this
      invocation of clear_page_dirty() is effectively a no-op.
      Signed-off-by: NMiklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9280f682
    • D
      [PATCH] Fix JFS after clear_page_dirty() removal · d0e671a9
      Dave Kleikamp 提交于
      This patch removes some questionable code that attempted to make a
      no-longer-used page easier to reclaim.
      
      Calling metapage_writepage against such a page will not result in any
      I/O being performed, so removing this code shouldn't be a big deal.
      
      [ It's likely that we could have just replaced the "clear_page_dirty()"
        call with a call to "cancel_dirty_page()" instead, but in the
        meantime this is cleaner and simpler anyway, so unless there is some
        overriding reason (and Dave implies there isn't) I'll just use this
        patch as-is.			- Linus ]
      Signed-off-by: NDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d0e671a9
    • L
      VM: Remove "clear_page_dirty()" and "test_clear_page_dirty()" functions · fba2591b
      Linus Torvalds 提交于
      They were horribly easy to mis-use because of their tempting naming, and
      they also did way more than any users of them generally wanted them to
      do.
      
      A dirty page can become clean under two circumstances:
      
       (a) when we write it out.  We have "clear_page_dirty_for_io()" for
           this, and that function remains unchanged.
      
           In the "for IO" case it is not sufficient to just clear the dirty
           bit, you also have to mark the page as being under writeback etc.
      
       (b) when we actually remove a page due to it becoming inaccessible to
           users, notably because it was truncate()'d away or the file (or
           metadata) no longer exists, and we thus want to cancel any
           outstanding dirty state.
      
      For the (b) case, we now introduce "cancel_dirty_page()", which only
      touches the page state itself, and verifies that the page is not mapped
      (since cancelling writes on a mapped page would be actively wrong as it
      is still accessible to users).
      
      Some filesystems need to be fixed up for this: CIFS, FUSE, JFS,
      ReiserFS, XFS all use the old confusing functions, and will be fixed
      separately in subsequent commits (with some of them just removing the
      offending logic, and others using clear_page_dirty_for_io()).
      
      This was confirmed by Martin Michlmayr to fix the apt database
      corruption on ARM.
      
      Cc: Martin Michlmayr <tbm@cyrius.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Andrei Popa <andrei.popa@i-neo.ro>
      Cc: Andrew Morton <akpm@osdl.org>
      Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
      Cc: Gordon Farquharson <gordonfarquharson@gmail.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fba2591b
    • L
      Clean up and make try_to_free_buffers() not race with dirty pages · 46d2277c
      Linus Torvalds 提交于
      This is preparatory work in our continuing saga on some hard-to-trigger
      file corruption with shared writable mmap() after the dirty page
      tracking changes (commit d08b3851 etc)
      were merged.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      46d2277c
  15. 21 12月, 2006 1 次提交
  16. 19 12月, 2006 1 次提交
  17. 16 12月, 2006 2 次提交