Message ID | 1512624268-13944-5-git-send-email-appanad@xilinx.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <dmaengine-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C873C60325 for <patchwork-dmaengine@patchwork.kernel.org>; Thu, 7 Dec 2017 05:40:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B86AB290A8 for <patchwork-dmaengine@patchwork.kernel.org>; Thu, 7 Dec 2017 05:40:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAAB429137; Thu, 7 Dec 2017 05:40:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 490E028BE8 for <patchwork-dmaengine@patchwork.kernel.org>; Thu, 7 Dec 2017 05:40:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752296AbdLGFj4 (ORCPT <rfc822;patchwork-dmaengine@patchwork.kernel.org>); Thu, 7 Dec 2017 00:39:56 -0500 Received: from mail-sn1nam02on0043.outbound.protection.outlook.com ([104.47.36.43]:57732 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750993AbdLGFjZ (ORCPT <rfc822;dmaengine@vger.kernel.org>); Thu, 7 Dec 2017 00:39:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xeY6ik/wLYUODRkpwP45WItg0o1hd39+LZ9KeP1VlXI=; b=LhrGRLF9AqZ4225X07TR8WrDfsKW8VQjloBT/FXOGT7QGVfLkSSahsJ8h1RUZqU0K+vy9o7zBNlaFQiEVZBXY4HG2TPfxGxrwdZpmIYCX+sF/E8xt3dEsu9JaPz6vGPDLxD9ScDzzmSZZeZ+9oBU6shmvVdnkOGa2fj1b7F+nfg= Received: from SN4PR0201CA0040.namprd02.prod.outlook.com (10.162.76.26) by CY4PR02MB3384.namprd02.prod.outlook.com (10.165.89.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Thu, 7 Dec 2017 05:39:23 +0000 Received: from BL2NAM02FT051.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::204) by SN4PR0201CA0040.outlook.office365.com (2603:10b6:803:2e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Thu, 7 Dec 2017 05:39:23 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT051.mail.protection.outlook.com (10.152.76.181) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Thu, 7 Dec 2017 05:39:19 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from <appana.durga.rao@xilinx.com>) id 1eMoty-0004Ag-Pw; Wed, 06 Dec 2017 21:39:18 -0800 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from <appana.durga.rao@xilinx.com>) id 1eMoty-0004DE-K4; Wed, 06 Dec 2017 21:39:18 -0800 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id vB75dF2q032277; Wed, 6 Dec 2017 21:39:15 -0800 Received: from [172.23.37.82] (helo=xhdpunnaia40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from <appanad@xilinx.com>) id 1eMotv-00049j-7k; Wed, 06 Dec 2017 21:39:15 -0800 From: Kedareswara rao Appana <appana.durga.rao@xilinx.com> To: <vinod.koul@intel.com>, <dan.j.williams@intel.com>, <michal.simek@xilinx.com>, <appanad@xilinx.com>, <sr@denx.de>, <dave.jiang@intel.com>, <kedare06@gmail.com> CC: <dmaengine@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v2 4/4] dmaengine: zynqmp_dma: Fix race condition in the probe Date: Thu, 7 Dec 2017 10:54:28 +0530 Message-ID: <1512624268-13944-5-git-send-email-appanad@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1512624268-13944-1-git-send-email-appanad@xilinx.com> References: <1512624268-13944-1-git-send-email-appanad@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23512.006 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(2980300002)(438002)(189003)(199004)(106466001)(2201001)(2950100002)(6666003)(33646002)(39060400002)(4326008)(316002)(48376002)(9786002)(478600001)(50466002)(305945005)(50226002)(5660300001)(16586007)(2906002)(8936002)(77096006)(36386004)(7696005)(51416003)(106002)(63266004)(36756003)(81166006)(8676002)(81156014)(76176011)(54906003)(356003)(110136005)(47776003)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR02MB3384; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT051; 1:d+OxVrBa1LyNLNyRWI3FyUCWoYEEH5Zz4PSBjgYw2Nc4t5ql1QMjDu2fX9oQnNJKOKcxfXteO9JbSJwJRuv4v7cAZKuj6PGyM0YroNKXxQ2ZNb69S0/KMwequpMIKBjQ MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 367bd6d5-077a-47bd-5100-08d53d34dec8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4608076)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603286); SRVR:CY4PR02MB3384; X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB3384; 3:fgrGovIJYAMkNsk0FMlvG8e2LQlmpaK196mxNE0s33oR6Hrk8QfA7J29NveaqiVp4R3Fa8bpu8Y9i6XvB5bn/+pyXycuOn3nY+afidrTsXNNYCdamZZ3XwXFcfp3NcEV6qMwcdpRfvdj0359zCq4/u+QBreMWJWn49vv7V6aeBbGyqCBYy79tyjNlgh3/FX6eVCNwUQTFdm9cFuHldyksux5mhAJLWEus0p7kDmHvdKz1JNkyn7AYOEOjiUY24RTL5l8aEPvPTP2sCayOqj9KF1mmuqxdY4Zb4hNMvIrFwhUEg6uCU4T6IhNjkAIGKaTQZCHII7Kvp653vqqmrIKkR4pd850UKF7y20MB3EC9oE=; 25:o8+gOeapv1/ZWtXJ2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B1ihworl/EHN/pnSgg6uZD6dkBZHd2t3OM2RCsGdM3VDOS/KR0kFlDtghUwbyg5JyAAw0DED+ X-Microsoft-Antispam-PRVS: <CY4PR02MB338469D5E8E3B8FFD22CB979DC330@CY4PR02MB3384.namprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(93006095)(93004095)(3231022)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123562025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011); SRVR:CY4PR02MB3384; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR02MB3384; X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB3384; 4:Q3rnBBAWgqfQjE3TGeY1KL8jFBfpI8npOcpwNHi8m/H6bp9OKcrXrd5Lg3xNuWRhhLFP1YP/8Zsi3HvjP2v45B0IuYyV6Yve+UISqgAlkixvDXVjgOnEVsa//miHTClMArqWRA17SmnNQVU4Bqb+dTB2MPUVW5unFdG1DRWrhAcEhuNpmyJ+1dQr1yIDCwEBXkX5OiGPfmCMQGuu1pI6+0P8py8Pj0PbDtqqF3916zToTYCKTS1FX31kagJ5oozhef1bzPwu4omqrTWVI7Ay9UelEkKxhcT1E/luJQhgFRs41g/2IX1pZoNcuH6kEL+Z X-Forefront-PRVS: 05143A8241 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR02MB3384; 23:ygq84tfF+kcqrruJS9KYzBEcgG7ZC4d/D1ZbY5eYf?= =?us-ascii?Q?5kzzxeieoUKPHemg092HcJTMczh4r/9ltZxyJckPjPkNizM2emKGMgRCSoBu?= =?us-ascii?Q?It0MBdEYUtW6Q5CWXdQGf5pnSTFIr4jFWTPUNRkRK/JskPc1hLqHx4L5Sb81?= =?us-ascii?Q?B+mHBS9crtlqOV7kkwAx5+mW4kky49LZjVfLe6dYABatr8tjXFo6GwoIeyU9?= =?us-ascii?Q?3+iQDO/p/7ImWEyjJjqQZBGkijApcN0o++kbwBw3IZ8GVYRxCMmMl4zZlDdD?= =?us-ascii?Q?/GEXSWke+BzKMfjmWjeygviU/wnQ/Z1nytjfXfuZWf33JviKULaQMIxTgbNk?= =?us-ascii?Q?OGttH8KUxN1dWVxmMaRDSp8oWWpxIlqIGbTVKqrVp86yb0V6CSjqmGwVfESB?= =?us-ascii?Q?ec8pL5sps466H3HmQwhwBkj0RhIOXoGoic2xFSJrT2EfqemBpJmV4X+Dan66?= =?us-ascii?Q?1m7xJpGop7GacV4a2BwvbtUkbhHxIUuTNi8WGPdztoi+QJe3wgDe5kfrqSrR?= =?us-ascii?Q?upStqOW3pS7W2z3wjQCldlZg+V16Y1qYnaSjhCmt15XO/t3DB6rfEgLE9kLH?= =?us-ascii?Q?BPse63jc9KvVNLn9jIElaAZSxsktvVTr6wdu8WaEr74lepllOfX82EIT3sAZ?= =?us-ascii?Q?H7q27v89cZKga8KKjE/LYei0ui6QhvZOad9wu46yoN5LJtgS44x7AgJCsI8U?= =?us-ascii?Q?/Gb13U+Tfu+urTpSmkWgC0Hf8tTss/uZuNFOmzgzVmuXFXtZI9d7YY57N+qQ?= =?us-ascii?Q?PIp4JyOoTfG7sb/aH3bAvfsqwgR/JpZ7kUX9myQHwE6HrlxRTAdIPuwh5ikb?= =?us-ascii?Q?x0XgVsnbVZ4ThcbaUddpDV98cuBn3TysyaxWkUPfRO4gAfgfaDsrdr/J6E9e?= =?us-ascii?Q?qZy8dClz61Xic50QkU6YE7upEeR2k4cW8TIBX2t9PIjlvSCU5HxStgyFdb82?= =?us-ascii?Q?Dki6m4rWLEnOmI66knkxQlou2g3OXRxiHeSxoIM1Q=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR02MB3384; 6:TqoSg5MInNw8MexJz04auQCKjY3bGqbEbz7TVkww1/oWBclIZ1c3oOsMc6C/b5LphKKy8u7opafbnWx2D3nLTy1vi3AkC8fJpcML5dUyFVHisLFcUjClbPop6Bx8CGCvhelU3IYcYwBwcML7aPoSCc47/RAX/TNf2+LhuJ7OK8DQmF3694oCsZzCVkcv4TQflOYmDCLd0Wo42wn8KsQVI4NaVnE1DLHDKY/4xsAL2mLQsnfPewDtQ8xbMkrp6ok4XYCsVv6plMcARwarksGAW0bZXLGhGHv1qh8YNzp3gRC//x3hbwU3HUm1OSkLvFJ/3XdcFNVolPX8iyCtfFh6qzLsvI6W+th5UwQjkMb7Tgs=; 5:prq7eBP3MQJdSqmLv5SQpuJS9VO72DDjhBHf0CKUHjxI365IiqOlO5o9j2Az6lPGvY8YNQIX714M3mi+5kgyPNoqIaa3h7vKGWb+EqJdKYroqc7pyt+z13IKFs5UVDEfZzCTfBSy23VhWGLW7mxbdVYb38IOEIzWFWUaOJ/9Kmo=; 24:C3etTriiQIEw4BtM3H+rR1AaRowbuxphzh1596B+uCMtQhDHrLorCkrwOGV/CeP8a5MMhveNXzIzSV/IgOZEY+7VkaB87qPYVCrwL2OemCc=; 7:Y7CTXvmmtfDjO7eIc8+nLwLxrTZ0O5u+5WpmMCH6nIFra3VeTLNrdEab9JqE7yTQJ65m+kiO7EPYjF71jYrYb8CD9Xj2k5cmGv/A0MRyoAsJgpntMJq7obZ0CRzO3jxfcz0mkZDodKCNPXmG5ieXpz9GsfP0c+wz471K18T5k8jw/7Oy9n9Cnpe4yPrurHzkI3g/vv9bgx9LcgeQgGK3rkF/ZGGhzv3HIyT2vrbUz0+0WxCzunM7974ZMaQS3PoT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2017 05:39:19.7900 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 367bd6d5-077a-47bd-5100-08d53d34dec8 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR02MB3384 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: <dmaengine.vger.kernel.org> X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c index a297a26..f146458 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -851,7 +851,8 @@ static void zynqmp_dma_chan_remove(struct zynqmp_dma_chan *chan) if (!chan) return; - devm_free_irq(chan->zdev->dev, chan->irq, chan); + if (chan->irq) + devm_free_irq(chan->zdev->dev, chan->irq, chan); tasklet_kill(&chan->tasklet); list_del(&chan->common.device_node); }
Incase of interrupt property is not present, Driver is trying to free an invalid irq, This patch fixes it by adding a check before freeing the irq. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> --- Changes for v2: --> New patch. drivers/dma/xilinx/zynqmp_dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)