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 AD65FE95A8E for ; Mon, 9 Oct 2023 06:12: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:MIME-Version:Date:Message-Id:Subject: References:In-Reply-To:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iIbrSJZIDqQ58pfgFKPn/33UbIdSSY3KyvhjYxFIRiU=; b=IilhLabm6knlQi pkrqKQjxFRfxGcTpSGSGcUmKYY2DcBg4WRjXdN5LjHT1g89xEt+MLWvwNDws47hTjYo1Cx/O0/8j7 5kSeCSLDMBmxSAYJ3IqgOK/Tq7XkXKOMxlgDxWRcIBwQF3uryCHk2Y81Pg6uVy3RhIL1zXDkYJl/1 f4uMCNgIvaOHHPNaYQ/7RtQ8+velL2jlIowjjt6sGZMoFU8AFMiaFBwEgVNIkN70ek8u3Yvfsj8pu +tPzayFDmIs8OdXKlGQHRmyFExU8uFSKQkOMW++w/Yg5K7aIZoxQhf4qypkQWDq19V9PRmwGLOXEJ Yi88iq6gGLIglJIImWlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qpjV8-009p4S-00; Mon, 09 Oct 2023 06:12:22 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qpjV5-009p42-2l for linux-arm-kernel@lists.infradead.org; Mon, 09 Oct 2023 06:12:21 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 11C38B80ADD; Mon, 9 Oct 2023 06:12:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBCE1C433CA; Mon, 9 Oct 2023 06:12:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696831937; bh=FTNOXpa65H/cSqigLsrU9/tvUHcGMrJuoHxbZJutJa8=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=dqWM+5MZqoUaGuyBCCy0tnTXdOwqal2FpQ2R8vdT92eBmht1UsZX6gnPTT+cyeDJv DrWg5TGEZDgg81bfklvh9WpewY+gPezRmgN7Hhdn9q3/xrqp3yPwyFf1X7+seOCU+J VJNqSNY7hkkSXcXnntiyo2qyh1ym+l6Q5ajXo31TpUuAWGmGVB7ocWSNz+UNh9SHav PmBIMeRrs6PDY3sYngGZ/vgPIDLM6cZCWqx45ngk0Zz9skzbKXk70orlxIyQh8ILH0 ah8psLqd258l0ZUzl0smrZieCFHkFfDRiWqvw6ddeF5YGEJAtsG9n3UVb9X23YP6eb 22LnrVkmat2Ww== From: Vinod Koul To: keescook@chromium.org, gustavoars@kernel.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Christophe JAILLET Cc: linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org In-Reply-To: References: Subject: Re: [PATCH 1/2] dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc() Message-Id: <169683193345.43997.16902412199226518649.b4-ty@kernel.org> Date: Mon, 09 Oct 2023 11:42:13 +0530 MIME-Version: 1.0 X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231008_231220_048684_16DC69FE X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. 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 Sat, 07 Oct 2023 13:13:09 +0200, Christophe JAILLET wrote: > If pxad_alloc_desc() fails on the first dma_pool_alloc() call, then > sw_desc->nb_desc is zero. > In such a case pxad_free_desc() is called and it will BUG_ON(). > > Remove this erroneous BUG_ON(). > > It is also useless, because if "sw_desc->nb_desc == 0", then, on the first > iteration of the for loop, i is -1 and the loop will not be executed. > (both i and sw_desc->nb_desc are 'int') > > [...] Applied, thanks! [1/2] dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc() commit: 83c761f568733277ce1f7eb9dc9e890649c29a8c [2/2] dmaengine: pxa_dma: Annotate struct pxad_desc_sw with __counted_by commit: 0481291f0ccbc5147635cf0eb108f9fe5a05ee7d Best regards, -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel