1. 06 3月, 2019 5 次提交
  2. 05 3月, 2019 4 次提交
  3. 31 1月, 2019 1 次提交
  4. 30 1月, 2019 3 次提交
  5. 25 1月, 2019 1 次提交
  6. 24 1月, 2019 1 次提交
    • C
      cifs: fix memory leak of an allocated cifs_ntsd structure · 73aaf920
      Colin Ian King 提交于
      The call to SMB2_queary_acl can allocate memory to pntsd and also
      return a failure via a call to SMB2_query_acl (and then query_info).
      This occurs when query_info allocates the structure and then in
      query_info the call to smb2_validate_and_copy_iov fails. Currently the
      failure just returns without kfree'ing pntsd hence causing a memory
      leak.
      
      Currently, *data is allocated if it's not already pointing to a buffer,
      so it needs to be kfree'd only if was allocated in query_info, so the
      fix adds an allocated flag to track this.  Also set *dlen to zero on
      an error just to be safe since *data is kfree'd.
      
      Also set errno to -ENOMEM if the allocation of *data fails.
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Reviewed-by: NDan Carpener <dan.carpenter@oracle.com>
      73aaf920
  7. 11 1月, 2019 2 次提交
  8. 04 1月, 2019 1 次提交
  9. 29 12月, 2018 2 次提交
  10. 24 12月, 2018 1 次提交
  11. 03 11月, 2018 2 次提交
    • S
      smb3: allow more detailed protocol info on open files for debugging · dfe33f9a
      Steve French 提交于
      In order to debug complex problems it is often helpful to
      have detailed information on the client and server view
      of the open file information.  Add the ability for root to
      view the list of smb3 open files and dump the persistent
      handle and other info so that it can be more easily
      correlated with server logs.
      
      Sample output from "cat /proc/fs/cifs/open_files"
      
       # Version:1
       # Format:
       # <tree id> <persistent fid> <flags> <count> <pid> <uid> <filename> <mid>
       0x5 0x800000378 0x8000 1 7704 0 some-file 0x14
       0xcb903c0c 0x84412e67 0x8000 1 7754 1001 rofile 0x1a6d
       0xcb903c0c 0x9526b767 0x8000 1 7720 1000 file 0x1a5b
       0xcb903c0c 0x9ce41a21 0x8000 1 7715 0 smallfile 0xd67
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
      dfe33f9a
    • S
      smb3: add trace point for tree connection · f8af49dd
      Steve French 提交于
      In debugging certain scenarios, especially reconnect cases,
      it can be helpful to have a dynamic trace point for the
      result of tree connect.  See sample output below
      from a reconnect event. The new event is 'smb3_tcon'
      
                  TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
                     | |       |   ||||       |         |
                 cifsd-6071  [001] ....  2659.897923: smb3_reconnect: server=localhost current_mid=0xa
           kworker/1:1-71    [001] ....  2666.026342: smb3_cmd_done: 	sid=0x0 tid=0x0 cmd=0 mid=0
           kworker/1:1-71    [001] ....  2666.026576: smb3_cmd_err: 	sid=0xc49e1787 tid=0x0 cmd=1 mid=1 status=0xc0000016 rc=-5
           kworker/1:1-71    [001] ....  2666.031677: smb3_cmd_done: 	sid=0xc49e1787 tid=0x0 cmd=1 mid=2
           kworker/1:1-71    [001] ....  2666.031921: smb3_cmd_done: 	sid=0xc49e1787 tid=0x6e78f05f cmd=3 mid=3
           kworker/1:1-71    [001] ....  2666.031923: smb3_tcon: xid=0 sid=0xc49e1787 tid=0x0 unc_name=\\localhost\test rc=0
           kworker/1:1-71    [001] ....  2666.032097: smb3_cmd_done: 	sid=0xc49e1787 tid=0x6e78f05f cmd=11 mid=4
           kworker/1:1-71    [001] ....  2666.032265: smb3_cmd_done: 	sid=0xc49e1787 tid=0x7912332f cmd=3 mid=5
           kworker/1:1-71    [001] ....  2666.032266: smb3_tcon: xid=0 sid=0xc49e1787 tid=0x0 unc_name=\\localhost\IPC$ rc=0
           kworker/1:1-71    [001] ....  2666.032386: smb3_cmd_done: 	sid=0xc49e1787 tid=0x7912332f cmd=11 mid=6
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
      f8af49dd
  12. 24 10月, 2018 12 次提交
  13. 12 9月, 2018 2 次提交
  14. 03 9月, 2018 1 次提交
  15. 24 8月, 2018 1 次提交
  16. 11 8月, 2018 1 次提交
    • S
      smb3: allow previous versions to be mounted with snapshot= mount parm · cdeaf9d0
      Steve French 提交于
      mounting with the "snapshots=" mount parm allows a read-only
      view of a previous version of a file system (see MS-SMB2
      and "timewarp" tokens, section 2.2.13.2.6) based on the timestamp
      passed in on the snapshots mount parm.
      
      Add processing to optionally send this create context.
      
      Example output:
      
      /mnt1 is mounted with "snapshots=..." and will see an earlier
      version of the directory, with three fewer files than /mnt2
      the current version of the directory.
      
      root@Ubuntu-17-Virtual-Machine:~/cifs-2.6# cat /proc/mounts | grep cifs
      //172.22.149.186/public /mnt1 cifs
      ro,relatime,vers=default,cache=strict,username=smfrench,uid=0,noforceuid,gid=0,noforcegid,addr=172.22.149.186,file_mode=0755,dir_mode=0755,soft,nounix,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,snapshot=131748608570000000,actimeo=1
      
      //172.22.149.186/public /mnt2 cifs
      rw,relatime,vers=default,cache=strict,username=smfrench,uid=0,noforceuid,gid=0,noforcegid,addr=172.22.149.186,file_mode=0755,dir_mode=0755,soft,nounix,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1
      
      root@Ubuntu-17-Virtual-Machine:~/cifs-2.6# ls /mnt1
      EmptyDir  newerdir
      root@Ubuntu-17-Virtual-Machine:~/cifs-2.6# ls /mnt1/newerdir
      
      root@Ubuntu-17-Virtual-Machine:~/cifs-2.6# ls /mnt2
      EmptyDir  file  newerdir  newestdir  timestamp-trace.cap
      root@Ubuntu-17-Virtual-Machine:~/cifs-2.6# ls /mnt2/newerdir
      new-file-not-in-snapshot
      
      Snapshots are extremely useful for comparing previous versions of files or directories,
      and recovering from data corruptions or mistakes.
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Reviewed-by: NRonnie Sahlberg <lsahlber@redhat.com>
      cdeaf9d0