1. 26 2月, 2021 4 次提交
  2. 25 2月, 2021 1 次提交
  3. 23 2月, 2021 8 次提交
  4. 20 2月, 2021 1 次提交
  5. 17 2月, 2021 5 次提交
    • S
      cifs: Reformat DebugData and index connections by conn_id. · 03e9bb1a
      Shyam Prasad N 提交于
      Reformat the output of /proc/fs/cifs/DebugData to print the
      conn_id for each connection. Also reordered and numbered the data
      into a more reader-friendly format.
      
      This is what the new format looks like:
      $ cat /proc/fs/cifs/DebugData
      Display Internal CIFS Data Structures for Debugging
      ---------------------------------------------------
      CIFS Version 2.30
      Features: DFS,FSCACHE,STATS,DEBUG,ALLOW_INSECURE_LEGACY,WEAK_PW_HASH,CIFS_POSIX,UPCALL(SPNEGO),XATTR,ACL
      CIFSMaxBufSize: 16384
      Active VFS Requests: 0
      
      Servers:
      1) ConnectionId: 0x1
      Number of credits: 371 Dialect 0x300
      TCP status: 1 Instance: 1
      Local Users To Server: 1 SecMode: 0x1 Req On Wire: 0 In Send: 0 In MaxReq Wait: 0
      
              Sessions:
              1) Name: 10.10.10.10 Uses: 1 Capability: 0x300077     Session Status: 1
              Security type: RawNTLMSSP  SessionId: 0x785560000019
              User: 1000 Cred User: 0
      
              Shares:
              0) IPC: \\10.10.10.10\IPC$ Mounts: 1 DevInfo: 0x0 Attributes: 0x0
              PathComponentMax: 0 Status: 1 type: 0 Serial Number: 0x0
              Share Capabilities: None        Share Flags: 0x30
              tid: 0x1        Maximal Access: 0x11f01ff
      
              1) \\10.10.10.10\shyam_test2 Mounts: 1 DevInfo: 0x20020 Attributes: 0xc706ff
              PathComponentMax: 255 Status: 1 type: DISK Serial Number: 0xd4723975
              Share Capabilities: None Aligned, Partition Aligned,    Share Flags: 0x0
              tid: 0x5        Optimal sector size: 0x1000     Maximal Access: 0x1f01ff
      
              MIDs:
      
              Server interfaces: 3
              1)      Speed: 10000000000 bps
                      Capabilities: rss
                      IPv4: 10.10.10.1
      
              2)      Speed: 10000000000 bps
                      Capabilities: rss
                      IPv6: fe80:0000:0000:0000:18b4:0000:0000:0000
      
              3)      Speed: 1000000000 bps
                      Capabilities: rss
                      IPv4: 10.10.10.10
                      [CONNECTED]
      Signed-off-by: NShyam Prasad N <sprasad@microsoft.com>
      Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com>
      Reviewed-by: NAurelien Aptel <aaptel@suse.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      03e9bb1a
    • S
      cifs: Identify a connection by a conn_id. · 6d82c27a
      Shyam Prasad N 提交于
      Introduced a new field conn_id in TCP_Server_Info structure.
      This is a non-persistent unique identifier maintained by the client
      for a connection to a file server. For this, a global counter named
      tcpSesNextId is maintained. On allocating a new TCP_Server_Info,
      this counter is incremented and assigned.
      
      Changed the dynamic tracepoints related to reconnects and
      crediting to be more informative (with conn_id printed).
      Debugging a crediting issue helped me understand the
      important things to print here.
      
      Always call dynamic tracepoints outside the scope of spinlocks.
      To do this, copy out the credits and in_flight fields of the
      server struct before dropping the lock.
      Signed-off-by: NShyam Prasad N <sprasad@microsoft.com>
      Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      6d82c27a
    • S
      cifs: Fix in error types returned for out-of-credit situations. · 7de03948
      Shyam Prasad N 提交于
      For failure by timeout waiting for credits, changed the error
      returned to the app with EBUSY, instead of ENOTSUPP. This is done
      because this situation is possible even in non-buggy cases. i.e.
      overloaded server can return 0 credits until done with outstanding
      requests. And this feels like a better error to return to the app.
      
      For cases of zero credits found even when there are no requests
      in flight, replaced ENOTSUPP with EDEADLK, since we're avoiding
      deadlock here by returning error.
      Signed-off-by: NShyam Prasad N <sprasad@microsoft.com>
      Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      7de03948
    • S
      cifs: New optype for session operations. · 0f56db83
      Shyam Prasad N 提交于
      We used to share the CIFS_NEG_OP flag between negotiate and
      session authentication. There was an assumption in the code that
      CIFS_NEG_OP is used by negotiate only. So introcuded CIFS_SESS_OP
      and used it for session setup optypes.
      Signed-off-by: NShyam Prasad N <sprasad@microsoft.com>
      Reviewed-by: NPavel Shilovsky <pshilov@microsoft.com>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      0f56db83
    • S
      cifs: fix trivial typo · 201023c5
      Steve French 提交于
      Typo: exiting --> existing
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      201023c5
  6. 16 2月, 2021 1 次提交
  7. 12 2月, 2021 3 次提交
  8. 11 2月, 2021 2 次提交
  9. 10 2月, 2021 8 次提交
  10. 06 2月, 2021 2 次提交
  11. 05 2月, 2021 2 次提交
  12. 04 2月, 2021 1 次提交
    • X
      io_uring: don't modify identity's files uncess identity is cowed · d7e10d47
      Xiaoguang Wang 提交于
      Abaci Robot reported following panic:
      BUG: kernel NULL pointer dereference, address: 0000000000000000
      PGD 800000010ef3f067 P4D 800000010ef3f067 PUD 10d9df067 PMD 0
      Oops: 0002 [#1] SMP PTI
      CPU: 0 PID: 1869 Comm: io_wqe_worker-0 Not tainted 5.11.0-rc3+ #1
      Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
      RIP: 0010:put_files_struct+0x1b/0x120
      Code: 24 18 c7 00 f4 ff ff ff e9 4d fd ff ff 66 90 0f 1f 44 00 00 41 57 41 56 49 89 fe 41 55 41 54 55 53 48 83 ec 08 e8 b5 6b db ff  41 ff 0e 74 13 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f e9 9c
      RSP: 0000:ffffc90002147d48 EFLAGS: 00010293
      RAX: 0000000000000000 RBX: ffff88810d9a5300 RCX: 0000000000000000
      RDX: ffff88810d87c280 RSI: ffffffff8144ba6b RDI: 0000000000000000
      RBP: 0000000000000080 R08: 0000000000000001 R09: ffffffff81431500
      R10: ffff8881001be000 R11: 0000000000000000 R12: ffff88810ac2f800
      R13: ffff88810af38a00 R14: 0000000000000000 R15: ffff8881057130c0
      FS:  0000000000000000(0000) GS:ffff88813bc00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000000 CR3: 000000010dbaa002 CR4: 00000000003706f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       __io_clean_op+0x10c/0x2a0
       io_dismantle_req+0x3c7/0x600
       __io_free_req+0x34/0x280
       io_put_req+0x63/0xb0
       io_worker_handle_work+0x60e/0x830
       ? io_wqe_worker+0x135/0x520
       io_wqe_worker+0x158/0x520
       ? __kthread_parkme+0x96/0xc0
       ? io_worker_handle_work+0x830/0x830
       kthread+0x134/0x180
       ? kthread_create_worker_on_cpu+0x90/0x90
       ret_from_fork+0x1f/0x30
      Modules linked in:
      CR2: 0000000000000000
      ---[ end trace c358ca86af95b1e7 ]---
      
      I guess case below can trigger above panic: there're two threads which
      operates different io_uring ctxs and share same sqthread identity, and
      later one thread exits, io_uring_cancel_task_requests() will clear
      task->io_uring->identity->files to be NULL in sqpoll mode, then another
      ctx that uses same identity will panic.
      
      Indeed we don't need to clear task->io_uring->identity->files here,
      io_grab_identity() should handle identity->files changes well, if
      task->io_uring->identity->files is not equal to current->files,
      io_cow_identity() should handle this changes well.
      
      Cc: stable@vger.kernel.org # 5.5+
      Reported-by: NAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
      Reviewed-by: NPavel Begunkov <asml.silence@gmail.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      d7e10d47
  13. 02 2月, 2021 1 次提交
    • G
      smb3: Fix out-of-bounds bug in SMB2_negotiate() · 8d8d1dbe
      Gustavo A. R. Silva 提交于
      While addressing some warnings generated by -Warray-bounds, I found this
      bug that was introduced back in 2017:
      
        CC [M]  fs/cifs/smb2pdu.o
      fs/cifs/smb2pdu.c: In function ‘SMB2_negotiate’:
      fs/cifs/smb2pdu.c:822:16: warning: array subscript 1 is above array bounds
      of ‘__le16[1]’ {aka ‘short unsigned int[1]’} [-Warray-bounds]
        822 |   req->Dialects[1] = cpu_to_le16(SMB30_PROT_ID);
            |   ~~~~~~~~~~~~~^~~
      fs/cifs/smb2pdu.c:823:16: warning: array subscript 2 is above array bounds
      of ‘__le16[1]’ {aka ‘short unsigned int[1]’} [-Warray-bounds]
        823 |   req->Dialects[2] = cpu_to_le16(SMB302_PROT_ID);
            |   ~~~~~~~~~~~~~^~~
      fs/cifs/smb2pdu.c:824:16: warning: array subscript 3 is above array bounds
      of ‘__le16[1]’ {aka ‘short unsigned int[1]’} [-Warray-bounds]
        824 |   req->Dialects[3] = cpu_to_le16(SMB311_PROT_ID);
            |   ~~~~~~~~~~~~~^~~
      fs/cifs/smb2pdu.c:816:16: warning: array subscript 1 is above array bounds
      of ‘__le16[1]’ {aka ‘short unsigned int[1]’} [-Warray-bounds]
        816 |   req->Dialects[1] = cpu_to_le16(SMB302_PROT_ID);
            |   ~~~~~~~~~~~~~^~~
      
      At the time, the size of array _Dialects_ was changed from 1 to 3 in struct
      validate_negotiate_info_req, and then in 2019 it was changed from 3 to 4,
      but those changes were never made in struct smb2_negotiate_req, which has
      led to a 3 and a half years old out-of-bounds bug in function
      SMB2_negotiate() (fs/cifs/smb2pdu.c).
      
      Fix this by increasing the size of array _Dialects_ in struct
      smb2_negotiate_req to 4.
      
      Fixes: 9764c02f ("SMB3: Add support for multidialect negotiate (SMB2.1 and later)")
      Fixes: d5c7076b ("smb3: add smb3.1.1 to default dialect list")
      Cc: stable@vger.kernel.org
      Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: NSteve French <stfrench@microsoft.com>
      8d8d1dbe
  14. 30 1月, 2021 1 次提交
新手
引导
客服 返回
顶部