From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Mon, 07 Jan 2019 18:41:48 +0000 Subject: Re: [PATCH 2/2] xprtrdma: Double free in rpcrdma_sendctxs_create() Message-Id: <20190107184148.GC3253@kadam> List-Id: References: <20190105130648.GC3288@kadam> <0CEEB35A-2083-4888-9035-8A9ADF22E8E3@oracle.com> In-Reply-To: <0CEEB35A-2083-4888-9035-8A9ADF22E8E3@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Chuck Lever Cc: Bruce Fields , Jeff Layton , Trond Myklebust , Anna Schumaker , Linux NFS Mailing List , kernel-janitors@vger.kernel.org On Sat, Jan 05, 2019 at 11:24:45AM -0500, Chuck Lever wrote: > > > On Jan 5, 2019, at 8:06 AM, Dan Carpenter wrote: > > > > The clean up is handled by the caller, rpcrdma_buffer_create(), so this > > call to rpcrdma_sendctxs_destroy() leads to a double free. > > True. This fix is adequate, but I'm wondering if rpcrdma_sendctxs_destroy > should be made more careful about being called twice. Hm. > I actually wrote the patch like that originally, but then this way made for an easier patch description so I re-wrote it. Let me send the other patch and you can apply that or both if you want. regards, dan carpenter