Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp451493pxj; Thu, 20 May 2021 13:15:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcCymcUC+LRyra5sI6c0PtK8JDY7mGH7wAAaGtj8bmQop8w75csOur8YYFFRV85bFq/Rt4 X-Received: by 2002:a92:db0e:: with SMTP id b14mr6281590iln.171.1621541725171; Thu, 20 May 2021 13:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621541725; cv=none; d=google.com; s=arc-20160816; b=B/rejQE/0vxVApTFDtF40h+gHSCaoIUud3+pDKem8fMymXzUWX82hD5eiDWjN6z6HX Atd8HHrWvEufEMUGc7IGF6OfXPpMSx5vp9lAg+O6crfgJmOh52x+3KSKqkXvCNgdec5i cxtGQtrBuMaEKl1aog9vZDfF/iC5DGF03rzGMH5MmN6FusI8Pb2C7+YeX84Jt3wLN7Cu FXhulrR0UC2JBN7Bym3wDvo7PSr49g8zqqaIbq/BFjEjfZyb9qFUw+e4ld6nVo/GrEh9 VcqoEdQtsVt9LoArJ43IJ97OoqKcCNTwKMOe3P7XPK7pjfXGji8nEEgx+7s6z3rwwbJc h54A== 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=QrJRfOmlQf0yJUiMJE2za5qTROvvdbhHj7kCDirruVE=; b=Im5v75cSe8D9c8gJraU7ODYVDayaQiT6iyTOUau73rmLaRKUq4RT1fl1SUZAgWUdIr uirACKLhul1jsKDIr1OnE9B9VgBxudwFufVYwZbA96f7lV1zJMuJl71sarzlVcdqUEko ant3rIU+7Urdg955qhBhiiM4X7MWm92Y3R647Eu9i2b4FlbiGMWBSxxs4bIdHFn4El/Q cfI3Twhb9uGn+2lhtnIAsiymYkipu1dNufSm+QluDjHlkp/13Zq9FSdaqGn8CkMPziKB sosPvBB5TVsUgWNnrK4migR9KBhnN2NfLgp+4GRRRWi9/jhfbxiwR0m29MN6d4jjP22o ZHFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pFzOrKZi; 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 17si3495575ilj.19.2021.05.20.13.15.11; Thu, 20 May 2021 13:15:25 -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=pFzOrKZi; 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 S235261AbhETKrp (ORCPT + 99 others); Thu, 20 May 2021 06:47:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:60480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237321AbhETKbl (ORCPT ); Thu, 20 May 2021 06:31:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 659B261C30; Thu, 20 May 2021 09:52:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504340; bh=sEP+78M9DwHYbFIR814WP8GqfRmfhoaYsCHzC4LKNmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pFzOrKZijW7N8XzPlIyLApQfGOQjjvhwqbUmYebLR8+jZ48nIp4g9AJUNznJ2BVMH TJCWSgDxBsa8Cfd6ej4r5k7uIuHQnyC1kvkJRci4YeQq5KhYhw7mdxqSIPQgy2b8eI RWc4cFKHVm5nU9tZYT55tEeBRuNE3mzMzhfIuLjo= 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.14 200/323] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect Date: Thu, 20 May 2021 11:21:32 +0200 Message-Id: <20210520092126.984356107@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 dcb9199f5e4f..7fdeae4dc820 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -404,10 +404,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