[openib-general] [PATCH] crash in ibv_destroy_ah
Gleb Natapov
glebn at voltaire.com
Tue Jul 12 04:48:46 PDT 2005
Hello,
Included patch fixes one potential crash and one real one in ibv_destroy_ah.
Index: src/userspace/libmthca/src/verbs.c
===================================================================
--- src/userspace/libmthca/src/verbs.c (revision 2833)
+++ src/userspace/libmthca/src/verbs.c (working copy)
@@ -440,7 +440,7 @@ int mthca_destroy_ah(struct ibv_ah *ah)
{
mthca_free_av(to_mah(ah));
- free(ah);
+ free(to_mah(ah));
return 0;
}
Index: src/userspace/libmthca/src/ah.c
===================================================================
--- src/userspace/libmthca/src/ah.c (revision 2833)
+++ src/userspace/libmthca/src/ah.c (working copy)
@@ -126,6 +126,7 @@ int mthca_alloc_av(struct mthca_pd *pd,
}
ah->key = page->mr->lkey;
+ ah->page = page;
pthread_mutex_unlock(&pd->ah_mutex);
}
--
Gleb.
More information about the general
mailing list