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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC091C433F5 for ; Mon, 11 Apr 2022 13:35:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=feBFLyleo2kmdpBe5C26LMtfYE2anIXi9EyMTMFSqw8=; b=y1NABSCtq+kBfA /V/wNnuXwyyY7uObO/U1SDF6e3KSAFZckHF792AzramkzCchblS/XVMIyodYV9ySEEmGfd+YolD/C sg7k0283qoBCbNhoz6+M9x4WuOb9dhsKCBsX0yExMcGW8FWSZaKXz2urikFFO3u3Zp7pq7OlPE5sz f4qc/3058nijknNhbCBhkXQkYY5RP/qyKVtAHHuQb48Khv/IIzOed9rDOtDL7fr9fPbLu3Wcq0n4I FavPB8waHy8iIMMkUesQ7Y5agUBLmyjMat+Ll5uXym7x/hP53/lDQxrIq7QU+3yg+mDulcQZWRcca 4GS2oFpMTNwFp6fhLVkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nduBm-009BOD-Tl; Mon, 11 Apr 2022 13:34:43 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nduBj-009BNg-Jh for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 13:34:41 +0000 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 176B1B815BA; Mon, 11 Apr 2022 13:34:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B146C385AA; Mon, 11 Apr 2022 13:34:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649684076; bh=T15d2lZIS7swr10X+ACZq35v4lVQuqNfhmMmHgFlVEc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fxmI5vEYYGnZz+aTsqRn57VN3tuLDQmmAyMmtcX7SdQiH8i6Q2n+Y1c5j9tpfIhQB 3zGtY7Gm4oHSlKlsMhFZ93w5VIuXOQG74WifgOtVxSJF11/lmHbiYPQaotDACMtKMP +i05rnnYY0+oNsCFhFS+Zt8+mMEQMBoKCiZoTfoD1GO/gK/DazWCr8FP6FAAYWuQOY K2GtGBpIT0er7smCTtzg9FjNLDv4GIJQ783svxSVro7e4NskBw/a1UbfoxYcKb6ILa yHuTrMjtMglM68iK1JeQlQUYneRRhrgPLB5/bsEyIj52vENWWisyO3BTxb4ifCdaFS vlSRyr/kIG2TQ== Date: Mon, 11 Apr 2022 19:04:32 +0530 From: Vinod Koul To: Xiaomeng Tong Cc: ludovic.desroches@microchip.com, tudor.ambarus@microchip.com, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] dma: at_xdmac: fix a missing check on list iterator Message-ID: References: <20220327061154.4867-1-xiam0nd.tong@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220327061154.4867-1-xiam0nd.tong@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_063439_829498_F0BED16A X-CRM114-Status: GOOD ( 10.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 27-03-22, 14:11, Xiaomeng Tong wrote: > The bug is here: > __func__, desc, &desc->tx_dma_desc.phys, ret, cookie, residue); > > The list iterator 'desc' will point to a bogus position containing > HEAD if the list is empty or no element is found. To avoid dev_dbg() > prints a invalid address, use a new variable 'iter' as the list > iterator, while use the origin variable 'desc' as a dedicated > pointer to point to the found element. Applied, thanks -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel