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=-8.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,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 D5734C2D0CF for ; Tue, 24 Dec 2019 14:32:49 +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 E617120706 for ; Tue, 24 Dec 2019 14:32:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="u8dFblIn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E617120706 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 E9A8316A0; Tue, 24 Dec 2019 15:31:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E9A8316A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1577197967; bh=AqZ0NmgMdD5hVMfn0es8pEzLUAR5YTcDyckJJfGvhLw=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=u8dFblIn1lNX6J1htgJkiZo4E1r2KaJE6J9MWE5zvVRDNt8UPDPnsPe9UujRp7Aji jtuRNbOmyR6EgdSyZf05mKZUH4r1oVRakXy23P4whJbXWa40DPC9ixIfxYkbdBWeUP GbojsJDMQ+7KZlHerGGM6Cp8X6s5PdI0W6jIbBh8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 50734F80136; Tue, 24 Dec 2019 15:31:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 79167F80138; Tue, 24 Dec 2019 15:31:54 +0100 (CET) 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 8B770F800E8 for ; Tue, 24 Dec 2019 15:31:50 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8B770F800E8 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A681BB15A; Tue, 24 Dec 2019 14:31:49 +0000 (UTC) Date: Tue, 24 Dec 2019 15:31:48 +0100 Message-ID: From: Takashi Iwai To: Takashi Sakamoto In-Reply-To: <20191224100209.GA28396@workstation> References: <20191223093347.15279-1-o-takashi@sakamocchi.jp> <20191224100209.GA28396@workstation> 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") Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] [PATCH] ALSA: ctl: allow TLV read operation for callback type of element in locked case 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, 24 Dec 2019 11:02:10 +0100, Takashi Sakamoto wrote: > > On Mon, Dec 23, 2019 at 04:03:53PM +0100, Takashi Iwai wrote: > > On Mon, 23 Dec 2019 10:33:47 +0100, > > Takashi Sakamoto wrote: > > > > > > A design of ALSA control core allows applications to execute three > > > operations for TLV feature; read, write and command. Furthermore, it > > > allows driver developers to process the operations by two ways; allocated > > > array or callback function. In the former, read operation is just allowed, > > > thus developers uses the latter when device driver supports variety of > > > models or the target model is expected to dynamically change information > > > stored in TLV container. > > > > > > The core also allows applications to lock any element so that the other > > > applications can't perform write operation to the element for element > > > value and TLV information. When the element is locked, write and command > > > operation for TLV information are prohibited as well as element value. > > > Any read operation should be allowed in the case. > > > > > > At present, when an element has callback function for TLV information, > > > TLV read operation returns EPERM if the element is locked. On the > > > other hand, the read operation is success when an element has allocated > > > array for TLV information. In both cases, read operation is success for > > > element value expectedly. > > > > > > This commit fixes the bug. This change can be backported to v4.14 > > > kernel or later. > > > > The patch looks good but your sign-off is missing... > > Oops, I was in the festive mood... > > Signed-off-by: Takashi Sakamoto > > Besides, let us backport this patch to older kernels? As long as I > investigate, this bug exists since v2.6.19 kernel, in which TLV feature > was firstly introduced and extended[1]. When I worked for refactoring to > control core in v4,14 kernel, the bug remains kept as is[2]. > > It's possible to apply this patch to the longterm v4.14.160 kernel. But > when fixing this bug for the older kernels. we need to prepare an > alternative patch. In my opinion, the disadvantage of the bug is not so > critical, thus it's reasonable to abandon the older kernels. I don't think we need a stable backport. It's no regression, as you pointed, and nothing leading to a serious problem like a crash. So I merged now to for-next branch for 5.6 branch without Cc-to-stable. Also corrected the comment in C style as Jaroslav suggested, too. thanks, Takashi > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?h=8aa9b586e4209 > [2] https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?h=450296f305f13 > > > Regards > > Takashi Sakamoto > _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel