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=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no 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 A1035C11D32 for ; Mon, 24 Feb 2020 16:30:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69A9220880 for ; Mon, 24 Feb 2020 16:30:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582561833; bh=bWGcTJqlEjn5g6u4zNf52Tgw+7hzPPuuxO1718WofvA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=lLdUhEzxFct+CAb6Jojlb3+sPwsOonNyQpYysn/I5M7JBWBR+MpAsGievEw3GHx++ C9gK8SDR6Obz7pUW13MZpqoTGiCAHiW3L71pnL6hzoUU7ukvIi6h0EmnjYMbbMGpVR iVKFqlcLnZQY7M9RL+BQXhmJFLZfsgbAASyGtc2c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727959AbgBXQad (ORCPT ); Mon, 24 Feb 2020 11:30:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:39152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbgBXQac (ORCPT ); Mon, 24 Feb 2020 11:30:32 -0500 Received: from localhost (unknown [122.182.199.233]) (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 3A71C2080D; Mon, 24 Feb 2020 16:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582561832; bh=bWGcTJqlEjn5g6u4zNf52Tgw+7hzPPuuxO1718WofvA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WOuUHmVuhUlHGACL8h761/MJUQrCsP7cItrYsH/EPFN5/CWTX/WD7k/gQIcfsYprC THqF5EMHw5Z/GPl8lOWySVsfqFUx1EDyJ8ughC2WyxFvU0X8Q70HSqqBtxGuaUOMGD LqdhIX6GEGVPCDYY4X0NXiFUHLN8GllBbgKZTpDA= Date: Mon, 24 Feb 2020 22:00:25 +0530 From: Vinod Koul To: Linus Walleij Cc: Geert Uytterhoeven , Dan Carpenter , kernel-janitors@vger.kernel.org, Jia-Ju Bai , dmaengine , Dan Williams , Linux ARM Subject: Re: [PATCH] dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() Message-ID: <20200224163025.GX2618@vkoul-mobl> References: <20200217144050.3i4ymbytogod4ijn@kili.mountain> <20200219091754.GE2618@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 21-02-20, 15:50, Linus Walleij wrote: > On Wed, Feb 19, 2020 at 10:17 AM Vinod Koul wrote: > > On 17-02-20, 23:24, Geert Uytterhoeven wrote: > > > On Mon, Feb 17, 2020 at 3:41 PM Dan Carpenter wrote: > > > > The caller is already holding the lock so this will deadlock. > > > > > > > > Fixes: 0b58828c923e ("DMAENGINE: COH 901 318 remove irq counting") > > > > Signed-off-by: Dan Carpenter > > > > --- > > > > This is the second double lock bug found using static analysis. The > > > > previous one was commit 627469e4445b ("dmaengine: coh901318: Fix a > > > > double-lock bug"). > > > > > > > > The fact that this has been broken for ten years suggests that no one > > > > has the hardware. > > > > > > Or this only runs CONFIG_SMP=n kernels? > > > This seems to be used in arch/arm/boot/dts/ste-u300.dts only, and > > > CONFIG_ARCH_U300 is a ARCH_MULTI_V5 platform, which looks like > > > it doesn't support SMP? > > > > Should we drop the driver then..? > > I still have the hardware and it still works if that is the question :D Thanks for confirming :) > > And yeah it only has one CPU, but still has a DMA engine. > > The patch is fine to apply because it fixes a bug, should the same > hardware block be used on SMP. Applied now. -- ~Vinod