diff options
author | Steve Wise <swise@opengridcomputing.com> | 2017-09-05 21:52:34 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-09-22 19:59:42 +0300 |
commit | 8b1bbf36b7452c4acb20e91948eaa5e225ea6978 (patch) | |
tree | 2c89fa2a542e4f1a285ac6072ee54f0d0cffb0b7 | |
parent | 3c8415cc7aff467faba25841fb859660ac14a04e (diff) | |
download | linux-8b1bbf36b7452c4acb20e91948eaa5e225ea6978.tar.xz |
iw_cxgb4: remove the stid on listen create failure
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.
Cc: stable@vger.kernel.org
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-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 19297e408820..daf7a56e5d7e 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -3462,7 +3462,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: |