Skip to content

Fix memory corruption in CM

Leon Romanovsky linux-rdma lkml 4 versions – Applied

Status from this message: Applied to for-next, thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 1 replyApplied
  2. v38 patches 3 repliesSuperseded
  3. v29 patches 8 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches1 replySuperseded

Changes in v4 from the cover letter

* Added comment near cm_destroy_av()
* Changed "unregistration lock" to be "mad_agent_lock" in the comment
* Removed unclear comment
v3: https://lore.kernel.org/lkml/[email protected]
* Removed double unlock
* Changes in cma_release flow
v2: https://lore.kernel.org/lkml/[email protected]
* Included Jason's patches in this series
v1: https://lore.kernel.org/linux-rdma/[email protected]
* Squashed "remove mad_agent ..." patches to make sure that we don't need to check for the NULL argument.
v0: https://lore.kernel.org/lkml/[email protected]

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/8IB/cm: Pair cm_alloc_response_msg() with a cm_free_response_msg()drivers/infiniband/core/cm.c+18 -110 replies
2/8IB/cm: Split cm_alloc_msg()drivers/infiniband/core/cm.c+115 -750 replies
3/8IB/cm: Call the correct message free functions in cm_send_handler()drivers/infiniband/core/cm.c+25 -270 replies
4/8IB/cm: Tidy remaining cm_msg free pathsdrivers/infiniband/core/cm.c+10 -100 replies
5/8Revert "IB/cm: Mark stale CM id's whenever the mad agent was unregistered"drivers/infiniband/core/cm.c+14 -1090 replies
6/8IB/cm: Simplify ib_cancel_mad() and ib_modify_mad() callsdrivers/infiniband/core/cm.c drivers/infiniband/core/mad.c drivers/infiniband/core/sa_query.c +1 more+39 -510 replies
7/8IB/cm: Improve the calling of cm_init_av_for_lap and cm_init_av_by_pathdrivers/infiniband/core/cm.c+58 -470 replies
8/8IB/cm: Protect cm_dev, cm_ports and mad_agent with kref and lockdrivers/infiniband/core/cm.c+93 -190 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH rdma-next v4 0/8] Fix memory corruption in CM

From: Leon Romanovsky <[email protected]>

Changelog:
v4:
* Added comment near cm_destroy_av()
* Changed "unregistration lock" to be "mad_agent_lock" in the comment
* Removed unclear comment
v3: https://lore.kernel.org/lkml/[email protected]
* Removed double unlock
* Changes in cma_release flow
v2: https://lore.kernel.org/lkml/[email protected]
* Included Jason's patches in this series
v1: https://lore.kernel.org/linux-rdma/[email protected]
* Squashed "remove mad_agent ..." patches to make sure that we don't need to check for the NULL argument.
v0: https://lore.kernel.org/lkml/[email protected]

-------------------------------------------------------------------------------

Hi,

This series from Mark fixes long standing bug in CM migration logic, reported by Ryan [1].

Thanks

[1] https://lore.kernel.org/linux-rdma/CAFMmRNx9cg--NUnZjFM8yWqFaEtsmAWV4EogKb3a0+hnjdtJFA@mail.gmail.com/

Jason Gunthorpe (4):
IB/cm: Pair cm_alloc_response_msg() with a cm_free_response_msg() IB/cm: Split cm_alloc_msg()
IB/cm: Call the correct message free functions in cm_send_handler() IB/cm: Tidy remaining cm_msg free paths

Mark Zhang (4):
Revert "IB/cm: Mark stale CM id's whenever the mad agent was
unregistered"
IB/cm: Simplify ib_cancel_mad() and ib_modify_mad() calls IB/cm: Improve the calling of cm_init_av_for_lap and
cm_init_av_by_path
IB/cm: Protect cm_dev, cm_ports and mad_agent with kref and lock

 drivers/infiniband/core/cm.c       | 621 +++++++++++++++--------------
 drivers/infiniband/core/mad.c      |  17 +-
 drivers/infiniband/core/sa_query.c |   4 +-
 include/rdma/ib_mad.h              |  27 +-
 4 files changed, 346 insertions(+), 323 deletions(-)
Signature · 1 line
2.31.1