Received: by 10.223.164.202 with SMTP id h10csp591864wrb; Tue, 14 Nov 2017 06:35:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMa98WpIMD9bN2kNAiYIkGbb/PKNJ9/eze0mDjIUaSzYjFnTQyUf+bdkP8pA+MyBxk0FGjxk X-Received: by 10.98.102.74 with SMTP id a71mr12308812pfc.23.1510670148629; Tue, 14 Nov 2017 06:35:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510670148; cv=none; d=google.com; s=arc-20160816; b=omqa5o+evXsTtjvgzj86kP6xWNlNDrOOEXM64drKfcyqV4Nn8rM56WpOEsuCpqJzOt QJxxRikixUJz4uoBx3W36HJ7EnPPA3z7EqMY1ArV9CNJe+SBLh+Bj/TbkDL4I3mcApyb 0J5nTzfFiDhOvjG/dWf9lALLzORTTYE32YczGxjnEFg077XK1yGT8vCS8yc9+xIgoAYK OlYpqs1J8pUatg1NdNGaN+gtLsJ3Ca8Dbs/p9AVU2FpIONodf0L77jlPvrCFAH+eSY90 HO3bFBK5IICYcp1uX5JTxtL9659E2fdU2/9B6UF798j7bxjvfqrRzv9R7fcqCdJiHreo kw1g== 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=sbUuuoXOE2mKQB3WuI1FGuScDeUrulzyZNkTrXEO+2Q=; b=xbAEZaKyPWCoix1VHWzccj7xmssk5xWUyM2qbZj137RVrGCnotsJaa76htb3X6GgO0 eLN695LedSnV6RP+8qD6PyKNDRkSfhrhOM0xlf/0T17Fkt1KIdaTRdmxzK2VLGq+pJ63 RzsRgS8gjt7qpkxyAIEQ5QlMegkvQVlGPhjGO40k2R50tkocda1IzqyvkhDHILm3aXRd U1k1gh7OYD8m8JStF8tyVFmrhMB831++gZRly/DF58yf7HxoCymGX4pQF5YKn7L2H37D cO1nSIqo66+zCa5r5vmiz7af35dW1mB0gZFLSClEHt/HjEpPzzwvCzRA+eX6lMqd4ova 7tjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wyo6cWCs; 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 l187si9492152pga.371.2017.11.14.06.35.36; Tue, 14 Nov 2017 06:35:48 -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=wyo6cWCs; 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 S1755080AbdKNOct (ORCPT + 88 others); Tue, 14 Nov 2017 09:32:49 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:10849 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755558AbdKNOcU (ORCPT ); Tue, 14 Nov 2017 09:32:20 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id vAEEVh9U014359; Tue, 14 Nov 2017 08:31:43 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1510669903; bh=S9MM/yxWZVwDN79y9LNIJSNs0VELZO1Igec1KwbV6nc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wyo6cWCsZwOIgcB+OJTsgz2N2rmFC7JhW+y/jsx08+6Fz/eW1kzL+yRbbca6I2Mfj bD194K9s7dS/fJQ3YzYDWHfAhHFGgbYrRn6TJAuVA22Au38iLbadLxQ5b+UZxY60RY zSgyOpA89qoKbVTiBaKowM45VlqXAk1zh73qYZVM= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vAEEVhha032695; Tue, 14 Nov 2017 08:31:43 -0600 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE100.ent.ti.com (10.64.6.21) 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:42 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE102.ent.ti.com (10.64.6.23) 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:42 -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 vAEEVX75018797; Tue, 14 Nov 2017 08:31:41 -0600 From: Peter Ujfalusi To: CC: , , , Subject: [PATCH 04/10] dmaengine: edma: Use vchan_terminate_vdesc() instead of desc_free Date: Tue, 14 Nov 2017 16:32:06 +0200 Message-ID: <20171114143212.8311-5-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/edma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 9364a3ed345a..948df1ab5f1a 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -860,11 +860,8 @@ static int edma_terminate_all(struct dma_chan *chan) /* Move the cyclic channel back to default queue */ if (!echan->tc && echan->edesc->cyclic) edma_assign_channel_eventq(echan, EVENTQ_DEFAULT); - /* - * free the running request descriptor - * since it is not in any of the vdesc lists - */ - edma_desc_free(&echan->edesc->vdesc); + + vchan_terminate_vdesc(&echan->edesc->vdesc); echan->edesc = NULL; } -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki From 1583944234139766929@xxx Mon Nov 13 09:55:34 +0000 2017 X-GM-THRID: 1583941184996232231 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread