1. 29 5月, 2021 5 次提交
  2. 04 5月, 2021 1 次提交
  3. 20 4月, 2021 3 次提交
  4. 14 4月, 2021 3 次提交
  5. 13 4月, 2021 1 次提交
    • G
      RDMA/rtrs-clt: destroy sysfs after removing session from active list · 7f4a8592
      Gioh Kim 提交于
      A session can be removed dynamically by sysfs interface "remove_path" that
      eventually calls rtrs_clt_remove_path_from_sysfs function.  The current
      rtrs_clt_remove_path_from_sysfs first removes the sysfs interfaces and
      frees sess->stats object. Second it removes the session from the active
      list.
      
      Therefore some functions could access non-connected session and access the
      freed sess->stats object even-if they check the session status before
      accessing the session.
      
      For instance rtrs_clt_request and get_next_path_min_inflight check the
      session status and try to send IO to the session.  The session status
      could be changed when they are trying to send IO but they could not catch
      the change and update the statistics information in sess->stats object,
      and generate use-after-free problem.
      (see: "RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its
      stats")
      
      This patch changes the rtrs_clt_remove_path_from_sysfs to remove the
      session from the active session list and then destroy the sysfs
      interfaces.
      
      Each function still should check the session status because closing or
      error recovery paths can change the status.
      
      Fixes: 6a98d71d ("RDMA/rtrs: client: main functionality")
      Link: https://lore.kernel.org/r/20210412084002.33582-1-gi-oh.kim@ionos.comSigned-off-by: NGioh Kim <gi-oh.kim@ionos.com>
      Reviewed-by: NJack Wang <jinpu.wang@ionos.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      7f4a8592
  6. 02 4月, 2021 4 次提交
  7. 12 3月, 2021 2 次提交
  8. 17 2月, 2021 1 次提交
  9. 16 1月, 2021 10 次提交
  10. 17 12月, 2020 1 次提交
    • G
      block/rnbd-clt: Does not request pdu to rtrs-clt · 9aaf9a2a
      Gioh Kim 提交于
      Previously the rnbd client requested the rtrs to allocate rnbd_iu
      just after the rtrs_iu. So the rnbd client passes the size of
      rnbd_iu for rtrs_clt_open() and rtrs creates an array of
      rnbd_iu and rtrs_iu.
      
      For IO handling, rnbd_iu exists after the request because we pass
      the size of rnbd_iu when setting the tag-set. Therefore we do not
      use the rnbd_iu allocated by rtrs for IO handling.
      We only use the rnbd_iu allocated by rtrs when doing session
      initialization. Almost all rnbd_iu allocated by rtrs are wasted.
      
      By this patch the rnbd client does not request rnbd_iu allocation
      to rtrs but allocate it for itself when doing session initialization.
      
      Also remove unused rtrs_permit_to_pdu from rtrs.
      Signed-off-by: NGioh Kim <gi-oh.kim@cloud.ionos.com>
      Signed-off-by: NJack Wang <jinpu.wang@cloud.ionos.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      9aaf9a2a
  11. 29 10月, 2020 8 次提交
  12. 28 10月, 2020 1 次提交