Received: by 10.223.164.202 with SMTP id h10csp592270wrb; Tue, 14 Nov 2017 06:36:11 -0800 (PST) X-Google-Smtp-Source: AGs4zMYpOMsb3MgHSONW3LU0mdaJwZtwInqeqd1DuY5e46ZJrcqFTP3HkYlPcF7TANMCmnlsREp0 X-Received: by 10.99.147.3 with SMTP id b3mr12542150pge.352.1510670171563; Tue, 14 Nov 2017 06:36:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510670171; cv=none; d=google.com; s=arc-20160816; b=vU050O4jRhP0AwB6JoXidjS0/5TDuTSxGOsf4vnODtgYxk5BXdFTOrU2J5JrjKSL6w gOG+RmiU4sqxgw4VsPG3qBQoOsdeDcVbYJA1KXz8JgBsujeyabwbbdOZ7EpGsOe9c4ae Q6Os/FW/ireHoJNMAo5/hC5/lp3a9GnEfC4QYT8P9FNV3MQFouk3u7NWJl6QPViuhV7u 1UKCTcB+iG6ztdvH+3x9R9M4PGSodYm0cb0cG/1bxA0XnJwVMcGqodbIzhDGM8kYhVAQ qhoPlzo5dEh+AnOD5ZFq58AnhUGBh1M5Kq+QovduHXfcM3iwh2B9JHlRiVNRLHwtVLm8 B90g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=qpr+6kkih8NxotqYlchsfCnW1/igWO+hPy1jFqay/Dk=; b=zsQt2IU1QvrzMjOLsLl0n6riQRgnmVjjS9MIQqoKi9DGkVuyOknIWnja4seU5QYu89 oi3KMyMcMLSckksjLWpD/n8LGJc1Xl/CLpZE7xzJLVSV8bCy8wfck14YbxdxR5EqI6IY rn85Gs4xE1BUWnUi93upAOf0ZCPgeLrYF9pgoQVZA1N+kI9j2+urJDp+EdNMUHrXsHSa CWoNaRJB3ToQ80tyqKXfPMycyWIHgh2Ei6zp9F4lPW7kQ+u9+q1yf4EaZ+h/Es2co91f u8zYC7hyXnllX4p//Kotcgbqp5Xlm1nIZBznWjBXbknre8FAPHdqBpJBt2+1QcbIxwC3 d0vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=R2lOdWml; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z10si16067121pgu.113.2017.11.14.06.35.59; Tue, 14 Nov 2017 06:36:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=R2lOdWml; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755753AbdKNOdw (ORCPT + 88 others); Tue, 14 Nov 2017 09:33:52 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:46249 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755685AbdKNOdO (ORCPT ); Tue, 14 Nov 2017 09:33:14 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id vAEEVkYb023830; Tue, 14 Nov 2017 08:31:46 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1510669906; bh=tqYPs+VsfVWaYyFtY7azOm8lpJzXs+ggAwxZB8Bh3Es=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=R2lOdWmlHXCweXc2rP+zNdigoS2hkLcDGyXe87vzyrZ0YJJj2nOVPcJhKhjbXYf8k 5KhQuGXOvMLV9CxxijnhvLjVXp8D9F7aZ99pa4labLF0kpzYk0NRORZW2iNVfe+LCb 82LxM97+dvKBFYXFSV3IKUsXrwB4NplXvY4MRd+A= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vAEEVfud017201; Tue, 14 Nov 2017 08:31:41 -0600 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Tue, 14 Nov 2017 08:31:40 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Tue, 14 Nov 2017 08:31:41 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id vAEEVX74018797; Tue, 14 Nov 2017 08:31:39 -0600 From: Peter Ujfalusi To: CC: , , , Subject: [PATCH 03/10] dmaengine: omap-dma: Use vchan_terminate_vdesc() instead of desc_free Date: Tue, 14 Nov 2017 16:32:05 +0200 Message-ID: <20171114143212.8311-4-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171114143212.8311-1-peter.ujfalusi@ti.com> References: <20171114143212.8311-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To avoid race with vchan_complete, use the race free way to terminate running transfer. Signed-off-by: Peter Ujfalusi --- drivers/dma/omap-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index f6dd849159d8..d21c19822feb 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -1311,7 +1311,7 @@ static int omap_dma_terminate_all(struct dma_chan *chan) * c->desc is NULL and exit.) */ if (c->desc) { - omap_dma_desc_free(&c->desc->vd); + vchan_terminate_vdesc(&c->desc->vd); c->desc = NULL; /* Avoid stopping the dma twice */ if (!c->paused) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki From 1583984666274585715@xxx Mon Nov 13 20:38:13 +0000 2017 X-GM-THRID: 1583984666274585715 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread