From: Mike Marciniszyn Date: Tue, 11 Jan 2011 01:42:21 +0000 (-0800) Subject: IB/qib: Reset packet list after freeing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f73df408b299e4bc5ed66cc50058585af64a8f9e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git IB/qib: Reset packet list after freeing Reset the list pointers after freeing the SDMA packet list. This is done to any potential double-free cases. Signed-off-by: Mike Marciniszyn Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/qib/qib_user_sdma.c b/drivers/infiniband/hw/qib/qib_user_sdma.c index 4c19e06b5e85..66208bcd7c13 100644 --- a/drivers/infiniband/hw/qib/qib_user_sdma.c +++ b/drivers/infiniband/hw/qib/qib_user_sdma.c @@ -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); } /*