Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BC4FC433C1 for ; Mon, 29 Mar 2021 11:27:32 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7B136193A for ; Mon, 29 Mar 2021 11:27:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7B136193A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1A5F81660; Mon, 29 Mar 2021 13:26:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1A5F81660 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1617017249; bh=YSmW/AQljbVKko/clgFpEzTrL0BvWh4OPj9mvZ40Efs=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=QgOXv22R2zGXAHJB0Qef/Xq/rbwgWi6Rrmzgk0LdD8Y+7pduDMmvWBqWEwjLKxhW6 b2m4vi1+8HQFaPb/vb2ABOhp4Jw7rqai9OxfkfPV8Ryqh7VRlRP9XT8/Zij2mdgZiE n4O6JFUIonfJG0zv+5o/KRgnR0HqUfu8MO402Y/Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 67252F80157; Mon, 29 Mar 2021 13:26:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7E1ECF8015A; Mon, 29 Mar 2021 13:26:36 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7CAEEF800B9 for ; Mon, 29 Mar 2021 13:26:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7CAEEF800B9 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 43E9CB457; Mon, 29 Mar 2021 11:26:30 +0000 (UTC) Date: Mon, 29 Mar 2021 13:26:29 +0200 Message-ID: From: Takashi Iwai To: root Subject: Re: [PATCH] ALSA: core: remove redundant spin_lock pair in snd_card_disconnect In-Reply-To: <1616989007-34429-1-git-send-email-wang.yi59@zte.com.cn> References: <1616989007-34429-1-git-send-email-wang.yi59@zte.com.cn> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, wang.liang82@zte.com.cn, linux-kernel@vger.kernel.org, tiwai@suse.com, Jia Zhou , xue.zhihong@zte.com.cn X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 29 Mar 2021 05:36:47 +0200, root wrote: > > [1.1.1 ] > > From: Jia Zhou > > modification in commit 2a3f7221acdd ("ALSA: core: Fix card races between > register and disconnect") resulting in this problem. > > Signed-off-by: Jia Zhou > Signed-off-by: Yi Wang The code change looks good, but the patch isn't cleanly applicable via git-am. Could you fix your MUA setup, or try to submit via git-send-email? thanks, Takashi > --- > sound/core/init.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/sound/core/init.c b/sound/core/init.c > index 018ce4ef1..9f5270c90 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.18.4 > >