From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 671B2C2D0C0 for ; Mon, 23 Dec 2019 07:53:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3950420709 for ; Mon, 23 Dec 2019 07:53:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577087583; bh=ZDywtafLELZOwgunZ6njALEVERK9QcJfzVci1TRYhoU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=wlpaGGgK/ppC17YJFdi1SIZ8ryH6nphhItPHJE198t6EigF7xoHKQXQAvML3x5+de q6Ld4oSP6fEuYXxzFmEpcBo+JEsNAKnPgS17LNvn9QGh4C7/ZYrE1CDD1pRUyA8MLT Wsi8bG/VedbbiGsLM3TO6tJ5A+OmuCTkCaex1TZw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725867AbfLWHxC (ORCPT ); Mon, 23 Dec 2019 02:53:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:57458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbfLWHxC (ORCPT ); Mon, 23 Dec 2019 02:53:02 -0500 Received: from localhost (unknown [223.226.34.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3D7CC206B7; Mon, 23 Dec 2019 07:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577087582; bh=ZDywtafLELZOwgunZ6njALEVERK9QcJfzVci1TRYhoU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=z/LPLi/3mzqScE76JGG4kOKYc70pK5CJ4RsAsaf7vCGWfEYTnR8iJWGDI4XONa2mE GGsNvwizK/gTgbi9ks+Kt1fbXImJdcj2yA+4oBsOuHN0nWtLIHUY8tpCUwJc7bwpVU znUp8cZYhmIzh2OZM2/x/gK3VVXnj1Q0nR4EDcX4= Date: Mon, 23 Dec 2019 13:22:57 +0530 From: Vinod Koul To: Peter Ujfalusi Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, alexandru.ardelean@analog.com, s.hauer@pengutronix.de Subject: Re: [PATCH] dmaengine: virt-dma: Fix access after free in vcna_complete() Message-ID: <20191223075257.GD2536@vkoul-mobl> References: <20191220131100.21804-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191220131100.21804-1-peter.ujfalusi@ti.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 20-12-19, 15:11, Peter Ujfalusi wrote: > vchan_vdesc_fini() is freeing up 'vd' so the access to vd->tx_result is > via already freed up memory. > > Move the vchan_vdesc_fini() after invoking the callback to avoid this. Applied, thanks -- ~Vinod