Received: by 10.223.185.116 with SMTP id b49csp5965521wrg; Wed, 7 Mar 2018 22:49:17 -0800 (PST) X-Google-Smtp-Source: AG47ELuG3r9fvqbl5f13Q5hBTgTepY6lUl4VkFSqjW7Q8hWAB/aoK3TRSmb8uUnw5Ugktnsm4LzM X-Received: by 2002:a17:902:b10b:: with SMTP id q11-v6mr23192628plr.275.1520491757673; Wed, 07 Mar 2018 22:49:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520491757; cv=none; d=google.com; s=arc-20160816; b=FsaQikbl460HtH5UeNq/9Qr2RmirRyVvIl2A7kGhpaDK4vXStGr6JVscS2cZeQhBbO uhwEOJybNKCkZulTTTZtV2F8077mAAxj01YptJRq7oK2dpfzxKMUa+8ExNzS2EAQZsLO ekVJqfe4r2DxfaQs4/DAfqo59GJ6k8ZCvpco3ZDykglIE81FfrrYPgagc4p1WtZzqrxU +mmRPUdMp71dCZbsctLd1j9XUAJbSZY+O7XoJMegofkSJ6SIvrnK+2/pmxDmgGUDobqh yni4+FXx5TTvkLON087Xyahm18AgxOImXja641/HQlFqa4y15yveq5JF2zB9dQYFEiQa 9sfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=lD3cGEExF2nBGPyjdg3ED3KPpiIbAqcnWLBgwyqQTao=; b=E7Gd9iOtGuh0NorVbpWG6JG/2YWl2pex9U0shUEnP3tMij/Jf5ElptoYe5pQAh5xwm Cv4ONgpP2I+h//xTW+FrM2st6+FH6YvAqs4CJvT1FTLsHTtIkKu+JZRMcEfOH88zCydZ tHCPg3PFY06CHsmZyKqbf7UhwhjbBTKDqsdX473LVsGV7qsQGb+PurbN4UFaoyRZK0fU xF99YVONPXwLC9lUFMptbCCMhr3j83TlIoQIsHUQ38bXRUa5yOv9BoEq8hQAn3CUdd5w opORaTwOyy0nC880h6w2QSUiSeTbGhomjRDCCvndcQVk33psWQyulX2+Hmo/LZjSQr+c hWZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=jZc6GYCg; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16si12553907pgc.610.2018.03.07.22.49.03; Wed, 07 Mar 2018 22:49:17 -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=@microsoft.com header.s=selector1 header.b=jZc6GYCg; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935263AbeCHGrv (ORCPT + 99 others); Thu, 8 Mar 2018 01:47:51 -0500 Received: from mail-by2nam03on0100.outbound.protection.outlook.com ([104.47.42.100]:51511 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935242AbeCHE6V (ORCPT ); Wed, 7 Mar 2018 23:58:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lD3cGEExF2nBGPyjdg3ED3KPpiIbAqcnWLBgwyqQTao=; b=jZc6GYCgNkXxCfo67t68QIIx9v8mQdqoGYfXX83a7da959mjXC3XxbDO8DoyrrcG+6f4T7mpea1u4Rotfjc7cnOt4rciPvqwPLo5VKTBR4AGCn8/09lyqKlAV0UnI4+cWQOsajr8DxtY8Tt3YXMnXjzGQt6rGKA7wW+EBnkpB94= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1080.namprd21.prod.outlook.com (52.132.130.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 04:58:16 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:58:16 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Kedareswara rao Appana , Kedareswara rao Appana , Vinod Koul , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 26/67] dmaengine: zynqmp_dma: Fix race condition in the probe Thread-Topic: [PATCH AUTOSEL for 4.14 26/67] dmaengine: zynqmp_dma: Fix race condition in the probe Thread-Index: AQHTtpn9DxS8TjGmy0KO3JcgtWe1ZQ== Date: Thu, 8 Mar 2018 04:57:42 +0000 Message-ID: <20180308045641.7814-26-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1080;7:CNWLkND5vqSCiugtTzfR6wrCkzEzeMiCNyqlgk29Rc0CVq+cWe2r46OPA77zSOYdxr8NtBtQEFI5emTrJbqrlkvLCTJWeHVTCpRzqdhEfiBb0x5wceico1qaP7UjzQWRwBzhhhu2uMFOD5evrWT/WZTPARGgFuqhyZSjRo65+lJQfFddHYQHSvohtSj3dxCqd3/zns18e4ffvJhSsBf2OMP3ks1V1/ioL2eVhBUdJrVucjZ/LSKFX8VkvDvcrjDk;20:cYlol0pIUQAhX0z9/HHy2iJCFbYFaMfZglg1GQBnItOA8KepzpPOQKcDq/y74jnKNvsuMy7XMtcMuiP7HiE+oYz3wj40U0l4zQCoU4pOHyQqYj+sfUmzOwnsnzjYQCaMBLldR3Nr70y95GpXfNkFThZS8ELM/pYnHr2Tu69juEE= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 87a7e4de-0ff3-424c-eadf-08d584b13456 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1080; x-ms-traffictypediagnostic: DM5PR2101MB1080: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(192813158149592)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(3231220)(944501244)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB1080;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1080; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(366004)(39380400002)(346002)(39860400002)(189003)(199004)(6116002)(1076002)(5250100002)(26005)(102836004)(2501003)(3846002)(59450400001)(186003)(6506007)(25786009)(3280700002)(4326008)(2906002)(68736007)(66066001)(86612001)(3660700001)(22452003)(6486002)(6436002)(14454004)(8676002)(81166006)(2900100001)(72206003)(81156014)(8936002)(478600001)(10090500001)(105586002)(10290500003)(53936002)(6512007)(6666003)(107886003)(8666007)(2950100002)(106356001)(76176011)(316002)(7736002)(86362001)(575784001)(36756003)(97736004)(54906003)(110136005)(5660300001)(8656006)(99286004)(305945005)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1080;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: xMpmPakuBlqRYMlmuGqNgi/fLcBay1wHdsiK+eAmzFnrexYGBH9rn/Ncb75tkSbzkCU7u7jYNDGzyRgK4eMWAdvaqqBCbfIZ+Zwvxtobrb8tCLj3FRiD6CTRQMGtr4k6tHVZqyCuJqS7xyaj7byHRJOEobCa9zp8+yyncGraapxR8QYpNNZq6OMYTneYIvEPpverHg95n0XKrEla06umc3+1cWhUrQNYtiwwg7jMGEROdBUFcxTD+ZQMPDPXJkjvw+tyPGoLO8YKnIT2VreinP9nLtN7a/vmAF4jW/LI1vzfUbcv7SAEjMky1ST0Gscyf5wZdA9L2FS0X9mOtpsvmg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87a7e4de-0ff3-424c-eadf-08d584b13456 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:42.8787 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1080 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kedareswara rao Appana [ Upstream commit 5ba080aada5e739165e0f38d5cc3b04c82b323c8 ] 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 Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/xilinx/zynqmp_dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dm= a.c index 1ee1241ca797..5cc8ed31f26b 100644 --- a/drivers/dma/xilinx/zynqmp_dma.c +++ b/drivers/dma/xilinx/zynqmp_dma.c @@ -838,7 +838,8 @@ static void zynqmp_dma_chan_remove(struct zynqmp_dma_ch= an *chan) if (!chan) return; =20 - 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); clk_disable_unprepare(chan->clk_apb); --=20 2.14.1