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=-9.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,USER_AGENT_GIT autolearn=ham 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 C63E6C28EBD for ; Sun, 9 Jun 2019 17:11:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9154D205F4 for ; Sun, 9 Jun 2019 17:11:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560100301; bh=8ogiAiXfwvBeHmbvbV7jqj35dscionKxfE9kNnfNl3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ygL5ypazppxXqnk+mGmbsPJJXo7ju7B2XUDlbhglOUqkH1h1VT6F7kEj3M/xm4UZx jQP4okruZYZCmhx6s6Cuioe9ZUJM4OSXL9OrgOhTXatupxz1Ia69Sfg5CBcN4RikSk zEJdLTcfJ1aJMFWMNQF1WVgZIfDgSJ2939Zf7OPQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388002AbfFIRLk (ORCPT ); Sun, 9 Jun 2019 13:11:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:37734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730474AbfFIRAy (ORCPT ); Sun, 9 Jun 2019 13:00:54 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6E443206C3; Sun, 9 Jun 2019 17:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560099653; bh=8ogiAiXfwvBeHmbvbV7jqj35dscionKxfE9kNnfNl3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sC6F0jc5JDPV/rNJpyTHZsHXzMa/t4SjpCidnyg5MlGaQt52+02pTmUkm31yP4MmS ggUJJl23HJFv1Z7O5PKwwfCYSqm7FmowhvOueMnXhBm36X2MKefC47I8P5g0ui//0L XaU8Yu3EXu9O2vBW3r9pYQBua7GDY1Lp66mw8X7Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Ferre , Ludovic Desroches , Vinod Koul , Sasha Levin Subject: [PATCH 4.4 117/241] dmaengine: at_xdmac: remove BUG_ON macro in tasklet Date: Sun, 9 Jun 2019 18:40:59 +0200 Message-Id: <20190609164151.178976837@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190609164147.729157653@linuxfoundation.org> References: <20190609164147.729157653@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ Upstream commit e2c114c06da2d9ffad5b16690abf008d6696f689 ] Even if this case shouldn't happen when controller is properly programmed, it's still better to avoid dumping a kernel Oops for this. As the sequence may happen only for debugging purposes, log the error and just finish the tasklet call. Signed-off-by: Nicolas Ferre Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/at_xdmac.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index af24c5bf32d69..8aa3ccf42e55a 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -1608,7 +1608,11 @@ static void at_xdmac_tasklet(unsigned long data) struct at_xdmac_desc, xfer_node); dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc); - BUG_ON(!desc->active_xfer); + if (!desc->active_xfer) { + dev_err(chan2dev(&atchan->chan), "Xfer not active: exiting"); + spin_unlock_bh(&atchan->lock); + return; + } txd = &desc->tx_dma_desc; -- 2.20.1