Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp623006pxj; Thu, 20 May 2021 18:12:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFf8HJWDvfaoY6PFj7/OI375cCB4QynddnJIcRPZW+OWuuzLb0heLE2Rep9Sxvz+hc3t6z X-Received: by 2002:a17:906:3f86:: with SMTP id b6mr7457469ejj.530.1621559538330; Thu, 20 May 2021 18:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621559538; cv=none; d=google.com; s=arc-20160816; b=MGJPzp+/F3XFjN7ei0dcoEKOnS4NI9sznCUs+0Q0d05doIU2pSPy9M+0eoxxfCitlf 5hzl/4VLba/rwAR017NNO7wvOPm8AtZEOptGo7OrI5ZoVQl9bsPxMFODikMKs9gCzPhU +NyJAbpP/O+fYdIkxxGqb6P8cfiFWRjTMvRyP92eMNWcSIjjyl/JLy4OuSZskwMnsdYS PQQaiY/pROdbXaUl0FtF1mwmJ6VAkU09gSz3N9fuoKeyI3hJvDuuZ/18Rwgvl02FWUXC 4jgCYKnZ7S/PiEw7O/oE+J9DhbDF1lwVOjufFrGocFKF5yhhv4SdQtTQ+zu1/tHkMNcq KTzA== 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=iCxdPGtLXjgPjkcVzkLrod8Fr6PURN9DyEL8hZiP/N8=; b=kZ+kWLxO0e6vANp3i3M2a3DXq7gn6Ganm05ZcNkhB7MNMpJlP3bDzUDkBsLDcOT+6J 9bjTFNFJg1xHxcATC98/N1YLTUPVk77FV1NJB56w5n6q0BYuaDW1d02iIcKK3mA92A0u ClHQoD+eh0grnYh/ZAkFoPNVUSIv8KtPcqmT365oMF7BdHXd0tLZvR2ibKVpVKHoQZTR 9K+KS37QYlygjTwx4vBwZpWjoLbTKt7BM9wLON33H4lSLAtSEHYvEP43MshU9fsbcXuU W37C30GpAWjAjRGxomxfI5aMRIvsJZDm+8wPq7kGpXDxHfCrLHBlgNcm10VazHdHOjM5 /8gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sHTR4hFn; 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 ds10si4840746ejc.415.2021.05.20.18.11.54; Thu, 20 May 2021 18:12:18 -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=sHTR4hFn; 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 S241995AbhETLlR (ORCPT + 99 others); Thu, 20 May 2021 07:41:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:43486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240131AbhETLU1 (ORCPT ); Thu, 20 May 2021 07:20:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E23561D85; Thu, 20 May 2021 10:11:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505467; bh=eK1sJ7ATL0rlTrWlJly6d1wzclRUc1ZGHPpZi8qgbYQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sHTR4hFnwRGRfcbXclvCNUkUnDmsExu9i5puYY8K5huYjNqtWkQ+jS9GD9/OcdkRj +ZbWUyVOrazvfO7t6HmcyAWw3uJr3V51v11SpNxJgHfgihGreHKGY+Vuq1vQVcSvmR 8qCqh8umzN3bCu1BuXlyvRZQIc/Qm9Pb/zaoAeHQ= 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.4 114/190] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect Date: Thu, 20 May 2021 11:22:58 +0200 Message-Id: <20210520092105.963865143@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@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 67765c61e5d5..d0f8405fdfd8 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -403,10 +403,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