1. 17 Oct, 2007 3 commits
    • Steve French's avatar
      [CIFS] fix bad handling of EAGAIN error on kernel_recvmsg in cifs_demultiplex_thread · c18c732e
      Steve French authored
      When kernel_recvmsg returns -EAGAIN or -ERESTARTSYS, then
      cifs_demultiplex_thread sleeps for a bit and then tries the read again.
      When it does this, it's not zeroing out the length and that throws off
      the value of total_read. Fix it to zero out the length.
      
      Can cause memory corruption:
      If kernel_recvmsg returns an error and total_read is a large enough
      value, then we'll end up going through the loop again. total_read will
      be a bogus value, as will (pdu_length-total_read). When this happens we
      end up calling kernel_recvmsg with a bogus value (possibly larger than
      the current iov_len).
      
      At that point, memcpy_toiovec can overrun iov. It will start walking
      up the stack, casting other things that are there to struct iovecs
      (since it assumes that it's been passed an array of them). Any pointer
      on the stack at an address above the kvec is a candidate for corruption
      here.
      
      Many thanks to Ulrich Obergfell for pointing this out.
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      c18c732e
    • Steve French's avatar
      [CIFS] build break · adddd49d
      Steve French authored
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      adddd49d
    • Steve French's avatar
      [CIFS] endian fixes · adbc0358
      Steve French authored
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      adbc0358
  2. 16 Oct, 2007 7 commits
  3. 14 Oct, 2007 1 commit
  4. 12 Oct, 2007 4 commits
  5. 04 Oct, 2007 1 commit
    • Steve French's avatar
      [CIFS] Fix cifsd so shuts down when signing fails during mount · a013689d
      Steve French authored
      Fixes two problems:
      1) we dropped down to negotiating lanman if we did not recognize the
      mechanism (krb5 e.g.)
      2) we did not stop cifsd (thus will fail when doing rmod cifs with
      slab free errors) when we fail tcon but have a bad session (which is
      the case in which signing is required but we don't allow signing on
      the client)
      
      It also turns on extended security flag in the header when passing
      "sec=krb5" on mount command (although kerberos support is not done of
      course)
      Acked-by: default avatarJeff Layton <jlayton@redhat.com>
      CC: Shaggy <shaggy@us.ibm.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      a013689d
  6. 03 Oct, 2007 3 commits
  7. 02 Oct, 2007 1 commit
    • Steve French's avatar
      [CIFS] Reduce chance of list corruption in find_writable_file · 9b22b0b7
      Steve French authored
      When find_writable_file is racing with close and the session
      to the server goes down, Shaggy noticed that there was a
      chance that an open file in the list of files off the inode
      could have been freed by close since cifs_reconnect can
      block (the spinlock thus not held). This means that
      we have to start over at the beginning of the list in some
      cases.
      
      There is a 2nd change that needs to be made later
      (pointed out by Jeremy Allison and Shaggy) in order to
      prevent cifs_close ever freeing the cifs per file info
      when a write is pending.  Although we delay close from
      freeing this memory for sufficiently long for all known
      cases, ultimately on a very, very slow write
      overlapping a close pending we need to allow close to return
      (without freeing the cifs file info) and defer freeing the
      memory to be the responsibility of the (sloooow) write
      thread (presumably have to look at every place wrtPending
      is decremented - and add a flag for deferred free for
      after wrtPending goes to zero).
      Acked-by: default avatarShaggy <shaggy@us.ibm.com>
      Acked-by: default avatarShirish Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      9b22b0b7
  8. 01 Oct, 2007 1 commit
  9. 29 Sep, 2007 1 commit
  10. 28 Sep, 2007 2 commits
  11. 25 Sep, 2007 2 commits
  12. 24 Sep, 2007 1 commit
  13. 20 Sep, 2007 3 commits
  14. 17 Sep, 2007 1 commit
  15. 16 Sep, 2007 1 commit
  16. 15 Sep, 2007 3 commits
  17. 13 Sep, 2007 1 commit
  18. 11 Sep, 2007 1 commit
  19. 07 Sep, 2007 1 commit
  20. 31 Aug, 2007 1 commit
  21. 30 Aug, 2007 1 commit