Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp647480ybh; Tue, 10 Mar 2020 05:49:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvFbShSgI3wL5AKuk158PI6Ihd2Nlad5+R5AEmGHaXqeSW2NLRKk/Z2H/wgogRFwblJLGOb X-Received: by 2002:aca:488a:: with SMTP id v132mr995622oia.166.1583844566846; Tue, 10 Mar 2020 05:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583844566; cv=none; d=google.com; s=arc-20160816; b=MFLjrlGOx5rw+1/vh5qXvFAOEe7XBMHWgTRMw6wBZoDVn35hyA23Nop1Lq6UMeX8B2 uOfGT/Siic4o3syMNzcayiu7q3v373JM/hH4EoC9mH5u7HhkjENyDxEDfirdYlLThD28 8mISecuKOF+jTPabPErBw4xw/1/02AMhV4qZLSXmAbh/pcZlhUCRs7MCl3hE/IioYnQf zC6Okubnr+jAMkehyJgfDuojDl75lTe9wpb0VIsQi5DLsHwCQXNJp3OmOFUIWA38H3di staooFc8GKG3evpQlZynN1gnzDJSm7feiOKSF5heHVKXysOT/co/iZriNBHXCIOwjT0f pr3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z6LlJ0Ak0REje4sfZXY9pgVfeqizJAMj2EgQTcVLKso=; b=efDYjaccq0Ghh7QTgFHne+3sgRDl/P2V4ofuAL1Dj6hb5xFV1wHBmjUFQrk3WgAH+a 3XPkm/piKtlguWaolCZEbn1g+Nqqp7osbETIAmF6VtxAkbJDGMHwyoUbD8tH5ZxdQSWv 7jn4Vqm3lIoxOrIT95azfcWqguaWEUQfiix6vOW+emYVAFmoNYM7MLl1LB36+BF3LZBr UjlbIzUBlNN5iXWTkqeIqAHAX4UCIJgGofdHxoNq6sDLLSypgNTSb9axHgNEIET+A/H6 12XpFeDUcWgc4/1DwVwJ4LPnu5QLV5F6FhZfEP36O5exbnXnLU4Jnc8XVYzPu8goGHUl J+Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JJb8UoOk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q25si5301712oij.74.2020.03.10.05.49.15; Tue, 10 Mar 2020 05:49:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JJb8UoOk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728181AbgCJMr2 (ORCPT + 99 others); Tue, 10 Mar 2020 08:47:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:51266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728176AbgCJMr1 (ORCPT ); Tue, 10 Mar 2020 08:47:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 DCFD824691; Tue, 10 Mar 2020 12:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583844446; bh=22IC65lRb6RwhaXCNj3PkpIhp56hep89oFwc1Ves1Eg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JJb8UoOkAdufrrtVincHrTc8ITrxORw+noTotWDUGxs8u8GVAECqdyNs2uhSIZ7Oa oEIShKXfzakSwjHDOUdzwhKo+FiStdmE4B1rrBhLbXoKYtcQMkDZ/Kruzx4sbI64TE SIMILjm7dzd5sDa5k4K3Q2Y3UF+iWhpoO14W3Wvo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Vinod Koul Subject: [PATCH 4.9 85/88] dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() Date: Tue, 10 Mar 2020 13:39:33 +0100 Message-Id: <20200310123625.059770813@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200310123606.543939933@linuxfoundation.org> References: <20200310123606.543939933@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter commit 36d5d22090d13fd3a7a8c9663a711cbe6970aac8 upstream. 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 Link: https://lore.kernel.org/r/20200217144050.3i4ymbytogod4ijn@kili.mountain Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/coh901318.c | 4 ---- 1 file changed, 4 deletions(-) --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c @@ -1944,8 +1944,6 @@ static void dma_tc_handle(struct coh9013 return; } - spin_lock(&cohc->lock); - /* * When we reach this point, at least one queue item * should have been moved over from cohc->queue to @@ -1966,8 +1964,6 @@ static void dma_tc_handle(struct coh9013 if (coh901318_queue_start(cohc) == NULL) cohc->busy = 0; - spin_unlock(&cohc->lock); - /* * This tasklet will remove items from cohc->active * and thus terminates them.