1. 25 1月, 2008 13 次提交
  2. 23 1月, 2008 2 次提交
  3. 18 1月, 2008 2 次提交
  4. 17 1月, 2008 2 次提交
  5. 15 1月, 2008 2 次提交
  6. 14 1月, 2008 2 次提交
    • N
      knfsd: Allow NFSv2/3 WRITE calls to succeed when krb5i etc is used. · ba67a39e
      NeilBrown 提交于
      When RPCSEC/GSS and krb5i is used, requests are padded, typically to a multiple
      of 8 bytes.  This can make the request look slightly longer than it
      really is.
      
      As of
      
      	f34b9568 "The NFSv2/NFSv3 server does not handle zero
      		length WRITE request correctly",
      
      the xdr decode routines for NFSv2 and NFSv3 reject requests that aren't
      the right length, so krb5i (for example) WRITE requests can get lost.
      
      This patch relaxes the appropriate test and enhances the related comment.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Peter Staubach <staubach@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ba67a39e
    • R
      remove task_ppid_nr_ns · 84427eae
      Roland McGrath 提交于
      task_ppid_nr_ns is called in three places.  One of these should never
      have called it.  In the other two, using it broke the existing
      semantics.  This was presumably accidental.  If the function had not
      been there, it would have been much more obvious to the eye that those
      patches were changing the behavior.  We don't need this function.
      
      In task_state, the pid of the ptracer is not the ppid of the ptracer.
      
      In do_task_stat, ppid is the tgid of the real_parent, not its pid.
      I also moved the call outside of lock_task_sighand, since it doesn't
      need it.
      
      In sys_getppid, ppid is the tgid of the real_parent, not its pid.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      84427eae
  7. 13 1月, 2008 1 次提交
  8. 11 1月, 2008 2 次提交
  9. 09 1月, 2008 3 次提交
    • E
      hfs: handle more on-disk corruptions without oopsing · cf059462
      Eric Sandeen 提交于
      hfs seems prone to bad things when it encounters on disk corruption.  Many
      values are read from disk, and used as lengths to memcpy, as an example.
      This patch fixes up several of these problematic cases.
      
      o sanity check the on-disk maximum key lengths on mount
        (these are set to a defined value at mkfs time and shouldn't differ)
      o check on-disk node keylens against the maximum key length for each tree
      o fix hfs_btree_open so that going out via free_tree: doesn't wind
        up in hfs_releasepage, which wants to follow the very pointer
        we were trying to set up:
      	HFS_SB(sb)->cat_tree = hfs_btree_open()
      		...
      		failure gets to hfs_releasepage and tries
      		to follow HFS_SB(sb)->cat_tree
      
      Tested with the fsfuzzer; it survives more than it used to.
      Signed-off-by: NEric Sandeen <sandeen@redhat.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cf059462
    • M
      eCryptfs: fix dentry handling on create error, unlink, and inode destroy · caeeeecf
      Michael Halcrow 提交于
      This patch corrects some erroneous dentry handling in eCryptfs.
      
      If there is a problem creating the lower file, then there is nothing that
      the persistent lower file can do to really help us.  This patch makes a
      vfs_create() failure in the lower filesystem always lead to an
      unconditional do_create failure in eCryptfs.
      
      Under certain sequences of operations, the eCryptfs dentry can remain in
      the dcache after an unlink.  This patch calls d_drop() on the eCryptfs
      dentry to correct this.
      
      eCryptfs has no business calling d_delete() directly on a lower
      filesystem's dentry.  This patch removes the call to d_delete() on the
      lower persistent file's dentry in ecryptfs_destroy_inode().
      
      (Thanks to David Kleikamp, Eric Sandeen, and Jeff Moyer for helping
      identify and resolve this issue)
      Signed-off-by: NMichael Halcrow <mhalcrow@us.ibm.com>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Eric Sandeen <sandeen@redhat.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      caeeeecf
    • O
      fat: optimize fat_count_free_clusters() · 9f966be8
      OGAWA Hirofumi 提交于
      On large partition, scanning the free clusters is very slow if users
      doesn't use "usefree" option.
      
      For optimizing it, this patch uses sb_breadahead() to read of FAT
      sectors. On some user's 15GB partition, this patch improved it very
      much (1min => 600ms).
      
      The following is the result of 2GB partition on my machine.
      
      without patch:
      	root@devron (/)# time df -h > /dev/null
      
      	real    0m1.202s
      	user    0m0.000s
      	sys     0m0.440s
      
      with patch:
      	root@devron (/)# time df -h > /dev/null
      
      	real    0m0.378s
      	user    0m0.012s
      	sys     0m0.168s
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9f966be8
  10. 08 1月, 2008 1 次提交
  11. 07 1月, 2008 1 次提交
  12. 03 1月, 2008 7 次提交
    • T
      NFSv4: Fix open_to_lock_owner sequenceid allocation... · e6e21970
      Trond Myklebust 提交于
      NFSv4 file locking is currently completely broken since it doesn't respect
      the OPEN sequencing when it is given an unconfirmed lock_owner and needs to
      do an open_to_lock_owner. Worse: it breaks the sunrpc rules by doing a
      GFP_KERNEL allocation inside an rpciod callback.
      
      Fix is to preallocate the open seqid structure in nfs4_alloc_lockdata if we
      see that the lock_owner is unconfirmed.
      Then, in nfs4_lock_prepare() we wait for either the open_seqid, if
      the lock_owner is still unconfirmed, or else fall back to waiting on the
      standard lock_seqid.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      e6e21970
    • T
      NFSv4: nfs4_open_confirm must not set the open_owner as confirmed on error · bb22629e
      Trond Myklebust 提交于
      RFC3530 states that the open_owner is confirmed if and only if the client
      sends an OPEN_CONFIRM request with the appropriate sequence id and stateid
      within the lease period.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      bb22629e
    • T
      NFSv4: Fix circular locking dependency in nfs4_kill_renewd · b274b48f
      Trond Myklebust 提交于
      Erez Zadok reports:
      
      =======================================================
      [ INFO: possible circular locking dependency detected ]
      2.6.24-rc6-unionfs2 #80
      -------------------------------------------------------
      umount.nfs4/4017 is trying to acquire lock:
       (&(&clp->cl_renewd)->work){--..}, at: [<c0223e53>]
      __cancel_work_timer+0x83/0x17f
      
      but task is already holding lock:
       (&clp->cl_sem){----}, at: [<f8879897>] nfs4_kill_renewd+0x17/0x29 [nfs]
      
      which lock already depends on the new lock.
      
      
      the existing dependency chain (in reverse order) is:
      
      -> #1 (&clp->cl_sem){----}:
             [<c0230699>] __lock_acquire+0x9cc/0xb95
             [<c0230c39>] lock_acquire+0x5f/0x78
             [<c0397cb8>] down_read+0x3a/0x4c
             [<f88798e6>] nfs4_renew_state+0x1c/0x1b8 [nfs]
             [<c0223821>] run_workqueue+0xd9/0x1ac
             [<c0224220>] worker_thread+0x7a/0x86
             [<c0226b49>] kthread+0x3b/0x62
             [<c02033a3>] kernel_thread_helper+0x7/0x10
             [<ffffffff>] 0xffffffff
      
      -> #0 (&(&clp->cl_renewd)->work){--..}:
             [<c0230589>] __lock_acquire+0x8bc/0xb95
             [<c0230c39>] lock_acquire+0x5f/0x78
             [<c0223e87>] __cancel_work_timer+0xb7/0x17f
             [<c0223f5a>] cancel_delayed_work_sync+0xb/0xd
             [<f887989e>] nfs4_kill_renewd+0x1e/0x29 [nfs]
             [<f885a8f6>] nfs_free_client+0x37/0x9e [nfs]
             [<f885ab20>] nfs_put_client+0x5d/0x62 [nfs]
             [<f885ab9a>] nfs_free_server+0x75/0xae [nfs]
             [<f8862672>] nfs4_kill_super+0x27/0x2b [nfs]
             [<c0258aab>] deactivate_super+0x3f/0x51
             [<c0269668>] mntput_no_expire+0x42/0x67
             [<c025d0e4>] path_release_on_umount+0x15/0x18
             [<c0269d30>] sys_umount+0x1a3/0x1cb
             [<c0269d71>] sys_oldumount+0x19/0x1b
             [<c02026ca>] sysenter_past_esp+0x5f/0xa5
             [<ffffffff>] 0xffffffff
      
      Looking at the code, it would seem that taking the clp->cl_sem in
      nfs4_kill_renewd is completely redundant, since we're already guaranteed to
      have exclusive access to the nfs_client (we're shutting down).
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      b274b48f
    • T
      NFS: Fix a possible Oops in fs/nfs/super.c · e9cc6c23
      Trond Myklebust 提交于
      Sigh... commit 4584f520 (NFS: Fix NFS
      mountpoint crossing...) had a slight flaw: server can be NULL if sget()
      returned an existing superblock.
      
      Fix the fix by dereferencing s->s_fs_info.
      
      Thanks to Coverity/Adrian Bunk and Frank Filz for spotting the bug.
      (See http://bugzilla.kernel.org/show_bug.cgi?id=9647)
      
      Also add in the same namespace Oops fix for NFSv4 in both the mountpoint
      crossing case, and the referral case.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      e9cc6c23
    • A
      restrict reading from /proc/<pid>/maps to those who share ->mm or can ptrace pid · 831830b5
      Al Viro 提交于
      Contents of /proc/*/maps is sensitive and may become sensitive after
      open() (e.g.  if target originally shares our ->mm and later does exec
      on suid-root binary).
      
      Check at read() (actually, ->start() of iterator) time that mm_struct
      we'd grabbed and locked is
       - still the ->mm of target
       - equal to reader's ->mm or the target is ptracable by reader.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Acked-by: NRik van Riel <riel@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      831830b5
    • L
      Unify /proc/slabinfo configuration · 158a9624
      Linus Torvalds 提交于
      Both SLUB and SLAB really did almost exactly the same thing for
      /proc/slabinfo setup, using duplicate code and per-allocator #ifdef's.
      
      This just creates a common CONFIG_SLABINFO that is enabled by both SLUB
      and SLAB, and shares all the setup code.  Maybe SLOB will want this some
      day too.
      Reviewed-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      158a9624
    • P
      slub: register slabinfo to procfs · 6b6adc22
      Pekka Enberg 提交于
      We need to register slabinfo to procfs when CONFIG_SLUB is enabled to
      make the file actually visible to user-space.
      Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6b6adc22
  13. 24 12月, 2007 2 次提交