1. 20 3月, 2008 8 次提交
  2. 18 3月, 2008 3 次提交
  3. 15 3月, 2008 3 次提交
    • J
      nfsd: fix oops on access from high-numbered ports · b663c6fd
      J. Bruce Fields 提交于
      This bug was always here, but before my commit 6fa02839
      ("recheck for secure ports in fh_verify"), it could only be triggered by
      failure of a kmalloc().  After that commit it could be triggered by a
      client making a request from a non-reserved port for access to an export
      marked "secure".  (Exports are "secure" by default.)
      
      The result is a struct svc_export with a reference count one too low,
      resulting in likely oopses next time the export is accessed.
      
      The reference counting here is not straightforward; a later patch will
      clean up fh_verify().
      
      Thanks to Lukas Hejtmanek for the bug report and followup.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b663c6fd
    • F
      NFS: fix encode_fsinfo_maxsz · 2f42b5d0
      Fred Isaman 提交于
      The previous value was not taking into account space for bitmap array size.
      Signed-off-by: NFred Isaman <iisaman@citi.umich.edu>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2f42b5d0
    • T
      SUNRPC: Add a helper rpcauth_lookup_generic_cred() · 98a8e323
      Trond Myklebust 提交于
      The NFSv4 protocol allows clients to negotiate security protocols on the
      fly in the case where an administrator on the server changes the export
      settings and/or in the case where we may have a filesystem migration event.
      
      Instead of having the NFS client code cache credentials that are tied to a
      particular AUTH method it is therefore preferable to have a generic credential
      that can be converted into whatever AUTH is in use by the RPC client when
      the read/write/sillyrename/... is put on the wire.
      
      We do this by means of the new "generic" credential, which basically just
      caches the minimal information that is needed to look up an RPCSEC_GSS,
      AUTH_SYS, or AUTH_NULL credential.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      98a8e323
  4. 14 3月, 2008 1 次提交
  5. 12 3月, 2008 1 次提交
  6. 11 3月, 2008 11 次提交
  7. 08 3月, 2008 4 次提交
    • T
      NFS: Fix dentry revalidation for NFSv4 referrals and mountpoint crossings · 4e99a1ff
      Trond Myklebust 提交于
      As long as the directory contents haven't changed, we should just let the
      path walk proceed to cross the mountpoint. Apart from being an optimisation
      in the case of 'nohide' mountpoint traversals, it also fixes an issue with
      referrals: referral inodes don't have valid filehandles, so calling
      nfs_revalidate_inode() on them is a bug.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4e99a1ff
    • T
      NFS: Fix the fsid revalidation in nfs_update_inode() · c37dcd33
      Trond Myklebust 提交于
      When we detect that we've crossed a mountpoint on the remote server, we
      must take care not to use that inode to revalidate the fsid on our
      current superblock. To do so, we label the inode as a remote mountpoint,
      and check for that in nfs_update_inode().
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c37dcd33
    • T
      NFS: Fix an f_mode/f_flags confusion in fs/nfs/write.c · af1b8c2f
      Trond Myklebust 提交于
      O_SYNC is stored in filp->f_flags.
      Thanks to Al Viro for pointing out the bug.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      af1b8c2f
    • P
      [NET]: Make /proc/net a symlink on /proc/self/net (v3) · e9720acd
      Pavel Emelyanov 提交于
      Current /proc/net is done with so called "shadows", but current
      implementation is broken and has little chances to get fixed.
      
      The problem is that dentries subtree of /proc/net directory has
      fancy revalidation rules to make processes living in different
      net namespaces see different entries in /proc/net subtree, but
      currently, tasks see in the /proc/net subdir the contents of any
      other namespace, depending on who opened the file first.
      
      The proposed fix is to turn /proc/net into a symlink, which points
      to /proc/self/net, which in turn shows what previously was in
      /proc/net - the network-related info, from the net namespace the
      appropriate task lives in.
      
      # ls -l /proc/net
      lrwxrwxrwx  1 root root 8 Mar  5 15:17 /proc/net -> self/net
      
      In other words - this behaves like /proc/mounts, but unlike
      "mounts", "net" is not a file, but a directory.
      
      Changes from v2:
      * Fixed discrepancy of /proc/net nlink count and selinux labeling
        screwup pointed out by Stephen.
      
        To get the correct nlink count the ->getattr callback for /proc/net
        is overridden to read one from the net->proc_net entry.
      
        To make selinux still work the net->proc_net entry is initialized
        properly, i.e. with the "net" name and the proc_net parent.
      
      Selinux fixes are
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      
      Changes from v1:
      * Fixed a task_struct leak in get_proc_task_net, pointed out by Paul.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Acked-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9720acd
  8. 06 3月, 2008 4 次提交
    • D
      [XFS] fix inode leak in xfs_iget_core() · 72772a3b
      David Chinner 提交于
      If the radix_tree_preload() fails, we need to destroy the inode we just
      read in before trying again. This could leak xfs_vnode structures when
      there is memory pressure. Noticed by Christoph Hellwig.
      
      SGI-PV: 977823
      SGI-Modid: xfs-linux-melb:xfs-kern:30606a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      72772a3b
    • D
      [XFS] 977545 977545 977545 977545 977545 977545 xfsaild causing too many · 92d9cd10
      David Chinner 提交于
      wakeups
      
      Idle state is not being detected properly by the xfsaild push code. The
      current idle state is detected by an empty list which may never happen
      with mostly idle filesystem or one using lazy superblock counters. A
      single dirty item in the list that exists beyond the push target can
      result repeated looping attempting to push up to the target because it
      fails to check if the push target has been acheived or not.
      
      Fix by considering a dirty list with everything past the target as an idle
      state and set the timeout appropriately.
      
      SGI-PV: 977545
      SGI-Modid: xfs-linux-melb:xfs-kern:30532a
      Signed-off-by: NDavid Chinner <dgc@sgi.com>
      Signed-off-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NLachlan McIlroy <lachlan@sgi.com>
      92d9cd10
    • E
      NFS: use new LSM interfaces to explicitly set mount options · f9c3a380
      Eric Paris 提交于
      NFS and SELinux worked together previously because SELinux had NFS
      specific knowledge built in.  This design was approved by both groups
      back in 2004 but the recent NFS changes to use nfs_parsed_mount_data and
      the usage of nfs_clone_mount_data showed this to be a poor fragile
      solution.  This patch fixes the NFS functionality regression by making
      use of the new LSM interfaces to allow an FS to explicitly set its own
      mount options.
      
      The explicit setting of mount options is done in the nfs get_sb
      functions which are called before the generic vfs hooks try to set mount
      options for filesystems which use text mount data.
      
      This does not currently support NFSv4 as that functionality did not
      exist in previous kernels and thus there is no regression.  I will be
      adding the needed code, which I believe to be the exact same as the v3
      code, in nfs4_get_sb for 2.6.26.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      f9c3a380
    • E
      LSM/SELinux: Interfaces to allow FS to control mount options · e0007529
      Eric Paris 提交于
      Introduce new LSM interfaces to allow an FS to deal with their own mount
      options.  This includes a new string parsing function exported from the
      LSM that an FS can use to get a security data blob and a new security
      data blob.  This is particularly useful for an FS which uses binary
      mount data, like NFS, which does not pass strings into the vfs to be
      handled by the loaded LSM.  Also fix a BUG() in both SELinux and SMACK
      when dealing with binary mount data.  If the binary mount data is less
      than one page the copy_page() in security_sb_copy_data() can cause an
      illegal page fault and boom.  Remove all NFSisms from the SELinux code
      since they were broken by past NFS changes.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Acked-by: NCasey Schaufler <casey@schaufler-ca.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      e0007529
  9. 05 3月, 2008 5 次提交