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 531AEC43334 for ; Sat, 9 Jul 2022 16:48:42 +0000 (UTC) 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 C42DD1E8; Sat, 9 Jul 2022 18:47:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C42DD1E8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657385320; bh=unFvUyKuSogPZ1rvtHzcsrPQdtSBvPY2oNU1hFgXCHo=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MMWGE7Z685KjmVBjk4SAU7DR6S33/PSnQHd7/BuGqsTaathoARVWujuOY/IJ0lA+p 9jGfJYiTvOEVpuu5EVbLz+SyEqHejQXjixvWxfMwvCmsf8wDQh0+0cYL8qP35nUHam juyOprCaPco3WgUgqsDEpBClI1CF5i2yjlXs2G7s= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1A0DAF8027B; Sat, 9 Jul 2022 18:47:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9B4AAF8027B; Sat, 9 Jul 2022 18:47:48 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 77B22F80166 for ; Sat, 9 Jul 2022 18:47:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 77B22F80166 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ZyPdQejZ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="jrpEnNL4" 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 1F2B521F3D; Sat, 9 Jul 2022 16:47:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1657385262; 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=yaVPh/0/mNpP3XnCEYbIpgPBzkPKj8Bce7MjBpYrrtc=; b=ZyPdQejZoo2/o4pOhqeIPyEMSvZ7ihvYkjoeZHvKrZFD2G7gwBFza8xDJSpqErESB5YR8r xSlI67+szj1LQK0N2GB5llsK2ffGgsuO+KdhCRPwWLo+j/wZ51bKKfg/j76z8HQP2+mnq6 MpwayTBtBfb272nZROo+Y4oDfKew5vk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1657385262; 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=yaVPh/0/mNpP3XnCEYbIpgPBzkPKj8Bce7MjBpYrrtc=; b=jrpEnNL4PJ5d98f4XiKkyJ0mu84UizSbp7z06idBFkY5ArjWM0QQO7hi/mCuSnsitoJ525 eIiRgg7RM+feErDg== 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 E12BB13482; Sat, 9 Jul 2022 16:47:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4e8YNi2xyWJ+aQAAMHmgww (envelope-from ); Sat, 09 Jul 2022 16:47:41 +0000 Date: Sat, 09 Jul 2022 18:47:41 +0200 Message-ID: <875yk6i66q.wl-tiwai@suse.de> From: Takashi Iwai To: Cezary Rojewski Subject: Re: [PATCH 5/9] ALSA: hda: Skip event processing for unregistered codecs In-Reply-To: <20220706120230.427296-6-cezary.rojewski@intel.com> References: <20220706120230.427296-1-cezary.rojewski@intel.com> <20220706120230.427296-6-cezary.rojewski@intel.com> 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 Cc: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, tiwai@suse.com, hdegoede@redhat.com, broonie@kernel.org, amadeuszx.slawinski@linux.intel.com 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, 06 Jul 2022 14:02:26 +0200, Cezary Rojewski wrote: > > When codec is unbound but not yet removed, in the eyes of > snd_hdac_bus_process_unsol_events() it is still a valid target to > delegate work to. Such behaviour may lead to use-after-free errors. > Address by verifying if codec is actually registered. > > Signed-off-by: Cezary Rojewski > --- > include/sound/hda_codec.h | 1 - > include/sound/hdaudio.h | 1 + > sound/hda/hdac_bus.c | 2 +- > sound/pci/hda/hda_codec.c | 10 +++++----- > sound/soc/codecs/hda.c | 4 ++-- This patch doesn't apply cleanly because the change in sound/soc/codecs/hda.c still not included in my tree. Mark, there's yet one case we need the merge of asoc-next :) thanks, Takashi