1. 17 11月, 2008 1 次提交
  2. 15 11月, 2008 2 次提交
    • J
      cifs: reinstate sharing of SMB sessions sans races · 14fbf50d
      Jeff Layton 提交于
      We do this by abandoning the global list of SMB sessions and instead
      moving to a per-server list. This entails adding a new list head to the
      TCP_Server_Info struct. The refcounting for the cifsSesInfo is moved to
      a non-atomic variable. We have to protect it by a lock anyway, so there's
      no benefit to making it an atomic. The list and refcount are protected
      by the global cifs_tcp_ses_lock.
      
      The patch also adds a new routines to find and put SMB sessions and
      that properly take and put references under the lock.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      14fbf50d
    • J
      cifs: disable sharing session and tcon and add new TCP sharing code · e7ddee90
      Jeff Layton 提交于
      The code that allows these structs to be shared is extremely racy.
      Disable the sharing of SMB and tcon structs for now until we can
      come up with a way to do this that's race free.
      
      We want to continue to share TCP sessions, however since they are
      required for multiuser mounts. For that, implement a new (hopefully
      race-free) scheme. Add a new global list of TCP sessions, and take
      care to get a reference to it whenever we're dealing with one.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      e7ddee90
  3. 14 11月, 2008 1 次提交
    • S
      [CIFS] Fix cifs reconnection flags · 3b795210
      Steve French 提交于
      In preparation for Jeff's big umount/mount fixes to remove the possibility of
      various races in cifs mount and linked list handling of sessions, sockets and
      tree connections, this patch cleans up some repetitive code in cifs_mount,
      and addresses a problem with ses->status and tcon->tidStatus in which we
      were overloading the "need_reconnect" state with other status in that
      field.  So the "need_reconnect" flag has been broken out from those
      two state fields (need reconnect was not mutually exclusive from some of the
      other possible tid and ses states).  In addition, a few exit cases in
      cifs_mount were cleaned up, and a problem with a tcon flag (for lease support)
      was not being set consistently for the 2nd mount of the same share
      
      CC: Jeff Layton <jlayton@redhat.com>
      CC: Shirish Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      3b795210
  4. 31 10月, 2008 1 次提交
  5. 20 10月, 2008 1 次提交
  6. 09 10月, 2008 1 次提交
  7. 08 10月, 2008 1 次提交
    • S
      [CIFS] make sure we have the right resume info before calling CIFSFindNext · 0752f152
      Steve French 提交于
      When we do a seekdir() or equivalent, we usually end up doing a
      FindFirst call and then call FindNext until we get to the offset that we
      want. The problem is that when we call FindNext, the code usually
      doesn't have the proper info (mostly, the filename of the entry from the
      last search) to resume the search.
      
      Add a "last_entry" field to the cifs_search_info that points to the last
      entry in the search. We calculate this pointer by using the
      LastNameOffset field from the search parms that are returned. We then
      use that info to do a cifs_save_resume_key before we call CIFSFindNext.
      
      This patch allows CIFS to reliably pass the "telldir" connectathon test.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      CC: Stable <stable@kernel.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      0752f152
  8. 25 9月, 2008 1 次提交
  9. 24 9月, 2008 1 次提交
  10. 09 8月, 2008 1 次提交
  11. 06 8月, 2008 4 次提交
  12. 24 7月, 2008 2 次提交
  13. 04 6月, 2008 1 次提交
  14. 24 5月, 2008 1 次提交
  15. 22 5月, 2008 1 次提交
  16. 17 5月, 2008 2 次提交
  17. 15 5月, 2008 2 次提交
  18. 13 5月, 2008 3 次提交
  19. 12 5月, 2008 1 次提交
    • J
      [CIFS] when not using unix extensions, check for and set ATTR_READONLY on create and mkdir · 67750fb9
      Jeff Layton 提交于
      When creating a directory on a CIFS share without POSIX extensions,
      and the given mode has no write bits set, set the ATTR_READONLY bit.
      
      When creating a file, set ATTR_READONLY if the create mode has no write
      bits set and we're not using unix extensions.
      
      There are some comments about this being problematic due to the VFS
      splitting creates into 2 parts. I'm not sure what that's actually
      talking about, but I'm assuming that it has something to do with how
      mknod is implemented. In the simple case where we have no unix
      extensions and we're just creating a regular file, there's no reason
      we can't set ATTR_READONLY.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      67750fb9
  20. 29 4月, 2008 1 次提交
  21. 10 4月, 2008 1 次提交
  22. 13 2月, 2008 1 次提交
  23. 08 2月, 2008 1 次提交
  24. 31 12月, 2007 2 次提交
  25. 14 11月, 2007 1 次提交
    • S
      [CIFS] Fix buffer overflow if server sends corrupt response to small · 133672ef
      Steve French 提交于
      request
      
      In SendReceive() function in transport.c - it memcpy's
      message payload into a buffer passed via out_buf param. The function
      assumes that all buffers are of size (CIFSMaxBufSize +
      MAX_CIFS_HDR_SIZE) , unfortunately it is also called with smaller
      (MAX_CIFS_SMALL_BUFFER_SIZE) buffers.  There are eight callers
      (SMB worker functions) which are primarily affected by this change:
      
      TreeDisconnect, uLogoff, Close, findClose, SetFileSize, SetFileTimes,
      Lock and PosixLock
      
      CC: Dave Kleikamp <shaggy@austin.ibm.com>
      CC: Przemyslaw Wegrzyn <czajnik@czajsoft.pl>
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      133672ef
  26. 03 11月, 2007 1 次提交
  27. 27 10月, 2007 1 次提交
  28. 26 10月, 2007 1 次提交
  29. 24 10月, 2007 1 次提交
  30. 19 10月, 2007 1 次提交