From patchwork Tue Nov 27 16:06:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Genoud X-Patchwork-Id: 10700753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AF49B13AD for ; Tue, 27 Nov 2018 16:07:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CFAC2BE40 for ; Tue, 27 Nov 2018 16:07:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 912E92BE51; Tue, 27 Nov 2018 16:07:30 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 708D92BE59 for ; Tue, 27 Nov 2018 16:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730558AbeK1DFq (ORCPT ); Tue, 27 Nov 2018 22:05:46 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51323 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729891AbeK1DFq (ORCPT ); Tue, 27 Nov 2018 22:05:46 -0500 Received: by mail-wm1-f68.google.com with SMTP id j207so15323437wmj.1; Tue, 27 Nov 2018 08:07:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d4NbTJWphuMJdohuzHDZOP0oH/Mu3HlA/pO53KFZRbc=; b=Nt7lbEA5p85p/aXpYA5/1MwnCfjsGhSFfpejmsYFLmJ6RBk50MfYqKJZ7e+nuQuQVK ceFq1Ct+Nssocpo5mVQZt2vG7pEeEf2cni33sHUATatmdM41SQxgKXiW9ofnh3dSWau8 WAGaYNa1aOsmIsF4EIS8+R+FQD47tvnu4ffI16F00eFFwykqtWWZAkPcjbWyHjUnuWL5 BmsMdCqpFaGaUrEsTu8jZUHbgGgC7HlAwWWQcXJ7Fcc+o2dYadHJJroqaBaFzpoHabiT Qi3wYbgyspzl1TDvBaQCT65T47gW1e1F2gnlD3GyQR9coG+q/zYPYg0tY5lU+acrp7ji viWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d4NbTJWphuMJdohuzHDZOP0oH/Mu3HlA/pO53KFZRbc=; b=ABE549JrUIf01v8lvfjjYI/9hJFGx/UoLlWcJumcns75dgOjxD434RDfTvx4HRjnLJ YdvWF+xBN/qYDPz3CNWF3FO0V6CFb1sBJS7eKQQGwhBrsrUEMMamu8GlpiB+H+Cc3f3L eaWJQ4loGD4IrJ8a3fPyOv3mODpzwv6pOIq60AxCmh2SXJXqZkhinW8vTWC9BSRwOUkO 7JCabnVodtsQWvzz0MvnDI7XPnBSIZrxblIZpw9RGdnKsXIrD5OZu/eKeQc5d+uI+o2h b/M+agdq0dJ6Pd1E8fmpRpWNvWmrqQijVyMCdaxCKtdzgGWok/LmxEloyHZpAti9g62I 2hwA== X-Gm-Message-State: AA+aEWYth3wBYsT+gamC+L5XCYKt4Ia4NmWzj1uuy/cgecvo3obaF6NV W/HZ5bpfbQ98pEOI8nj7Qjs= X-Google-Smtp-Source: AFSGD/U0W8fE/GZhYduX6YrvQviSf81n/KELl2VQZZ4L9rhjaPx9b4znlCIus7tCa6zUz/gK13W8jw== X-Received: by 2002:a1c:7011:: with SMTP id l17mr2667096wmc.34.1543334842142; Tue, 27 Nov 2018 08:07:22 -0800 (PST) Received: from localhost ([46.227.18.67]) by smtp.gmail.com with ESMTPSA id b18sm3014766wrw.83.2018.11.27.08.07.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Nov 2018 08:07:21 -0800 (PST) From: Richard Genoud To: Ludovic Desroches , Dan Williams , Vinod Koul Cc: Alexandre Belloni , Nicolas Ferre , Maxime Ripard , Mario Forner , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Richard Genoud , stable@vger.kernel.org Subject: [PATCH] dmaengine: at_hdmac: fix module unloading Date: Tue, 27 Nov 2018 17:06:35 +0100 Message-Id: <20181127160635.11836-2-richard.genoud@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181127160635.11836-1-richard.genoud@gmail.com> References: <20181127160635.11836-1-richard.genoud@gmail.com> MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP of_dma_controller_free() was not called on module onloading. This lead to a soft lockup: watchdog: BUG: soft lockup - CPU#0 stuck for 23s! Modules linked in: at_hdmac [last unloaded: at_hdmac] when of_dma_request_slave_channel() tried to call ofdma->of_dma_xlate(). Cc: stable@vger.kernel.org Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Signed-off-by: Richard Genoud Acked-by: Ludovic Desroches --- drivers/dma/at_hdmac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 1b7f0ca0d5cd..01d936c9fe89 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -2006,6 +2006,8 @@ static int at_dma_remove(struct platform_device *pdev) struct resource *io; at_dma_off(atdma); + if (pdev->dev.of_node) + of_dma_controller_free(pdev->dev.of_node); dma_async_device_unregister(&atdma->dma_common); dma_pool_destroy(atdma->memset_pool);