IB/qib: Reset packet list after freeing
authorMike Marciniszyn <mike.marciniszyn@qlogic.com>
Tue, 11 Jan 2011 01:42:21 +0000 (17:42 -0800)
committerRoland Dreier <rolandd@cisco.com>
Tue, 11 Jan 2011 01:42:21 +0000 (17:42 -0800)
Reset the list pointers after freeing the SDMA packet list.  This is
done to any potential double-free cases.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/qib/qib_user_sdma.c

index 4c19e06b5e85eaa5a8237c7936968973ec05f1cf..66208bcd7c138f5f26d4a3565e596d88bab51ed7 100644 (file)
@@ -382,6 +382,7 @@ static void qib_user_sdma_free_pkt_list(struct device *dev,
 
                kmem_cache_free(pq->pkt_slab, pkt);
        }
+       INIT_LIST_HEAD(list);
 }
 
 /*