From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796111775; b=qzZxBm6wZWHkDG6G6fRp5rEgYuQ/s9LTlguZC0v/MWh4TdyGMs9u6lInzcuFSavjVFaO cqrhy3TUB6cEDlGoByBJmMqthlyHUmmJQUR3wMWR6b/dpOoNY/2ZH3K+vPNObR6K+Nk2t U4QTNdKV7uawUSa5vKilO1q9GQTfBEWj9y6ksdSQhmOZb5P7QfjhbjR7z19d7qxFX4n6F Qle2NQKL/Bt8BVc/4IoB1pHUsej8C/kE8JmfIDmMHb4U20PZDB14qCl1p9WPok2iugRB2 DnX7WWqnI7ZU82z3YDHFkI/bTfTyB9WBMKBWklSCiSfLtLijxl3QpmlJ9pwWjwyJwhQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796111775; h=DMARC-Filter:Received:DKIM-Signature:DKIM-Signature:DKIM-Signature: DKIM-Signature:Received:Received:Date:Message-ID:From:To:Cc:Subject: In-Reply-To:References:User-Agent:MIME-Version:Content-Type: X-Spam-Flag:X-Spam-Level:X-Spamd-Result:X-Spam-Score; bh=zLE/5wjOCuUcHrc6UsuCUBeuNna1B/GRGFKoHGzz620=; b=Ywbry9eb57cPjj9OaXNB9rdBJ34RHANdvcFzCP+VAvfaj3TqdvovHUceecKjr8zZRkhF 0kC2NVVghHrUAq+vDoaJrDSq1mCX2CWZ0aI7tVJCgGjO+5wCLW2VeL8IQvijBwYppvqgU 0h3I2k3iv1sGrioL382SWnJrnw32vZHlWcJyQ80OG0duaok0KHgTptNHUXEzQViEaWwj2 tANSGlkhorVodpGx34sf5m8nxNh/VG8J5t8VFAyBS2iuS9cRjeRfB4PFvKHTm3yP1ntn6 IBfuImsPqkB7EBklSJ38oAG20Ok1A7ImWuIMncpFqrVGS0ar8Z78bWkEVaGBaIEVaow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=MRL7BMQM; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=UxbBD+9n; dkim=pass header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=MRL7BMQM; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=UxbBD+9n; arc=none smtp.remote-ip=195.135.223.130 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 695D4606A31A; Tue, 1 Dec 2026 07:56:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 695D4606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=MRL7BMQM; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=UxbBD+9n; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=MRL7BMQM; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=UxbBD+9n Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (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 smtp-out1.suse.de (Postfix) with ESMTPS id 7FDBE2239F; Tue, 1 Dec 2026 07:56:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1796111772; 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=zLE/5wjOCuUcHrc6UsuCUBeuNna1B/GRGFKoHGzz620=; b=MRL7BMQM2LPSBjyYbxzwwW+QHjxCclSwtnLpMNGtYAQwwJNEb4iLqlE+eKc9dtFeMyCGWA tV2FDJ9kGfEOb9fylkwJ7A57vLLaeuzk7rc4I/L9JNEmVi4bYSEumq6b1H9xebsaI0wCfx rE5yl7hGxRPNtnftFUuo40Qr0ToHrYc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1796111772; 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=zLE/5wjOCuUcHrc6UsuCUBeuNna1B/GRGFKoHGzz620=; b=UxbBD+9njPwZ7DTkZS3Y9eWDlVIc7lZsg3eRWffMq6ny2goU2qUTX4f+cJ5s3Lifr0rRp9 ho34f9ULNTEfd2CA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1796111772; 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=zLE/5wjOCuUcHrc6UsuCUBeuNna1B/GRGFKoHGzz620=; b=MRL7BMQM2LPSBjyYbxzwwW+QHjxCclSwtnLpMNGtYAQwwJNEb4iLqlE+eKc9dtFeMyCGWA tV2FDJ9kGfEOb9fylkwJ7A57vLLaeuzk7rc4I/L9JNEmVi4bYSEumq6b1H9xebsaI0wCfx rE5yl7hGxRPNtnftFUuo40Qr0ToHrYc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1796111772; 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=zLE/5wjOCuUcHrc6UsuCUBeuNna1B/GRGFKoHGzz620=; b=UxbBD+9njPwZ7DTkZS3Y9eWDlVIc7lZsg3eRWffMq6ny2goU2qUTX4f+cJ5s3Lifr0rRp9 ho34f9ULNTEfd2CA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2A138134E9; Tue, 1 Dec 2026 07:56:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id B7PGAJx9DmtWMQAAD6G6ig (envelope-from ); Tue, 01 Dec 2026 07:56:12 +0000 Date: Tue, 01 Dec 2026 08:56:11 +0100 Message-ID: <8733sh1lk4.wl-tiwai@suse.de> From: Takashi Iwai To: Sreeraj S Kurup Cc: johannes@sipsolutions.net, perex@perex.cz, tiwai@suse.de, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v2] ALSA: aoa: Fix codec unregister handling In-Reply-To: <20261128085235.2984-1-sreekuttan2156239@gmail.com> References: <20261128081025.2878-1-sreekuttan2156239@gmail.com> <20261128085235.2984-1-sreekuttan2156239@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/30.2 Mule/6.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Flag: NO X-Spam-Level: X-Spamd-Result: default: False [-12.30 / 50.00]; SUSE_INTERNAL_BYPASS(-9.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_TO(0.00)[gmail.com]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_SEVEN(0.00)[7]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo] X-Spam-Score: -12.30 On Sat, 28 Nov 2026 09:52:35 +0100, Sreeraj S Kurup wrote: > > Fix aoa_codec_unregister() to use the codec's own fabric pointer > when removing a codec. > > Previously, the function checked the global fabric pointer instead > of codec->fabric. This could call the fabric's remove_codec() > callback for a codec that was never attached to the fabric. > > The function also called module_put() unconditionally, even when > attach_codec_to_fabric() had not acquired a module reference. > This could cause an incorrect module reference count. > > Use aoa_fabric_unlink_codec() to detach an attached codec. This > helper calls exit(), remove_codec(), and module_put() and clears > codec->fabric. These operations are now performed only when the > codec is actually attached to a fabric. > > This also prevents releasing the module reference a second time > when codec initialization fails and the attach path has already > cleaned up. > > Fixes: f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa") > Signed-off-by: Sreeraj S Kurup Applied to for-next branch. Thanks. Takashi