Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp587467pxj; Thu, 20 May 2021 17:05:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbZFMBvz2EEV/Xqf/yGSoHutpHWgPW7z6RlMkcYdu1Uuvc7hBdlezy9yLc1xNos87/ux8m X-Received: by 2002:a92:d2ca:: with SMTP id w10mr9037171ilg.31.1621555557588; Thu, 20 May 2021 17:05:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621555557; cv=none; d=google.com; s=arc-20160816; b=0Ugw3rNTO25mZsXpoDhQvCLin0NlC0K/49mHkE754+fvzZeAmthyArs8caIBRARo51 AJuNRD3iPkxyq2YWruPByS+DDXXhccVnJLwY/UmFCCfpr6WgxopMWT5PP598kW5QBEz0 eRejJ+twyVldmwuey+Ht0FvYX3PBJpAIMpwhJxRhA6yDGHzlFeuvHqUQx7skJoK9WtvZ 8P9NorYaI7ZJE7S3Kj8rIoK1FuhsRfIdfkxCQpHtVzHbEMd2eh34tKzz27wE1YrI2YKf tihaMEnjmK4rMGPdVO1FB2Ey5WF3PxSEFqYBb8nfbu30IKJU94GVVARMG7WM5l5OJTlb svKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=q/8UvLHnJFJnrph30n5bFNOUAYqqf5RxZNGlDKB3t10=; b=IfMjbPA35t+twNafcAHO3d2YbvqDFLP4I09vV8qqxiYvQjr2ej0Ilx8sNffQ5llozv 23Z5SH+LJkFTM/wcFpRuik/0E8iA0lahyOwWzTYcYr3jtInQsqPmoA+NiV1yOkABZRku QB2v9w57PxAqof0ayKNPdk5kHaQ6PoKxrESyzWPOfjo34oitzMuX3SiTgD7mQZEvrQuA /Aw10Ny0rBwi5J9kISNPTm84TKaG0slEPsuHP7g2b2rpdqUKF+bd0cO5Xo068EzBicQr ZzzApIIStHWQ48BFcFfzWvQVna/FPKq670vgVFbG8BLDB4hqP5BRDpP3W9A4GbgkCO8+ FQ+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Yc0zNIjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si3682962iow.64.2021.05.20.17.05.15; Thu, 20 May 2021 17:05:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Yc0zNIjb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240743AbhETLTR (ORCPT + 99 others); Thu, 20 May 2021 07:19:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:54416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238971AbhETK5D (ORCPT ); Thu, 20 May 2021 06:57:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 26CC861CF3; Thu, 20 May 2021 10:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504923; bh=YbVIz8Ibv02Yvf0tb5GKbY4pMdqT6P027w+wWsILNAE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yc0zNIjbyByh2k8UdfbkLFMNf7OFEan7HsyR8yMMkamdXCQPInZIzZ14TlQg/jSVv G9B+eIzzJEvdqNuSU8oetT2fbMwnyaC2fcSqVdYnoYxxOBycFHLC/MFWc/sHP9CtgU MGC1/UOcpgPo7bqImXG4yesU9AWiT3eFGIq6/r8s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jia Zhou , Yi Wang , Takashi Iwai , Sasha Levin Subject: [PATCH 4.9 141/240] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect Date: Thu, 20 May 2021 11:22:13 +0200 Message-Id: <20210520092113.380345776@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092108.587553970@linuxfoundation.org> References: <20210520092108.587553970@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jia Zhou [ Upstream commit abc21649b3e5c34b143bf86f0c78e33d5815e250 ] modification in commit 2a3f7221acdd ("ALSA: core: Fix card races between register and disconnect") resulting in this problem. Fixes: 2a3f7221acdd ("ALSA: core: Fix card races between register and disconnect") Signed-off-by: Jia Zhou Signed-off-by: Yi Wang Link: https://lore.kernel.org/r/1616989007-34429-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/core/init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/core/init.c b/sound/core/init.c index 02e96c580cb7..59377e579adb 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -406,10 +406,8 @@ int snd_card_disconnect(struct snd_card *card) return 0; } card->shutdown = 1; - spin_unlock(&card->files_lock); /* replace file->f_op with special dummy operations */ - spin_lock(&card->files_lock); list_for_each_entry(mfile, &card->files_list, list) { /* it's critical part, use endless loop */ /* we have no room to fail */ -- 2.30.2