From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756570AbbJ2B1Q (ORCPT ); Wed, 28 Oct 2015 21:27:16 -0400 Received: from mga03.intel.com ([134.134.136.65]:19973 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751680AbbJ2B1O (ORCPT ); Wed, 28 Oct 2015 21:27:14 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,212,1444719600"; d="scan'208";a="838006022" Date: Thu, 29 Oct 2015 10:26:50 +0900 From: Vinod Koul To: Lars-Peter Clausen Cc: Takashi Iwai , Dan Williams , Russell King , Laurent Pinchart , Kuninori Morimoto , Qiao Zhou , Shengjiu Wang , Matt Campbell , Jonah Petri , dmaengine@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] dmaengine: Add transfer termination synchronization support Message-ID: <20151029012649.GB18368@vkoul-mobl.iind.intel.com> References: <1445334391-12272-1-git-send-email-lars@metafoo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445334391-12272-1-git-send-email-lars@metafoo.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 20, 2015 at 11:46:27AM +0200, Lars-Peter Clausen wrote: > The DMAengine API has a long standing issue that is inherent to the API > itself. For a client that calls dmaengine_terminate_all() it is not > possible to properly synchronize the completion of any currently running > complete callbacks to the current context. This means it is possible to end > up with a use-after-free race condition if client frees resources that are > accessed in a complete callback before the complete callback has finished > running. > > This patch series introduces a new explicit synchronization primitive to > the DMAengine API which allows clients to ensure that all complete > callbacks have finished running. This allows them to safely free any > resources that might be accessed in a complete callback. > > The series for now only implements synchronization support for a single > driver and only updates single client to make use of the new API. If there > is agreement on the general approach more will follow. Thanks Lars for getting this done. I have merged this to topic/test/async branch and this will be in next kernel revision. We are too close to merge window right now -- ~Vinod