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 0A546C433EF for ; Fri, 15 Jul 2022 14:28:41 +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 9BBC618DC; Fri, 15 Jul 2022 16:27:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9BBC618DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657895319; bh=algSNYKP2SYrRFUoH25KLuvTVRoxEO6wv6fGn/Q5KBw=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OhLnD//XKWraTwx1POa7KqlyCCM+pflfoNgTtOhaUF98+X0fQCbO7KYr58kb5QM/7 kzG1+CdFda5sM0BTDSCGkX8rp3IvIgS3qtbKQdlXevwpipb+0Sof3xco+BrZXOg1ET sA+F0JJ0TH+LGLpzIyOrdL5NQB9gADMkun72guFA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 42D29F8014E; Fri, 15 Jul 2022 16:27:49 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8DB65F8015B; Fri, 15 Jul 2022 16:27:47 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (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 929DFF800AA for ; Fri, 15 Jul 2022 16:27:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 929DFF800AA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ozW3SM48"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="hTJiQqEA" 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-out2.suse.de (Postfix) with ESMTPS id C14311FF04; Fri, 15 Jul 2022 14:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1657895260; 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=MmQfwldfO+ooPPgxjGXWNGGu2eUiwTnaJJJxJpiDQmU=; b=ozW3SM48gyDe+mQnztKhRV1EWGSomx+piF702oBi5Vwzpc9cbo0YpY8nJ7TMQAWq2MFZ5l dH+YcvLxLXVs3q8ACHXiFio/HXT4SnnY7eTshWEm3l+mu8nElcbVK2+Qd0UMT72prCXQxK zniob95sdSHi7ORYTBx20TiBB7BPS8s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1657895260; 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=MmQfwldfO+ooPPgxjGXWNGGu2eUiwTnaJJJxJpiDQmU=; b=hTJiQqEAxXgSqqJ644GiT7Fx/kke1ifT9ByQyPAAQF7OzYssLdiCg3TLFKtocVe/kMBP6E DH6V02MGyJBV6CCw== 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 90E3613754; Fri, 15 Jul 2022 14:27:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id YRyfIlx50WJpQgAAMHmgww (envelope-from ); Fri, 15 Jul 2022 14:27:40 +0000 Date: Fri, 15 Jul 2022 16:27:39 +0200 Message-ID: <87ilnyv4bo.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: <875yk6i66q.wl-tiwai@suse.de> References: <20220706120230.427296-1-cezary.rojewski@intel.com> <20220706120230.427296-6-cezary.rojewski@intel.com> <875yk6i66q.wl-tiwai@suse.de> 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 Sat, 09 Jul 2022 18:47:41 +0200, Takashi Iwai wrote: > > 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. Now merged to for-next branch. thanks, Takashi