[ofa-general] [PATCH] 1.3-rc4 leak in SA notification patch

Michael Brooks michael.brooks at qlogic.com
Mon Feb 18 10:28:15 PST 2008


Commit 2aec5c602c6a44e2a3a173339a9ab94549658e4b on 2008-02-05 modified
the SA notification patch to use alloc_mad() from within
sa_query.c:ib_sa_informinfo_query(), but didn't also modify the function
to use the associated free_mad() call on exit, resulting in a lost
kref_put() on the AH structure.

Patch follows:

diff --git a/kernel_patches/fixes/sean_local_sa_1_notifications.patch
b/kernel_patches/fixes/sean_local_sa_1_notifications.patch
index 9d272ff..e710897 100644
--- a/kernel_patches/fixes/sean_local_sa_1_notifications.patch
+++ b/kernel_patches/fixes/sean_local_sa_1_notifications.patch
@@ -1061,7 +1061,7 @@ Index:
ofa_1_3_dev_kernel/drivers/infiniband/core/sa_query.c
 +err2:
 +      *sa_query = NULL;
 +      ib_sa_client_put(query->sa_query.client);
-+      ib_free_send_mad(query->sa_query.mad_buf);
++      free_mad(&query->sa_query);
 +err1:
 +      kfree(query);
 +      return ret;



More information about the general mailing list