Patch "RDMA/ocrdma: fix double free on pd" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
RDMA/ocrdma: fix double free on pd
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
rdma-ocrdma-fix-double-free-on-pd.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
4dc544427991e3cef38ce3ae124b7e6557063bd3Mon Sep 17 00:00:00 2001
From: Colin Ian King <[email protected]>
Date: Fri, 5 Jun 2015 15:47:27 +0100
Subject: RDMA/ocrdma: fix double free on pd
From: Colin Ian King <[email protected]>
commit 4dc544427991e3cef38ce3ae124b7e6557063bd3 upstream.
A reorganisation of the PD allocation and deallocation in commit 9ba1377daa ("RDMA/ocrdma: Move PD resource management to driver.") introduced a double free on pd, as detected by static analysis by smatch:
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:682 ocrdma_alloc_pd()
error: double free of 'pd'^
The original call to ocrdma_mbx_dealloc_pd() (which does not kfree pd) was replaced with a call to _ocrdma_dealloc_pd() (which does kfree pd). The kfree following this call causes the double free, so just remove it to fix the problem.
--- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 1 - 1 file changed, 1 deletion(-)
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +0 -1
@@ -679,7 +679,6 @@ err:ocrdma_release_ucontext_pd (uctx); }else { status =_ocrdma_dealloc_pd (dev, pd); -kfree (pd); } exit:return ERR_PTR (status);
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/rdma-ocrdma-fix-double-free-on-pd.patch queue-4.1/keys-ensure-we-free-the-assoc-array-edit-if-edit-is-valid.patch