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=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 0B6A2CA9EB6 for ; Wed, 23 Oct 2019 16:23:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D0ED62084C for ; Wed, 23 Oct 2019 16:23:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407240AbfJWQXZ (ORCPT ); Wed, 23 Oct 2019 12:23:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:44308 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2407111AbfJWQXW (ORCPT ); Wed, 23 Oct 2019 12:23:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 077FDB4B5; Wed, 23 Oct 2019 16:23:21 +0000 (UTC) Date: Wed, 23 Oct 2019 18:23:20 +0200 Message-ID: From: Takashi Iwai To: Jerome Brunet Cc: Mark Brown , Liam Girdwood , alsa-devel@alsa-project.org, Russell King , linux-kernel@vger.kernel.org Subject: Re: [alsa-devel] [PATCH 0/2] ASoC: hdmi-codec: fix locking issue In-Reply-To: <20191023161203.28955-1-jbrunet@baylibre.com> References: <20191023161203.28955-1-jbrunet@baylibre.com> 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Oct 2019 18:12:01 +0200, Jerome Brunet wrote: > > This patchset fixes the locking issue reported by Russell. > > As explained a mutex was used as flag and held while returning to > userspace. > > Patch 2 is entirely optional and switches from bit atomic operation > to mutex again. I tend to prefer bit atomic operation in this > particular case but either way should be fine. I fail to see why the mutex is needed there. Could you elaborate about the background? IIUC, the protection with the atomic bitmap should guarantee the exclusive access. The mutex would allow the possible concurrent calls of multiple startup of a single instance, but is this the thing to be solved? thanks, Takashi > > Jerome Brunet (2): > Revert "ASoC: hdmi-codec: re-introduce mutex locking" > ASoC: hdmi-codec: re-introduce mutex locking again > > sound/soc/codecs/hdmi-codec.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > -- > 2.21.0 > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > https://mailman.alsa-project.org/mailman/listinfo/alsa-devel >