Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4618488pxj; Wed, 12 May 2021 09:21:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy22A9EoA6AM1IrofPOc8mjkguX3AGR+LqVCk2hI+UuayVvmtoYqq08jdizOTf6iJsO9cl1 X-Received: by 2002:a17:907:3f28:: with SMTP id hq40mr38415483ejc.283.1620836471306; Wed, 12 May 2021 09:21:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836471; cv=none; d=google.com; s=arc-20160816; b=lIe0z4ek6iHNSQq/w4dtneLiwzsxU5FZEiOEwtxwuxLWtpiCk9ypBw+rWmUxOZiODR qXWtVkwmqn6+4qVzs9kuMZuPZylNx6smBpYJzQOnzCuXnQL791QNx/LwHAlbllKlwrxm lz3do00a83d5NSodHm8QNJHq7t/cA5hk5FCAieew7boKomavwRIJhm5QJJR4e7FCBJZc oBk8c+tM4+fo4zlVciC3GALOgx/brWRqDaZ2rgNhnCJgwNA3MzZBkAOGZPim9NnD2mdl v3uVVrd85ez8Uir6YAsnnN4e3WDsGlfMW96t8Uj9611zHn0IhAPmjikO8w9ydZEUPxK+ krUw== 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=2tWDQLC6GkQ8nd9H/eLYwXfBgiJG2y3g0J74hEbeWq4=; b=u2J8sBs/CRBrNAshKvVFCYkaiTV3TJyr4eLv4bz6mqVabiAju36SG0iKG+MDsQ22Kx x5hv+5MHOWn5mO7qwH7W2y3uFT9ejwRQPQFUgKAza7LG+UPfL8A9LdRvfbW3Gk0zybys uW8ajGJ8yC2BCQL2JeeG2QQN95r2vUGsDV+jysq6lEgAHwqkxOWFagumg+I5rIEkGUoN /w3JMqbyu/9sroF+Mu2r9JIfa+k97WBvQf/4uYsQI4qKrAGDGzk8oVJMvchMGWK6cb43 wnihqwb1qEOgZnVC3Lky5D4lelqvxyYbI73XcgdlhQ12ulkuLaUbjtkWjgJfh4DazBVI N2CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=irhBLoL5; 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 x9si245250eje.114.2021.05.12.09.20.46; Wed, 12 May 2021 09:21:11 -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=irhBLoL5; 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 S240590AbhELQSY (ORCPT + 99 others); Wed, 12 May 2021 12:18:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:50038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235543AbhELPfy (ORCPT ); Wed, 12 May 2021 11:35:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 54B1261C40; Wed, 12 May 2021 15:17:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832675; bh=0tZ7O0vNpbKTAR9y891TW5HsK9QWmS05pBoP9DLh498=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=irhBLoL5cOfdHWqJHexm0o6C4dQESdxhCRrL+g8DgIsSg80Fw6MoAG3Ys+BQj+KV3 O5sH7On+tdfb6UPIZBLYcMBr4ow0uvukJqyBrWZNNzXbjJn4iMV5/fUZsLiRWHFByt 9f1trQfsZtAol59PBICduvdxS7QOuMQPE2djiTfc= 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 5.10 378/530] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect Date: Wed, 12 May 2021 16:48:08 +0200 Message-Id: <20210512144832.200074074@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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 018ce4ef12ec..9f5270c90a10 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -390,10 +390,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