1. 02 4月, 2019 2 次提交
    • S
      smb3: Fix enumerating snapshots to Azure · 153322f7
      Steve French 提交于
      Some servers (see MS-SMB2 protocol specification
      section 3.3.5.15.1) expect that the FSCTL enumerate snapshots
      is done twice, with the first query having EXACTLY the minimum
      size response buffer requested (16 bytes) which refreshes
      the snapshot list (otherwise that and subsequent queries get
      an empty list returned).  So had to add code to set
      the maximum response size differently for the first snapshot
      query (which gets the size needed for the second query which
      contains the actual list of snapshots).
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com>
      CC: Stable <stable@vger.kernel.org> # 4.19+
      153322f7
    • R
      cifs: fix kref underflow in close_shroot() · 2f94a312
      Ronnie Sahlberg 提交于
      Fix a bug where we used to not initialize the cached fid structure at all
      in open_shroot() if the open was successful but we did not get a lease.
      This would leave the structure uninitialized and later when we close the handle
      we would in close_shroot() try to kref_put() an uninitialized refcount.
      
      Fix this by always initializing this structure if the open was successful
      but only do the extra get() if we got a lease.
      This extra get() is only used to hold the structure until we get a lease
      break from the server at which point we will kref_put() it during lease
      processing.
      Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      CC: Stable <stable@vger.kernel.org>
      2f94a312
  2. 15 3月, 2019 8 次提交
  3. 06 3月, 2019 2 次提交
  4. 05 3月, 2019 6 次提交
  5. 30 1月, 2019 1 次提交
  6. 25 1月, 2019 3 次提交
  7. 24 1月, 2019 1 次提交
    • P
      CIFS: Fix possible hang during async MTU reads and writes · acc58d0b
      Pavel Shilovsky 提交于
      When doing MTU i/o we need to leave some credits for
      possible reopen requests and other operations happening
      in parallel. Currently we leave 1 credit which is not
      enough even for reopen only: we need at least 2 credits
      if durable handle reconnect fails. Also there may be
      other operations at the same time including compounding
      ones which require 3 credits at a time each. Fix this
      by leaving 8 credits which is big enough to cover most
      scenarios.
      
      Was able to reproduce this when server was configured
      to give out fewer credits than usual.
      
      The proper fix would be to reconnect a file handle first
      and then obtain credits for an MTU request but this leads
      to bigger code changes and should happen in other patches.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NPavel Shilovsky <pshilov@microsoft.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      acc58d0b
  8. 03 1月, 2019 1 次提交
  9. 31 12月, 2018 1 次提交
  10. 24 12月, 2018 3 次提交
  11. 19 12月, 2018 1 次提交
    • R
      smb3: Fix rmdir compounding regression to strict servers · 271b9c0c
      Ronnie Sahlberg 提交于
      Some servers require that the setinfo matches the exact size,
      and in this case compounding changes introduced by
      commit c2e0fe3f ("cifs: make rmdir() use compounding")
      caused us to send 8 bytes (padded length) instead of 1 byte
      (the size of the structure).  See MS-FSCC section 2.4.11.
      
      Fixing this when we send a SET_INFO command for delete file
      disposition, then ends up as an iov of a single byte but this
      causes problems with SMB3 and encryption.
      
      To avoid this, instead of creating a one byte iov for the disposition value
      and then appending an additional iov with a 7 byte padding we now handle
      this as a single 8 byte iov containing both the disposition byte as well as
      the padding in one single buffer.
      Signed-off-by: NRonnie Sahlberg <lsahlber@redhat.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Acked-by: NPaulo Alcantara <palcantara@suse.de>
      271b9c0c
  12. 03 11月, 2018 2 次提交
  13. 24 10月, 2018 9 次提交