1. 18 10月, 2007 2 次提交
    • S
      [CIFS] Fix minor problems noticed by scan · d5d18501
      Steve French 提交于
      Coverity scan pointed out some minor possible errors.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      d5d18501
    • S
      [CIFS] fix bad handling of EAGAIN error on kernel_recvmsg in cifs_demultiplex_thread · c18c732e
      Steve French 提交于
      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: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      c18c732e
  2. 17 10月, 2007 9 次提交
  3. 15 10月, 2007 1 次提交
  4. 13 10月, 2007 3 次提交
  5. 12 10月, 2007 1 次提交
  6. 05 10月, 2007 1 次提交
    • S
      [CIFS] Fix cifsd so shuts down when signing fails during mount · a013689d
      Steve French 提交于
      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: NJeff Layton <jlayton@redhat.com>
      CC: Shaggy <shaggy@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      a013689d
  7. 04 10月, 2007 3 次提交
  8. 02 10月, 2007 2 次提交
    • S
      [CIFS] Reduce chance of list corruption in find_writable_file · 9b22b0b7
      Steve French 提交于
      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: NShaggy <shaggy@us.ibm.com>
      Acked-by: NShirish Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      9b22b0b7
    • S
      [CIFS] change misleading field name · 4084973d
      Steve French 提交于
      num_auth is really num_subauth in ACL terminology
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      4084973d
  9. 29 9月, 2007 2 次提交
  10. 28 9月, 2007 1 次提交
  11. 26 9月, 2007 2 次提交
  12. 25 9月, 2007 1 次提交
  13. 20 9月, 2007 3 次提交
  14. 17 9月, 2007 2 次提交
  15. 15 9月, 2007 3 次提交
  16. 14 9月, 2007 1 次提交
  17. 11 9月, 2007 1 次提交
  18. 08 9月, 2007 1 次提交
  19. 31 8月, 2007 1 次提交