Message ID | 1580156212-28267-1-git-send-email-manjunath.b.patil@oracle.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | IB/mlx4: Fix use after free in RDMA CM disconnect code path | expand |
On Mon, Jan 27, 2020 at 12:16:52PM -0800, Manjunath Patil wrote: > PS: > This fixes the recently submitted patch from Haakon[cc'd] > The commit hash used in here has to be updated while applying > Commit 01528b332860 ("IB/mlx4: Fix leak in id_map_find_del") introduces > two code paths that can pontentially cause use after free. Okay, I squished this into the original patch Thanks, Jason
Thank you. -Manjunath On 1/27/2020 12:50 PM, Jason Gunthorpe wrote: > On Mon, Jan 27, 2020 at 12:16:52PM -0800, Manjunath Patil wrote: >> PS: >> This fixes the recently submitted patch from Haakon[cc'd] >> The commit hash used in here has to be updated while applying >> Commit 01528b332860 ("IB/mlx4: Fix leak in id_map_find_del") introduces >> two code paths that can pontentially cause use after free. > Okay, I squished this into the original patch > > Thanks, > Jason
diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c index 84ea003..9d2f216 100644 --- a/drivers/infiniband/hw/mlx4/cm.c +++ b/drivers/infiniband/hw/mlx4/cm.c @@ -331,8 +331,7 @@ int mlx4_ib_multiplex_cm_handler(struct ib_device *ibdev, int port, int slave_id cont: set_local_comm_id(mad, id->pv_cm_id); - if (mad->mad_hdr.attr_id == CM_DREQ_ATTR_ID || - mad->mad_hdr.attr_id == CM_DREP_ATTR_ID) + if (mad->mad_hdr.attr_id == CM_DREQ_ATTR_ID) schedule_delayed(ibdev, id); return 0; } @@ -373,8 +372,7 @@ int mlx4_ib_demux_cm_handler(struct ib_device *ibdev, int port, int *slave, set_remote_comm_id(mad, id->sl_cm_id); if (mad->mad_hdr.attr_id == CM_DREQ_ATTR_ID || - mad->mad_hdr.attr_id == CM_REJ_ATTR_ID || - mad->mad_hdr.attr_id == CM_DREP_ATTR_ID) + mad->mad_hdr.attr_id == CM_REJ_ATTR_ID) schedule_delayed(ibdev, id); return 0;