This is a repost of an unrelated patch that was inadvertantly included in
[PATCH] drivers/infiniband/ulp/srpt: Fix target data corruption

=====================================================================

   If local buffer pool was not allocated, don't try to deallocate it.

Signed-off-by: David A. McMillen <[EMAIL PROTECTED]>
---
 ib_srpt.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/ib_srpt.c b/ib_srpt.c
index 1fb9d56..452cda9 100644
--- a/ib_srpt.c
+++ b/ib_srpt.c
@@ -166,3 +166,4 @@ static int srpt_mempool_create(void)
+       srpt_mempool = NULL;
 
        return -ENOMEM;
 }
@@ -171,6 +172,8 @@ static void srpt_mempool_destroy(void)
 {
        int i, order;
 
+       if (srpt_mempool == NULL) return;
+
        order = get_order(mem_size);
        for (i = 1; i < mem_elements; ++i)
                __free_pages(srpt_mempool[i].page, order);
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to