iw_cxgb4 fixes for 4.14-rc
Subsystems (2)
v3 cover iw_cxgb4 fixes for 4.14-rc
v2 didn't make it to the email list, so I'm sending v3. I'm having a bad day...
---
Hey Doug, please consider these bug fixes for 4.14-rc. I'm resending a "v2" series which overrides the first submission, and the "RESEND" submission.
Changes since "RESEND"
- fixed up the commit comment for patch 3
Chances since original submission
- Move the stable tag to the correct location in the commit log
Thanks,
Steve.
---
Steve Wise (3):
iw_cxgb4: put ep reference in pass_accept_req()
iw_cxgb4: drop listen destroy replies if no ep found
iw_cxgb4: remove the stid on listen create failure
drivers/infiniband/hw/cxgb4/cm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Signature · 6 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): cover.1505510827.git.swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org
PATCH v3 1/3 iw_cxgb4: put ep reference in pass_accept_req()
The listening endpoint should always be dereferenced at the end of pass_accept_req().
--- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/cxgb4/cm.c +1 -1
@@ -2594,9 +2594,9 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)c4iw_put_ep (&child_ep->com); reject:reject_cr (dev, hwtid, skb); +out:if (parent_ep)c4iw_put_ep (&parent_ep->com); -out:return 0 ; }
Signature · 6 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 2/3 iw_cxgb4: drop listen destroy replies if no ep found
In reply to a message not in the archiveIf the thread waiting for a CLOSE_LISTSRV_RPL times out and bails, then we need to handle a subsequent CPL if it arrives and the stid has been released. In this case silently drop it.
--- drivers/infiniband/hw/cxgb4/cm.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/infiniband/hw/cxgb4/cm.c +5 -0
@@ -2333,9 +2333,14 @@ static int close_listsrv_rpl(struct c4iw_dev *dev, struct sk_buff *skb)unsigned int stid =GET_TID (rpl);struct c4iw_listen_ep *ep =get_ep_from_stid (dev, stid); +if (!ep) { +pr_debug ("%s stid %d lookup failure!\n" , __func__, stid); + goto out; + }pr_debug ("%s ep %p\n" , __func__, ep);c4iw_wake_up (&ep->com.wr_wait,status2errno (rpl->status));c4iw_put_ep (&ep->com); +out:return 0 ; }
Signature · 6 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 3/3 iw_cxgb4: remove the stid on listen create failure
In reply to a message not in the archiveIf a listen create fails, then the server tid (stid) is incorrectly left in the stid idr table, which can cause a touch-after-free if the stid is looked up and the already freed endpoint is touched. So make sure and remove it in the error path.
--- drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/cxgb4/cm.c +1 -1
@@ -3463,7 +3463,7 @@ int c4iw_create_listen(struct iw_cm_id *cm_id, int backlog) cm_id->provider_data = ep; goto out; } - +remove_handle (ep->com.dev, &ep->com.dev->stid_idr, ep->stid);cxgb4_free_stid (ep->com.dev->rdev.lldi.tids, ep->stid, ep->com.local_addr.ss_family); fail2:
Signature · 6 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Steve Wise
v2 didn't make it to the email list, so I'm sending v3. I'm having a
bad day...
Yeah, I saw at least one version went directly to my Inbox instead of to the mailing list ;-).
Series applied for rc, thanks.
Signature · 8 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html