From mboxrd@z Thu Jan 1 00:00:00 1970 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, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 D6480C433E1 for ; Mon, 29 Mar 2021 11:27:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7C3461960 for ; Mon, 29 Mar 2021 11:27:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232210AbhC2L1I (ORCPT ); Mon, 29 Mar 2021 07:27:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:47480 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231995AbhC2L0b (ORCPT ); Mon, 29 Mar 2021 07:26:31 -0400 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 Cc: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, xue.zhihong@zte.com.cn, wang.liang82@zte.com.cn, Jia Zhou 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >