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 0C829C43334 for ; Sat, 9 Jul 2022 16:35:38 +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 C339F1E2; Sat, 9 Jul 2022 18:34:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C339F1E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1657384536; bh=PVqwhV5hiiVc8yM307KfqQihYYXdx+FxLHjkAOfjWTo=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=gNNOWCxv+PKzv6QCyo+ESwaSgmzA8aaUXx0acf4ju45WUVpDZIkYSkL1X1ZFvT1XY 3AzFS12y2DyP5o4lPW+XANw0igs2iEZPmkl6kky9r6XZK2vBMzpRZCpjgtmNc0OduB wQtUBA3qpvyDm6WfdbGKXa9aU+ywRT21JgX0pJQw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6348AF8020D; Sat, 9 Jul 2022 18:34:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 16D84F80245; Sat, 9 Jul 2022 18:34:44 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 D035AF80100 for ; Sat, 9 Jul 2022 18:34:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D035AF80100 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="X9EwcqaK"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="FilyFBXB" 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 6D1181FB3F; Sat, 9 Jul 2022 16:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1657384477; 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=aRjDNrZNDcmj+djZhqPLelHLQyOLul7eUpKWcpMen8M=; b=X9EwcqaKsDbq1L5gPv7kNnZ3KleWvwmWsHstXwHzouZ/mg5oeg7GyopzwghL5P51JhNTZT z0owj+iQlnF+Hm+2r7PHLuL2eAhzzwbeEztwiOmWC7t84JqYiLyekhd41wG91ITPP0Fhy7 jpUlQP0ONNVZewTnLwiiOqnM/7tPrJI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1657384477; 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=aRjDNrZNDcmj+djZhqPLelHLQyOLul7eUpKWcpMen8M=; b=FilyFBXB06KlpegDMr21Og6bYWFUjPdp9evQ+CTOISl5/wWLsbCnI4qfZb8jpmy5qHTqsj GnF71Ty1nV3darAQ== 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 413E613482; Sat, 9 Jul 2022 16:34:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 9XbMDh2uyWKcZQAAMHmgww (envelope-from ); Sat, 09 Jul 2022 16:34:37 +0000 Date: Sat, 09 Jul 2022 18:34:36 +0200 Message-ID: <878rp2i6sj.wl-tiwai@suse.de> From: Takashi Iwai To: Cezary Rojewski Subject: Re: [PATCH 1/9] ALSA: hda: Do not unset preset when cleaning up codec In-Reply-To: <20220706120230.427296-2-cezary.rojewski@intel.com> References: <20220706120230.427296-1-cezary.rojewski@intel.com> <20220706120230.427296-2-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:22 +0200, Cezary Rojewski wrote: > > snd_hda_codec_cleanup_for_unbind() unsets preset what interferes with > module unloading and triggers null-ptr-deref. Preset is assigned only > once, during device/driver matching whereas module reload and unload > follow completely different path and may occur several times during > runtime. Hm, the driver reload/unload does unbind. Keeping this field mean to leave the pointer to the possibly freed object, no? And if it's not cleared, where is this field cleared instead? thanks, Takashi