diff options
author | Steve Wise <swise@opengridcomputing.com> | 2017-09-05 18:52:34 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-05 07:44:02 (GMT) |
commit | f184cf5256b704c41acb873575cd2a554bfe4265 (patch) | |
tree | cd222e7dfe52a6be24286e6d23fda78415309261 /drivers | |
parent | eb4375e1969c48d454998b2a284c2e6a5dc9eb68 (diff) | |
download | linux-f184cf5256b704c41acb873575cd2a554bfe4265.tar.xz |
iw_cxgb4: remove the stid on listen create failure
commit 8b1bbf36b7452c4acb20e91948eaa5e225ea6978 upstream.
If 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.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 9398143..e422a5b 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -3441,7 +3441,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: |