1. 14 3月, 2006 2 次提交
    • T
      [PATCH] NFSv4: fix mount segfault on errors returned that are < -1000 · c12e87f4
      Trond Myklebust 提交于
      It turns out that nfs4_proc_get_root() may return raw NFSv4 errors instead of
      mapping them to kernel errors.  Problem spotted by Neil Horman
      <nhorman@tuxdriver.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c12e87f4
    • T
      [PATCH] NFS: Fix a potential panic in O_DIRECT · 143f412e
      Trond Myklebust 提交于
      Based on an original patch by Mike O'Connor and Greg Banks of SGI.
      
      Mike states:
      
      A normal user can panic an NFS client and cause a local DoS with
      'judicious'(?) use of O_DIRECT.  Any O_DIRECT write to an NFS file where the
      user buffer starts with a valid mapped page and contains an unmapped page,
      will crash in this way.  I haven't followed the code, but O_DIRECT reads with
      similar user buffers will probably also crash albeit in different ways.
      
      Details: when nfs_get_user_pages() calls get_user_pages(), it detects and
      correctly handles get_user_pages() returning an error, which happens if the
      first page covered by the user buffer's address range is unmapped.  However,
      if the first page is mapped but some subsequent page isn't, get_user_pages()
      will return a positive number which is less than the number of pages requested
      (this behaviour is sort of analagous to a short write() call and appears to be
      intentional).  nfs_get_user_pages() doesn't detect this and hands off the
      array of pages (whose last few elements are random rubbish from the newly
      allocated array memory) to it's caller, whence they go to
      nfs_direct_write_seg(), which then totally ignores the nr_pages it's given,
      and calculates its own idea of how many pages are in the array from the user
      buffer length.  Needless to say, when it comes to transmit those uninitialised
      page* pointers, we see a crash in the network stack.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      143f412e
  2. 12 3月, 2006 2 次提交
  3. 10 3月, 2006 1 次提交
  4. 09 3月, 2006 7 次提交
    • R
      [NET] compat ifconf: fix limits · 1efa3c05
      Randy Dunlap 提交于
      A recent change to compat. dev_ifconf() in fs/compat_ioctl.c
      causes ifconf data to be truncated 1 entry too early when copying it
      to userspace.  The correct amount of data (length) is returned,
      but the final entry is empty (zero, not filled in).
      The for-loop 'i' check should use <= to allow the final struct
      ifreq32 to be copied.  I also used the ifconf-corruption program
      in kernel bugzilla #4746 to make sure that this change does not
      re-introduce the corruption.
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1efa3c05
    • L
      [PATCH] v9fs: fix for access to unitialized variables or freed memory · 731805b4
      Latchesar Ionkov 提交于
      Miscellaneous fixes related to accessing uninitialized variables or memory
      that was already freed.
      Signed-off-by: NLatchesar Ionkov <lucho@ionkov.net>
      Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      731805b4
    • H
      [PATCH] s390: dasd partition detection · 90f0094d
      Horst Hummel 提交于
      DASD allows to open a device as soon as gendisk is registered, which means the
      device is a fake device (capacity=0) and we do know nothing about blocksize
      and partitions at that point of time.  In case the device is opened by
      someone, the bdev and inode creation is done with the fake device info and the
      following partition detection code is just using the wrong data.
      
      To avoid this modify the DASD state machine to make sure that the open is
      rejected until the device analysis is either finished or an unformatted device
      was detected.
      Signed-off-by: NHorst Hummel <horst.hummel@de.ibm.com>
      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>
      90f0094d
    • D
      [PATCH] jffs2: avoid divide-by-zero · e96fb230
      David Woodhouse 提交于
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e96fb230
    • D
      [PATCH] fix file counting · 529bf6be
      Dipankar Sarma 提交于
      I have benchmarked this on an x86_64 NUMA system and see no significant
      performance difference on kernbench.  Tested on both x86_64 and powerpc.
      
      The way we do file struct accounting is not very suitable for batched
      freeing.  For scalability reasons, file accounting was
      constructor/destructor based.  This meant that nr_files was decremented
      only when the object was removed from the slab cache.  This is susceptible
      to slab fragmentation.  With RCU based file structure, consequent batched
      freeing and a test program like Serge's, we just speed this up and end up
      with a very fragmented slab -
      
      llm22:~ # cat /proc/sys/fs/file-nr
      587730  0       758844
      
      At the same time, I see only a 2000+ objects in filp cache.  The following
      patch I fixes this problem.
      
      This patch changes the file counting by removing the filp_count_lock.
      Instead we use a separate percpu counter, nr_files, for now and all
      accesses to it are through get_nr_files() api.  In the sysctl handler for
      nr_files, we populate files_stat.nr_files before returning to user.
      
      Counting files as an when they are created and destroyed (as opposed to
      inside slab) allows us to correctly count open files with RCU.
      Signed-off-by: NDipankar Sarma <dipankar@in.ibm.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      529bf6be
    • P
      [PATCH] udf: fix uid/gid options and add uid/gid=ignore and forget options · 4d6660eb
      Phillip Susi 提交于
      Fix a bug in udf where it would write uid/gid = 0 to the disk for files
      owned by the id given with the uid=/gid= mount options.  It also adds 4 new
      mount options: uid/gid=forget and uid/gid=ignore.  Without any options the
      id in core and on disk always match.  Giving uid/gid=nnn specifies a
      default ID to be used in core when the on disk ID is -1.  uid/gid=ignore
      forces the in core ID to allways be used no matter what the on disk ID is.
      uid/gid=forget forces the on disk ID to always be written out as -1.
      
      The use of these options allows you to override ownerships on a disk or
      disable ownwership information from being written, allowing the media to be
      used portably between different computers and possibly different users
      without permissions issues that would require root to correct.
      Signed-off-by: NPhillip Susi <psusi@cfl.rr.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4d6660eb
    • L
      Mark the pipe file operations static · a19cbd4b
      Linus Torvalds 提交于
      They aren't used (nor even really usable) outside of pipe.c anyway
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a19cbd4b
  5. 08 3月, 2006 1 次提交
  6. 07 3月, 2006 4 次提交
  7. 05 3月, 2006 1 次提交
    • S
      [CIFS] Always match oplock break (cache notification) to the right tcp · e77e6f3b
      Steve French 提交于
      session when multiply mounted.
      
      Fixes slow response when cifs client is mounted to shares on multiple
      servers and oplock break occurs (usually due to attempt to multiply open a
      file).  When treeids on mutiple mounted shares match and we find the wrong
      match first, we searched for the wrong cached files to send oplock break
      response for which usually meant that no matching file was found and thus
      the server would have to timeout the notification.  Oplock break timeout is
      about 20 seconds on some servers so this could cause significantly slower
      performance on file open calls in a few cases (in particular when multiple
      shares are mounted from multiple servers, tree ids match, and we have a
      cached file which is later opened multiple times).  This was the most
      important of the bugs that was found and fixed at Connectathon
      (interoperability testing event) this week.
      
      Acked-by:  Shaggy (shaggy@austin.ibm.com)
      Signed-off-by: Steve French (sfrench@us.ibm.com)
      e77e6f3b
  8. 03 3月, 2006 5 次提交
  9. 02 3月, 2006 10 次提交
  10. 01 3月, 2006 2 次提交
  11. 28 2月, 2006 3 次提交
  12. 27 2月, 2006 2 次提交