1. 14 2月, 2022 1 次提交
  2. 18 1月, 2022 1 次提交
  3. 18 12月, 2021 1 次提交
  4. 13 11月, 2021 1 次提交
    • P
      cifs: fix memory leak of smb3_fs_context_dup::server_hostname · 869da64d
      Paulo Alcantara 提交于
      Fix memory leak of smb3_fs_context_dup::server_hostname when parsing
      and duplicating fs contexts during mount(2) as reported by kmemleak:
      
        unreferenced object 0xffff888125715c90 (size 16):
          comm "mount.cifs", pid 3832, jiffies 4304535868 (age 190.094s)
          hex dump (first 16 bytes):
            7a 65 6c 64 61 2e 74 65 73 74 00 6b 6b 6b 6b a5  zelda.test.kkkk.
          backtrace:
            [<ffffffff8168106e>] kstrdup+0x2e/0x60
            [<ffffffffa027a362>] smb3_fs_context_dup+0x392/0x8d0 [cifs]
            [<ffffffffa0136353>] cifs_smb3_do_mount+0x143/0x1700 [cifs]
            [<ffffffffa02795e8>] smb3_get_tree+0x2e8/0x520 [cifs]
            [<ffffffff817a19aa>] vfs_get_tree+0x8a/0x2d0
            [<ffffffff8181e3e3>] path_mount+0x423/0x1a10
            [<ffffffff8181fbca>] __x64_sys_mount+0x1fa/0x270
            [<ffffffff83ae364b>] do_syscall_64+0x3b/0x90
            [<ffffffff83c0007c>] entry_SYSCALL_64_after_hwframe+0x44/0xae
        unreferenced object 0xffff888111deed20 (size 32):
          comm "mount.cifs", pid 3832, jiffies 4304536044 (age 189.918s)
          hex dump (first 32 bytes):
            44 46 53 52 4f 4f 54 31 2e 5a 45 4c 44 41 2e 54  DFSROOT1.ZELDA.T
            45 53 54 00 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5  EST.kkkkkkkkkkk.
          backtrace:
            [<ffffffff8168118d>] kstrndup+0x2d/0x90
            [<ffffffffa027ab2e>] smb3_parse_devname+0x9e/0x360 [cifs]
            [<ffffffffa01870c8>] cifs_setup_volume_info+0xa8/0x470 [cifs]
            [<ffffffffa018c469>] connect_dfs_target+0x309/0xc80 [cifs]
            [<ffffffffa018d6cb>] cifs_mount+0x8eb/0x17f0 [cifs]
            [<ffffffffa0136475>] cifs_smb3_do_mount+0x265/0x1700 [cifs]
            [<ffffffffa02795e8>] smb3_get_tree+0x2e8/0x520 [cifs]
            [<ffffffff817a19aa>] vfs_get_tree+0x8a/0x2d0
            [<ffffffff8181e3e3>] path_mount+0x423/0x1a10
            [<ffffffff8181fbca>] __x64_sys_mount+0x1fa/0x270
            [<ffffffff83ae364b>] do_syscall_64+0x3b/0x90
            [<ffffffff83c0007c>] entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Fixes: 7be3248f ("cifs: To match file servers, make sure the server hostname matches")
      Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      869da64d
  5. 09 11月, 2021 1 次提交
  6. 03 11月, 2021 2 次提交
  7. 26 8月, 2021 2 次提交
  8. 29 7月, 2021 1 次提交
  9. 23 7月, 2021 1 次提交
  10. 09 7月, 2021 1 次提交
  11. 20 5月, 2021 1 次提交
  12. 08 5月, 2021 1 次提交
  13. 05 5月, 2021 1 次提交
    • P
      cifs: fix regression when mounting shares with prefix paths · 5c1acf3f
      Paulo Alcantara 提交于
      The commit 315db9a0 ("cifs: fix leak in cifs_smb3_do_mount() ctx")
      revealed an existing bug when mounting shares that contain a prefix
      path or DFS links.
      
      cifs_setup_volume_info() requires the @devname to contain the full
      path (UNC + prefix) to update the fs context with the new UNC and
      prepath values, however we were passing only the UNC
      path (old_ctx->UNC) in @device thus discarding any prefix paths.
      
      Instead of concatenating both old_ctx->{UNC,prepath} and pass it in
      @devname, just keep the dup'ed values of UNC and prepath in
      cifs_sb->ctx after calling smb3_fs_context_dup(), and fix
      smb3_parse_devname() to correctly parse and not leak the new UNC and
      prefix paths.
      
      Cc: <stable@vger.kernel.org> # v5.11+
      Fixes: 315db9a0 ("cifs: fix leak in cifs_smb3_do_mount() ctx")
      Signed-off-by: NPaulo Alcantara (SUSE) <pc@cjr.nz>
      Acked-by: NDavid Disseldorp <ddiss@suse.de>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      5c1acf3f
  14. 04 5月, 2021 1 次提交
    • S
      cifs: add shutdown support · 087f757b
      Steve French 提交于
      Various filesystem support the shutdown ioctl which is used by various
      xfstests. The shutdown ioctl sets a flag on the superblock which
      prevents open, unlink, symlink, hardlink, rmdir, create etc.
      on the file system until unmount and remounted. The two flags supported
      in this patch are:
      
        FSOP_GOING_FLAGS_LOGFLUSH and FSOP_GOING_FLAGS_NOLOGFLUSH
      
      which require very little other than blocking new operations (since
      we do not cache writes to metadata on the client with cifs.ko).
      FSOP_GOING_FLAGS_DEFAULT is not supported yet, but could be added in
      the future but would need to call syncfs or equivalent to write out
      pending data on the mount.
      
      With this patch various xfstests now work including tests 043 through
      046 for example.
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      Reviewed-by: NAurelien Aptel <aaptel@suse.com>
      087f757b
  15. 26 4月, 2021 4 次提交
  16. 19 3月, 2021 1 次提交
  17. 26 2月, 2021 3 次提交
  18. 16 2月, 2021 1 次提交
  19. 12 2月, 2021 1 次提交
  20. 10 2月, 2021 1 次提交
  21. 29 1月, 2021 3 次提交
  22. 28 1月, 2021 1 次提交
  23. 14 1月, 2021 1 次提交
  24. 17 12月, 2020 2 次提交
  25. 16 12月, 2020 2 次提交
  26. 15 12月, 2020 2 次提交
  27. 14 12月, 2020 2 次提交