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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 819ADC71133 for ; Fri, 25 Aug 2023 11:17:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4D875845; Fri, 25 Aug 2023 13:16:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4D875845 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1692962218; bh=nGtUmHrN77N/LIlM2CI+f/dUbGWX0VQQD98XNzRKepo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=DSajDsM7hD2YbVVmK4Te1tw3Tmd7F5NYSr0HfsY3rRDAhVIM1srhGFmjbBlV7JMNg v4QyZefxDFsi3uCz3mtmH2yLq5QwqxPgGzVa9bZALxZgc0ENInwvJKTEY1XD4Ftosb ByqBgpIz6rKTyVbjt3TQV65Ki/wNVKpc6ucO0NOU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5BD78F80074; Fri, 25 Aug 2023 13:16:07 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E7F5CF80074; Fri, 25 Aug 2023 13:16:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BC0D5F800F5; Fri, 25 Aug 2023 13:16:02 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5F4F1F80074 for ; Fri, 25 Aug 2023 13:15:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5F4F1F80074 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=FTgxpdth; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=5sLtMLA6 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 41D952185D; Fri, 25 Aug 2023 11:15:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1692962155; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n6p3PhuRYv46BVk7+xJahfqyK4N6T1xYAvoZ1bNVr4s=; b=FTgxpdthDpAVyVuBxUy59BAKHBY4tI6FZSkklyu6rlzfkVBIO+uUV1CpUCLEgNS2ZjnjoV Mjd2CfTn5oicCSs+YICqxzAJCaUua4q4nuHYdgHTer5yCEUsz682qJgdUUcR7bKDOlieSE 8Aj4aB3Gswttw9ZFdUjM5HfveQBpzxc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1692962155; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n6p3PhuRYv46BVk7+xJahfqyK4N6T1xYAvoZ1bNVr4s=; b=5sLtMLA6H3XPzERIb6qBMo2TmHu5swDFgfutDyd9t3OHAq5nUXSLHO0Tvyu5p4fRLhq6jL rVCY+nDCUDA+GRCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 26EC9138F9; Fri, 25 Aug 2023 11:15:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wnGuCGuN6GS4NgAAMHmgww (envelope-from ); Fri, 25 Aug 2023 11:15:55 +0000 Date: Fri, 25 Aug 2023 13:15:54 +0200 Message-ID: <87il9374ph.wl-tiwai@suse.de> From: Takashi Iwai To: cujomalainey@chromium.org Cc: alsa-devel@alsa-project.org Subject: Re: [PATCH 0/2][RFC] Refactor snd primitives refcounters In-Reply-To: <20230824210339.1126993-1-cujomalainey@chromium.org> References: <20230824210339.1126993-1-cujomalainey@chromium.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Message-ID-Hash: XQYEDA5DX5JZHIB2BGLLWXW7POC4VSVK X-Message-ID-Hash: XQYEDA5DX5JZHIB2BGLLWXW7POC4VSVK X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 24 Aug 2023 23:02:51 +0200, cujomalainey@chromium.org wrote: > > From: Curtis Malainey > > As previously identified in [1] there are some issues with how kobjs are > handled in sound/core. The solution provided in [2] is a workaround for > the issues to fix the failures. > > This series is a first attempt at the larger refactor needed to properly > handle the objects. > > [1] https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/message/3B2VMPFATCJCRD76DM36LZAICPDP2R6A/ > [2] https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/message/JZIPB4OIC3OK6YAGTPMAEKXMLUWM5PTA/ > > Curtis Malainey (2): > ALSA: core: add snd_device_init > ALSA: core: split control primitives out of snd_card Thanks for the patches. But, as the 6.6 merge window open is pretty close, I'd postpone those unless it's urgently needed. Also, before moving the resource tied with the device object, we'll need a refcount to the ctl dev from pcm dev, as PCM does release chmap at its free path (calling free_chmap()). Otherwise it'll lead to another UAF, if both objects releases are done asynchronously without dependency. BTW, the cover letter and the subject prefix of the patches don't match, and also the cover letter didn't include Cc. Please try to make both cover letter and patches sent properly. thanks, Takashi