Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3409343rwa; Tue, 23 Aug 2022 04:25:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR5jF7bsdrkIbbI/Qty4c/LPvD8Bw0FL/VchPSjF4AWNoG9din1zDeGZY+1vFn6+ZO2NO//J X-Received: by 2002:a05:6402:2714:b0:446:eaa5:79f2 with SMTP id y20-20020a056402271400b00446eaa579f2mr3341597edd.22.1661253912664; Tue, 23 Aug 2022 04:25:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661253912; cv=none; d=google.com; s=arc-20160816; b=uPCjJWKt3VC1In/SBS7dwyVQdRkh7NfCd9hoKQv/Lo4dOnEAP23uDM2A3JJM/aVm0L wHdtqoUBbcOsnfI1IAmpU0PA84cLdEaY5wYsa7Dj/hF9KDmxT1+iBlv/8sGlygNcsRJL MB8BEuHkPGtKhYGtOkkbSsxIEx9kWXud7HTL360GDvae6u42dD2raJAU18P/Qsky2qgN Ukz2JNP/QV/0689cyKSvO0O+zGuMxxm1lfgrqgY1bj4lDgWwEtVZLvGBZZUOzhudpVEL QGHTdaghCE4wdVIgPv8gRNLcgV85p4Q1sT1dR88qXhUhN0oFGcZPh9CILu4XIh6SjCaY zeWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IPz4cWP7HD6TIEblqmErx0L+5xsXYOPgrdwipezYHAc=; b=vXv9K4GSp/pCIeUdBnGk9OcSNFGzMmUJmPqHgrQBWVDyvN7nEcK108FlA/LileUWSf GLcPcVxjuWp80tLJQuY+wW8s63qlGZ0cO54ZfPX2ExofEClOCGZwwKDcDFXbQoZAp7LG NU/jBB54Lu33ee/eEf+Xg+WwpuN5GgTJKn6WzzqTaFfkv5QhmSw3EPdPCFvRw2zkPsyV AUkj6+TRANfMptLoWiH6qWjpuvFY5/63/oxbgGHr4J+ytJHws+i4qcqj6jEwuEe3xztN 4pwbpUF/f7V7BJ+fvcXjnwhheLZKqQ6xIkzhqzMk7ItKcHYu69zMBcFqyUd8DkZ+NeM1 83fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1iX6PYnd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a056402149000b0043d2b797e58si1627784edv.497.2022.08.23.04.24.45; Tue, 23 Aug 2022 04:25:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1iX6PYnd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354213AbiHWKZT (ORCPT + 99 others); Tue, 23 Aug 2022 06:25:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353543AbiHWKLi (ORCPT ); Tue, 23 Aug 2022 06:11:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C9A1D6E; Tue, 23 Aug 2022 01:57:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3B62CB81C39; Tue, 23 Aug 2022 08:57:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8140DC433D6; Tue, 23 Aug 2022 08:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245031; bh=mTC0kP17e1XCi3YiZ/Si/p45n4hJH4RH53+7e7trTvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1iX6PYnd9C81Xu2wkZR3X4dTIPrt/u+MISnUPZhG7vhQrLx6abKyUhKuFA4Vow/9u 4ssWLws8lakYdd0KfquMujZozUdbrydODTqWPB6ei/zLV5CSzOg5OO8RqeLVLKVOyn B3st3XhZXJ79sGvPgX569AYADqhUY0ph9tRW2zUo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ben Dooks , Vinod Koul , Sasha Levin Subject: [PATCH 5.15 193/244] dmaengine: dw-axi-dmac: do not print NULL LLI during error Date: Tue, 23 Aug 2022 10:25:52 +0200 Message-Id: <20220823080105.842297214@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080059.091088642@linuxfoundation.org> References: <20220823080059.091088642@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Dooks [ Upstream commit 86cb0defe0e275453bc39e856bb523eb425a6537 ] During debugging we have seen an issue where axi_chan_dump_lli() is passed a NULL LLI pointer which ends up causing an OOPS due to trying to get fields from it. Simply print NULL LLI and exit to avoid this. Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20220708170153.269991-3-ben.dooks@sifive.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c index 35993ab92154..8f765e2d7c72 100644 --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c @@ -944,6 +944,11 @@ static int dw_axi_dma_chan_slave_config(struct dma_chan *dchan, static void axi_chan_dump_lli(struct axi_dma_chan *chan, struct axi_dma_hw_desc *desc) { + if (!desc->lli) { + dev_err(dchan2dev(&chan->vc.chan), "NULL LLI\n"); + return; + } + dev_err(dchan2dev(&chan->vc.chan), "SAR: 0x%llx DAR: 0x%llx LLP: 0x%llx BTS 0x%x CTL: 0x%x:%08x", le64_to_cpu(desc->lli->sar), -- 2.35.1