1. 22 3月, 2006 1 次提交
  2. 21 3月, 2006 7 次提交
  3. 17 3月, 2006 2 次提交
  4. 16 3月, 2006 2 次提交
    • A
      [PATCH] Fix ext2 readdir f_pos re-validation logic · 2d7f2ea9
      Al Viro 提交于
      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
      place.
      
      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: NAl Viro <viro@zeniv.linux.org.uk>
      Acked-by: NMasoud Sharbiani <masouds@google.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2d7f2ea9
    • A
      [PATCH] fs/namespace.c:dup_namespace(): fix a use after free · f13b8358
      Adrian Bunk 提交于
      The Coverity checker spotted the following bug in dup_namespace():
      
      <--  snip  -->
      
              if (!new_ns->root) {
                      up_write(&namespace_sem);
                      kfree(new_ns);
                      goto out;
              }
      ...
      out:
              return new_ns;
      
      <--  snip  -->
      
      Callers expect a non-NULL result to not be freed.
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f13b8358
  5. 15 3月, 2006 3 次提交
  6. 14 3月, 2006 3 次提交
    • T
      [PATCH] NLM: Ensure we do not Oops in the case of an unlock · 30f4e20a
      Trond Myklebust 提交于
      In theory, NLM specs assure us that the server will only reply LCK_GRANTED or
      LCK_DENIED_GRACE_PERIOD to our NLM_UNLOCK request.
      
      In practice, we should not assume this to be the case, and the code will
      currently Oops if we do.
      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>
      30f4e20a
    • 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
  7. 12 3月, 2006 2 次提交
  8. 10 3月, 2006 2 次提交
  9. 09 3月, 2006 8 次提交
  10. 08 3月, 2006 1 次提交
  11. 07 3月, 2006 4 次提交
  12. 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
  13. 03 3月, 2006 4 次提交