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=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 F240EC2D0EA for ; Wed, 8 Apr 2020 07:12:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6A042074F for ; Wed, 8 Apr 2020 07:12:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=smaract.com header.i=@smaract.com header.b="kzQ1axBS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbgDHHMG (ORCPT ); Wed, 8 Apr 2020 03:12:06 -0400 Received: from smaract.com ([82.165.73.54]:60432 "EHLO smaract.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726702AbgDHHMG (ORCPT ); Wed, 8 Apr 2020 03:12:06 -0400 Received: from mx1.smaract.de (staticdsl-213-168-205-127.ewe-ip-backbone.de [213.168.205.127]) by smaract.com (Postfix) with ESMTPSA id CA4CAA0CB0; Wed, 8 Apr 2020 07:12:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smaract.com; s=default; t=1586329924; bh=OsEz6GvKjLOkUJz9ClB3aeaK3X9SVPOosZop1Yctfn4=; l=1271; h=From:To:Subject; b=kzQ1axBS3mpOxWidODdc1Gl0X+Qj1Y6Ha2Ga3yZixYBF6qxaSEro7+LGLIvGyqTPU 9wDgxcySGYzjyPCYAM7zsT6tcTOQtYRm/EzlttIDM+JndCuIi+lndATpCApTDx2QXr uccIawjcpxwc6gTbrJtSPZ5thr9ONXFgsy5mVOAk= Authentication-Results: smaract.com; spf=pass (sender IP is 213.168.205.127) smtp.mailfrom=vonohr@smaract.com smtp.helo=mx1.smaract.de Received-SPF: pass (smaract.com: connection is authenticated) From: Sebastian von Ohr To: Radhey Shyam Pandey , Vinod Koul , Appana Durga Kedareswara Rao , Michal Simek CC: "dmaengine@vger.kernel.org" Subject: RE: [PATCH] dmaengine: xilinx_dma: Add missing check for empty list Thread-Topic: [PATCH] dmaengine: xilinx_dma: Add missing check for empty list Thread-Index: AQHV8VxxdjMBtKwDjUiUwfzZyHoPo6g7hG2AgAAGXQCAMfPDcIAAaXeAgAEY0ZA= Date: Wed, 8 Apr 2020 07:12:03 +0000 Message-ID: References: <20200303130518.333-1-vonohr@smaract.com> <20200306133427.GG4148@vkoul-mobl> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-PPP-Message-ID: <158632992390.35687.17539552563877992014@smaract.com> X-PPP-Vhost: mario.smaract.com Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org > -----Original Message----- > From: Radhey Shyam Pandey [mailto:radheys@xilinx.com] > Sent: Tuesday, April 7, 2020 6:04 PM > To: Sebastian von Ohr ; Vinod Koul > ; Appana Durga Kedareswara Rao > ; Michal Simek > Cc: dmaengine@vger.kernel.org > Subject: RE: [PATCH] dmaengine: xilinx_dma: Add missing check for empty > list >=20 > Thanks for reminding me. Somehow I missed it. You mentioned in one > of earlier thread that this bug is introduced it using dma_sync_wait to > wait for DMA completion. So to reproduce the issue in xilinx axidma > test client I have to replace issue_pending with sync_wait API? Yes, dma_sync_wait triggered the bug for me almost every transfer. In the=20 xilinx axidmatest this is probably best achieved by adding dma_sync_wait=20 before the wait_for_completion_timeout. I encountered the bug with your=20 xilinx-v2019.2.01 tag. On this tag it actually crashes the kernel with an=20 invalid memory access (because the residue is written to desc). With the=20 current driver version it probably seems to work fine. You might have to=20 add some debug print to verify that the active_list can indeed be empty in= =20 xilinx_dma_tx_status.