iw_cxgb4: drop listen destroy replies if no ep found
Subsystems (3)
PATCH 2/3 iw_cxgb4: drop listen destroy replies if no ep found
If 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.
Signed-off-by Steve Wise <[email protected]>
--- 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 · 1 line
1.8.3.1
Quoted 30 lines · Steve Wise
If the thread waiting for a
CLOSE_LISTSRV_RPLtimes 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.Signed-off-by Steve Wise <[email protected]>--- 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 · 1 line
1.8.3.1
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>