Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3412899rwa; Tue, 23 Aug 2022 04:29:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR4zCceELCRADjjt2nGcl6NFcWxO1D0k0whhCkufBC4TAgNwlJq0jjkdKiRh1XF3rBg1k1vZ X-Received: by 2002:aa7:c9c2:0:b0:440:b458:9403 with SMTP id i2-20020aa7c9c2000000b00440b4589403mr3333943edt.132.1661254148711; Tue, 23 Aug 2022 04:29:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661254148; cv=none; d=google.com; s=arc-20160816; b=FAVZqQOsrZ1YEeKbT00kbjqT8tSxIUppJMF0ji968RzOL5IYJWq6oZFkRBr4M8WZHv jbkXMcjiahCqmqbZuX+SIA36g19uRWxy8mk1iJajnZ6/26p+z2eO/e7taSPyOiY1248W 0E33bdbJwzqv/rrKWmZnb2+P8ndIKIQhi0q4x4ZCcCJe7rou6srqMTjE5ePh/C+7f1an qIL1gv7B8hTSO5eC7J5cxJsXvVneUJoUN91+ltVW+AmHf3C5Y4YYd696yBvyqtQ2txQ6 UQC04NlDZezatBtQbmNh3FxjaP8uvHFXLK9hfKGK4QkPlAnDKK5j9yOl20a/gDPrLtA3 J2/g== 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=hUbUdRPYBgtWOGAcRnEfVkvw/QQC0p1cKv6Yf5vSXAQ=; b=APn/kiek+TkL7+XfY9Qd3XAHRtmRo4uxK37REtUR9jJVCOVrTnLG6rWp6QS0gP/I1W QdS/E2K+3kGSYW87tMRPNTAU0oIjdvgDo1vrUd/o/pSzJf/AIBiTIrbkHnyC1uEleX8Q Ef/qmUE67WpAIUPVoLLBT9JkMAYG/5wH1GMmlBv03kCL/cBzKTH4aXV3mB2f4GBVsWGL Ss7ok+TQAqpI61pz9nK6z5FCbMIX/HC02Fz4UomU0mocdoue9LIQDE9/WJp3s7JFCN1N 7de/jYqcyFOnk44arqZiUsykJvkB7kIN3NHoGkuLlJLeE9nWi8psgW/UcBbXzigAEaSE xYCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BxJNnbXx; 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 dd16-20020a1709069b9000b0073832d0ce04si12413139ejc.745.2022.08.23.04.28.42; Tue, 23 Aug 2022 04:29:08 -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=BxJNnbXx; 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 S237151AbiHWJSp (ORCPT + 99 others); Tue, 23 Aug 2022 05:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349985AbiHWJQ2 (ORCPT ); Tue, 23 Aug 2022 05:16:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70B69883E0; Tue, 23 Aug 2022 01:32:45 -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 42BE6B81C35; Tue, 23 Aug 2022 08:32:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 899D1C433C1; Tue, 23 Aug 2022 08:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243563; bh=Wk2EN4oWzCNZy1fjsGB+gIos7yTqSgZhVXSohy2ODQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BxJNnbXxmUMmdTXGLj0GbU5dEFut44r0cpvrifZTHr/5E1+yHi0jtLMKY0EajY9ZP 1gKUPmCpAMXVSP3iedreJo1zX4jixlJ2zApr+GPnpieEJdmL3ApZQudypXMUCjUheI lSEUqavKRRlfYGQvy8hRzFKhvEkySsI8RVIdqeQk= 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.19 299/365] dmaengine: dw-axi-dmac: do not print NULL LLI during error Date: Tue, 23 Aug 2022 10:03:20 +0200 Message-Id: <20220823080130.678002903@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080118.128342613@linuxfoundation.org> References: <20220823080118.128342613@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 c741da02b67e..41583f01a360 100644 --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c @@ -982,6 +982,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