Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2224914imm; Thu, 18 Oct 2018 10:59:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV63xaVLux6bkUjuPBrWF5okNeTxakUnLhqlt12cdsChdLGVnglbgbgcGSepDXuKJABhM1diD X-Received: by 2002:a63:c746:: with SMTP id v6-v6mr29922348pgg.108.1539885599219; Thu, 18 Oct 2018 10:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539885599; cv=none; d=google.com; s=arc-20160816; b=Hg+g5JF2PepO4fIxhZ2PIkAgDMZg2plEY+ub6uShoutqcT70WKgQo0hlWqkIm3gPxQ u7tyKPak8JMK87wwOF3zAQMTYQaycMdHFOG0cGFJpfOcgLDrJILRt8bPwwEH+SNFYTwx rrBkJ2w2/Q2feS90Jmyc1ur8X0v37R/zaLnd7LuE8LFLHXHkvoSHdNwgD/owxKAoDGQn lGAZ/Xr/3EiEPsWlKxnhFgZv1qxmSQbgXdlAg+8kuVm8tlN3q30DcE0dCCinOinqXgMn qlkO1pKjFdZLCT4DY995ma7miF/R/cnfSj1muODBGVIozP3m1GsRXm2TFlaE4ugdK8s+ EaxA== 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=edrvQpnwpPAYelMeAck7nlxkaBWWEYzPzdDm8gB3caQ=; b=kkPSaK0GXPhA3lNJNBgLSRWPIX6j5/ECSE96CSlxcFY+9bwefIbC/pQRcYoIGlPn/R yYJ17MM/M9Qkltkd+Nl1x3O7pXxWFBWREvG6cx1t6wI4+0AT0TN+VEzD861k8J4J2kLL eMZ/RWP2zZPldBLeAshcGZ+wqqeBOmK+ok29NkFNrQNfDkuxej7oCWcZH3sRB4q9z1TF +1oJMyFgbI6KOfHA6/7si0/Zu2ioLbUFciTLsfm5k3sH06DJt9yZP+dP9iZ5Q5esNjI5 AIxg0ef97KaRUkkP/uPi/ND4ov4oyf9qTSjCrsCuipA1TUcCCya1A/akTYCiMlbI+Dgk bKmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pfho1S7q; 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 p5-v6si21525967pgk.159.2018.10.18.10.59.44; Thu, 18 Oct 2018 10:59:59 -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=pfho1S7q; 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 S1728882AbeJSB7k (ORCPT + 99 others); Thu, 18 Oct 2018 21:59:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728086AbeJSB7j (ORCPT ); Thu, 18 Oct 2018 21:59:39 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (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 A958A2145D; Thu, 18 Oct 2018 17:57:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885454; bh=z5/xUBjfPcMgm82m6/1eg5IAvV/JEXlEfXg+5m1nsIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pfho1S7q7t6BOGib3rM8QWQUPTyrZaMeeW4+Ae/agk+kCrUFRqr9/YsCyF1/8s3je OI1qa6ygbl+9+KhCEQSL315oPDIKCfQ9agDcwEFg6ZER2xaRtSLrsRVcSQF0xsktx+ 0e/RMmqQoz2qyDDz0imnx/UgB19HxvScjQZdDUO4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sanyog Kale , Shreyas NC , Pierre-Louis Bossart , Vinod Koul , Sasha Levin Subject: [PATCH 4.18 03/53] soundwire: Fix acquiring bus lock twice during master release Date: Thu, 18 Oct 2018 19:53:56 +0200 Message-Id: <20181018175417.133789410@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175416.561567978@linuxfoundation.org> References: <20181018175416.561567978@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sanyog Kale [ Upstream commit 8d6ccf5cebbc7ed1dee9986e36853a78dfb64084 ] As part of sdw_stream_remove_master(), sdw_stream_remove_slave() is called which results in bus lock being acquired twice. So, fix it by performing specific Slave remove operations in sdw_release_master_stream() instead of calling sdw_stream_remove_slave(). Signed-off-by: Sanyog Kale Signed-off-by: Shreyas NC Acked-by: Pierre-Louis Bossart Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/soundwire/stream.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -899,9 +899,10 @@ static void sdw_release_master_stream(st struct sdw_master_runtime *m_rt = stream->m_rt; struct sdw_slave_runtime *s_rt, *_s_rt; - list_for_each_entry_safe(s_rt, _s_rt, - &m_rt->slave_rt_list, m_rt_node) - sdw_stream_remove_slave(s_rt->slave, stream); + list_for_each_entry_safe(s_rt, _s_rt, &m_rt->slave_rt_list, m_rt_node) { + sdw_slave_port_release(s_rt->slave->bus, s_rt->slave, stream); + sdw_release_slave_stream(s_rt->slave, stream); + } list_del(&m_rt->bus_node); }