1. 22 11月, 2006 1 次提交
    • D
      WorkStruct: Separate delayable and non-delayable events. · 52bad64d
      David Howells 提交于
      Separate delayable work items from non-delayable work items be splitting them
      into a separate structure (delayed_work), which incorporates a work_struct and
      the timer_list removed from work_struct.
      
      The work_struct struct is huge, and this limits it's usefulness.  On a 64-bit
      architecture it's nearly 100 bytes in size.  This reduces that by half for the
      non-delayable type of event.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      52bad64d
  2. 21 11月, 2006 2 次提交
  3. 17 11月, 2006 6 次提交
  4. 15 11月, 2006 2 次提交
    • H
      [PATCH] hugetlb: prepare_hugepage_range check offset too · 68589bc3
      Hugh Dickins 提交于
      (David:)
      
      If hugetlbfs_file_mmap() returns a failure to do_mmap_pgoff() - for example,
      because the given file offset is not hugepage aligned - then do_mmap_pgoff
      will go to the unmap_and_free_vma backout path.
      
      But at this stage the vma hasn't been marked as hugepage, and the backout path
      will call unmap_region() on it.  That will eventually call down to the
      non-hugepage version of unmap_page_range().  On ppc64, at least, that will
      cause serious problems if there are any existing hugepage pagetable entries in
      the vicinity - for example if there are any other hugepage mappings under the
      same PUD.  unmap_page_range() will trigger a bad_pud() on the hugepage pud
      entries.  I suspect this will also cause bad problems on ia64, though I don't
      have a machine to test it on.
      
      (Hugh:)
      
      prepare_hugepage_range() should check file offset alignment when it checks
      virtual address and length, to stop MAP_FIXED with a bad huge offset from
      unmapping before it fails further down.  PowerPC should apply the same
      prepare_hugepage_range alignment checks as ia64 and all the others do.
      
      Then none of the alignment checks in hugetlbfs_file_mmap are required (nor
      is the check for too small a mapping); but even so, move up setting of
      VM_HUGETLB and add a comment to warn of what David Gibson discovered - if
      hugetlbfs_file_mmap fails before setting it, do_mmap_pgoff's unmap_region
      when unwinding from error will go the non-huge way, which may cause bad
      behaviour on architectures (powerpc and ia64) which segregate their huge
      mappings into a separate region of the address space.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Acked-by: NAdam Litke <agl@us.ibm.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      68589bc3
    • I
      [PATCH] autofs4: panic after mount fail · ba8df43c
      Ian Kent 提交于
      Resolve the panic on failed mount of an autofs filesystem originally
      reported by Mao Bibo.
      
      It addresses two issues that happen after the mount fail.  The first a NULL
      pointer reference to a field (pipe) in the autofs superblock info structure
      and second the lack of super block cleanup by the autofs and autofs4
      modules.
      Signed-off-by: NIan Kent <raven@themaw.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ba8df43c
  5. 11 11月, 2006 7 次提交
  6. 10 11月, 2006 1 次提交
  7. 09 11月, 2006 4 次提交
  8. 08 11月, 2006 2 次提交
  9. 06 11月, 2006 6 次提交
  10. 05 11月, 2006 1 次提交
  11. 04 11月, 2006 8 次提交
    • A
      [PATCH] Fix user.* xattr permission check for sticky dirs · f1f2d871
      Andreas Gruenbacher 提交于
      The user.* extended attributes are only allowed on regular files and
      directories.  Sticky directories further restrict write access to the owner
      and privileged users.  (See the attr(5) man page for an explanation.)
      
      The original check in ext2/ext3 when user.* xattrs were merged was more
      restrictive than intended, and when the xattr permission checks were moved
      into the VFS, read access to user.* attributes on sticky directores ended
      up being denied in addition.
      
      Originally-from: Gerard Neil <xyzzy@devferret.org>
      Signed-off-by: NAndreas Gruenbacher <agruen@suse.de>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f1f2d871
    • J
      [PATCH] reiserfs: reset errval after initializing bitmap cache · d2c89a42
      Jeff Mahoney 提交于
      Callers after reiserfs_init_bitmap_cache() expect errval to contain -EINVAL
      until much later.  If a condition fails before errval is reset later,
      reiserfs_fill_super() will mistakenly return 0, causing an Oops in
      do_add_mount().  This patch resets errval to -EINVAL after the call.
      
      I view this as a temporary fix and real error codes should be used
      throughout reiserfs_fill_super().
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d2c89a42
    • S
      [PATCH] NFS4: fix for recursive locking problem · 7ef55b8a
      Srinivasa Ds 提交于
      When I was performing some operations on NFS, I got below error on server
      side.
      
        =============================================
        [ INFO: possible recursive locking detected ]
        2.6.19-prep #1
        ---------------------------------------------
        nfsd4/3525 is trying to acquire lock:
         (&inode->i_mutex){--..}, at: [<c0611e5a>] mutex_lock+0x21/0x24
      
        but task is already holding lock:
         (&inode->i_mutex){--..}, at: [<c0611e5a>] mutex_lock+0x21/0x24
      
        other info that might help us debug this:
        2 locks held by nfsd4/3525:
         #0:  (client_mutex){--..}, at: [<c0611e5a>] mutex_lock+0x21/0x24
         #1:  (&inode->i_mutex){--..}, at: [<c0611e5a>] mutex_lock+0x21/0x24
      
        stack backtrace:
         [<c04051ed>] show_trace_log_lvl+0x58/0x16a
         [<c04057fa>] show_trace+0xd/0x10
         [<c0405913>] dump_stack+0x19/0x1b
         [<c043b6f1>] __lock_acquire+0x778/0x99c
         [<c043be86>] lock_acquire+0x4b/0x6d
         [<c0611ceb>] __mutex_lock_slowpath+0xbc/0x20a
         [<c0611e5a>] mutex_lock+0x21/0x24
         [<c047fd7e>] vfs_rmdir+0x76/0xf8
         [<f94b7ce9>] nfsd4_clear_clid_dir+0x2c/0x41 [nfsd]
         [<f94b7de9>] nfsd4_remove_clid_dir+0xb1/0xe8 [nfsd]
         [<f94b307b>] laundromat_main+0x9b/0x1c3 [nfsd]
         [<c04333d6>] run_workqueue+0x7a/0xbb
         [<c0433d0b>] worker_thread+0xd2/0x107
         [<c0436285>] kthread+0xc3/0xf2
         [<c0402005>] kernel_thread_helper+0x5/0xb
        ===================================================================
      
      Cause for this problem was,2 successive mutex_lock calls on 2 diffrent inodes ,as shown below
      
      	static int
      	nfsd4_clear_clid_dir(struct dentry *dir, struct dentry *dentry)
      	{
      	        int status;
      
      	        /* For now this directory should already be empty, but we empty it of
              	 * any regular files anyway, just in case the directory was created by
      	         * a kernel from the future.... */
              	nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file);
      	        mutex_lock(&dir->d_inode->i_mutex);
      	        status = vfs_rmdir(dir->d_inode, dentry);
      	...
      
      	int vfs_rmdir(struct inode *dir, struct dentry *dentry)
      	{
      	        int error = may_delete(dir, dentry, 1);
      
      	        if (error)
      	                return error;
      
      	        if (!dir->i_op || !dir->i_op->rmdir)
              	        return -EPERM;
      
      	        DQUOT_INIT(dir);
      
      	        mutex_lock(&dentry->d_inode->i_mutex);
      	...
      
      So I have developed the patch to overcome this problem.
      Signed-off-by: NSrinivasa DS <srinivasa@in.ibm.com>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7ef55b8a
    • O
      [PATCH] gfs2: ->readpages() fixes · 7011774d
      OGAWA Hirofumi 提交于
      This just ignore the remaining pages, and remove unneeded unlock_pages().
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Acked-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7011774d
    • O
      [PATCH] fuse: ->readpages() cleanup · 2e990021
      OGAWA Hirofumi 提交于
      This just ignore the remaining pages.
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2e990021
    • O
      [PATCH] cifs: ->readpages() fixes · 05ac9d4b
      OGAWA Hirofumi 提交于
      This just ignore the remaining pages, and will fix a forgot put_pages_list().
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      05ac9d4b
    • H
      [PATCH] sys_pselect7 vs compat_sys_pselect7 uaccess error handling · 87c2b7c0
      Heiko Carstens 提交于
      75833345 fixes the not checked copy_to_user
      return value of compat_sys_pselect7.  I ran into this too because of an old
      source tree, but my fix would look quite a bit different to Andi's fix.
      
      The reason is that the compat function IMHO should behave the very same as
      the non-compat function if possible.  Since sys_pselect7 does not return
      -EFAULT in this specific case, change the compat code so it behaves like
      sys_pselect7.
      
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      87c2b7c0
    • M
      [PATCH] eCryptfs: Fix pointer deref · 7bd473fc
      Michael Halcrow 提交于
      I missed a pointer dereference in this kmalloc result check.
      Signed-off-by: NMichael Halcrow <mhalcrow@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7bd473fc