1. 17 Mar, 2006 2 commits
  2. 15 Mar, 2006 2 commits
    • Al Viro's avatar
      [PATCH] Fix ext2 readdir f_pos re-validation logic · 2d7f2ea9
      Al Viro authored
      This fixes not one, but _two_, silly (but admittedly hard to hit) bugs
      in the ext2 filesystem "readdir()" function.  It also cleans up the code
      to avoid the unnecessary goto mess.
      The bugs were related to re-valiating the f_pos value after somebody had
      either done an "lseek()" on the directory to an invalid offset, or when
      the offset had become invalid due to a file being unlinked in the
      directory.  The code would not only set the f_version too eagerly, it
      would also not update f_pos appropriately for when the offset fixup took
      When that happened, we'd occasionally subsequently fail the readdir()
      even when we shouldn't (no real harm done, but an ugly printk, and
      obviously you would end up not necessarily seeing all entries).
      Thanks to Masoud Sharbiani <masouds@google.com> who noticed the problem
      and had a test-case for it, and also fixed up a thinko in the first
      version of this patch.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Acked-by: default avatarMasoud Sharbiani <masouds@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Adrian Bunk's avatar
      [PATCH] fs/namespace.c:dup_namespace(): fix a use after free · f13b8358
      Adrian Bunk authored
      The Coverity checker spotted the following bug in dup_namespace():
      <--  snip  -->
              if (!new_ns->root) {
                      goto out;
              return new_ns;
      <--  snip  -->
      Callers expect a non-NULL result to not be freed.
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  3. 14 Mar, 2006 6 commits
  4. 11 Mar, 2006 2 commits
  5. 09 Mar, 2006 1 commit
  6. 08 Mar, 2006 7 commits
    • Randy Dunlap's avatar
      [NET] compat ifconf: fix limits · 1efa3c05
      Randy Dunlap authored
      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: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Latchesar Ionkov's avatar
      [PATCH] v9fs: fix for access to unitialized variables or freed memory · 731805b4
      Latchesar Ionkov authored
      Miscellaneous fixes related to accessing uninitialized variables or memory
      that was already freed.
      Signed-off-by: default avatarLatchesar Ionkov <lucho@ionkov.net>
      Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Horst Hummel's avatar
      [PATCH] s390: dasd partition detection · 90f0094d
      Horst Hummel authored
      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: default avatarHorst Hummel <horst.hummel@de.ibm.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • David Woodhouse's avatar
      [PATCH] jffs2: avoid divide-by-zero · e96fb230
      David Woodhouse authored
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Dipankar Sarma's avatar
      [PATCH] fix file counting · 529bf6be
      Dipankar Sarma authored
      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: default avatarDipankar Sarma <dipankar@in.ibm.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Phillip Susi's avatar
      [PATCH] udf: fix uid/gid options and add uid/gid=ignore and forget options · 4d6660eb
      Phillip Susi authored
      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: default avatarPhillip Susi <psusi@cfl.rr.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Linus Torvalds's avatar
      Mark the pipe file operations static · a19cbd4b
      Linus Torvalds authored
      They aren't used (nor even really usable) outside of pipe.c anyway
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  7. 07 Mar, 2006 1 commit
  8. 06 Mar, 2006 4 commits
  9. 04 Mar, 2006 1 commit
    • Steve French's avatar
      [CIFS] Always match oplock break (cache notification) to the right tcp · e77e6f3b
      Steve French authored
      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)
  10. 02 Mar, 2006 5 commits
  11. 01 Mar, 2006 9 commits