1. 25 1月, 2018 20 次提交
  2. 07 12月, 2017 1 次提交
  3. 27 10月, 2017 1 次提交
  4. 26 10月, 2017 4 次提交
  5. 19 10月, 2017 1 次提交
  6. 21 9月, 2017 1 次提交
  7. 20 9月, 2017 3 次提交
  8. 18 9月, 2017 1 次提交
    • S
      SMB3: Add support for multidialect negotiate (SMB2.1 and later) · 9764c02f
      Steve French 提交于
      With the need to discourage use of less secure dialect, SMB1 (CIFS),
      we temporarily upgraded the dialect to SMB3 in 4.13, but since there
      are various servers which only support SMB2.1 (2.1 is more secure
      than CIFS/SMB1) but not optimal for a default dialect - add support
      for multidialect negotiation.  cifs.ko will now request SMB2.1
      or later (ie SMB2.1 or SMB3.0, SMB3.02) and the server will
      pick the latest most secure one it can support.
      
      In addition since we are sending multidialect negotiate, add
      support for secure negotiate to validate that a man in the
      middle didn't downgrade us.
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com>
      CC: Stable <stable@vger.kernel.org> # 4.13+
      9764c02f
  9. 13 9月, 2017 1 次提交
  10. 05 9月, 2017 3 次提交
    • S
      cifs: Check for timeout on Negotiate stage · 76e75270
      Samuel Cabrero 提交于
      Some servers seem to accept connections while booting but never send
      the SMBNegotiate response neither close the connection, causing all
      processes accessing the share hang on uninterruptible sleep state.
      
      This happens when the cifs_demultiplex_thread detects the server is
      unresponsive so releases the socket and start trying to reconnect.
      At some point, the faulty server will accept the socket and the TCP
      status will be set to NeedNegotiate. The first issued command accessing
      the share will start the negotiation (pid 5828 below), but the response
      will never arrive so other commands will be blocked waiting on the mutex
      (pid 55352).
      
      This patch checks for unresponsive servers also on the negotiate stage
      releasing the socket and reconnecting if the response is not received
      and checking again the tcp state when the mutex is acquired.
      
      PID: 55352  TASK: ffff880fd6cc02c0  CPU: 0   COMMAND: "ls"
       #0 [ffff880fd9add9f0] schedule at ffffffff81467eb9
       #1 [ffff880fd9addb38] __mutex_lock_slowpath at ffffffff81468fe0
       #2 [ffff880fd9addba8] mutex_lock at ffffffff81468b1a
       #3 [ffff880fd9addbc0] cifs_reconnect_tcon at ffffffffa042f905 [cifs]
       #4 [ffff880fd9addc60] smb_init at ffffffffa042faeb [cifs]
       #5 [ffff880fd9addca0] CIFSSMBQPathInfo at ffffffffa04360b5 [cifs]
       ....
      
      Which is waiting a mutex owned by:
      
      PID: 5828   TASK: ffff880fcc55e400  CPU: 0   COMMAND: "xxxx"
       #0 [ffff880fbfdc19b8] schedule at ffffffff81467eb9
       #1 [ffff880fbfdc1b00] wait_for_response at ffffffffa044f96d [cifs]
       #2 [ffff880fbfdc1b60] SendReceive at ffffffffa04505ce [cifs]
       #3 [ffff880fbfdc1bb0] CIFSSMBNegotiate at ffffffffa0438d79 [cifs]
       #4 [ffff880fbfdc1c50] cifs_negotiate_protocol at ffffffffa043b383 [cifs]
       #5 [ffff880fbfdc1c80] cifs_reconnect_tcon at ffffffffa042f911 [cifs]
       #6 [ffff880fbfdc1d20] smb_init at ffffffffa042faeb [cifs]
       #7 [ffff880fbfdc1d60] CIFSSMBQFSInfo at ffffffffa0434eb0 [cifs]
       ....
      Signed-off-by: NSamuel Cabrero <scabrero@suse.de>
      Reviewed-by: NAurélien Aptel <aaptel@suse.de>
      Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      76e75270
    • R
      cifs: Add support for writing attributes on SMB2+ · 5517554e
      Ronnie Sahlberg 提交于
      This adds support for writing extended attributes on SMB2+ shares.
      Attributes can be written using the setfattr command.
      
      RH-bz: 1110709
      Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com>
      5517554e
    • R
      cifs: Add support for reading attributes on SMB2+ · 95907fea
      Ronnie Sahlberg 提交于
      SMB1 already has support to read attributes. This adds similar support
      to SMB2+.
      
      With this patch, tools such as 'getfattr' will now work with SMB2+ shares.
      
      RH-bz: 1110709
      Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com>
      95907fea
  11. 01 9月, 2017 1 次提交
  12. 24 8月, 2017 1 次提交
    • S
      cifs: Fix df output for users with quota limits · 42bec214
      Sachin Prabhu 提交于
      The df for a SMB2 share triggers a GetInfo call for
      FS_FULL_SIZE_INFORMATION. The values returned are used to populate
      struct statfs.
      
      The problem is that none of the information returned by the call
      contains the total blocks available on the filesystem. Instead we use
      the blocks available to the user ie. quota limitation when filling out
      statfs.f_blocks. The information returned does contain Actual free units
      on the filesystem and is used to populate statfs.f_bfree. For users with
      quota enabled, it can lead to situations where the total free space
      reported is more than the total blocks on the system ending up with df
      reports like the following
      
       # df -h /mnt/a
      Filesystem         Size  Used Avail Use% Mounted on
      //192.168.22.10/a  2.5G -2.3G  2.5G    - /mnt/a
      
      To fix this problem, we instead populate both statfs.f_bfree with the
      same value as statfs.f_bavail ie. CallerAvailableAllocationUnits. This
      is similar to what is done already in the code for cifs and df now
      reports the quota information for the user used to mount the share.
      
       # df --si /mnt/a
      Filesystem         Size  Used Avail Use% Mounted on
      //192.168.22.10/a  2.7G  101M  2.6G   4% /mnt/a
      Signed-off-by: NSachin Prabhu <sprabhu@redhat.com>
      Signed-off-by: NPierguido Lambri <plambri@redhat.com>
      Signed-off-by: NSteve French <smfrench@gmail.com>
      Cc: <stable@vger.kernel.org>
      42bec214
  13. 10 7月, 2017 1 次提交
  14. 09 7月, 2017 1 次提交