From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="EHaSAi6v"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="lLZu/D9a"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="E+ch+QtL"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Ig9Ehg1k" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4FBF106; Sun, 10 Dec 2023 01:06:29 -0800 (PST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [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 F1E7821CAD; Sun, 10 Dec 2023 09:06:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702199188; 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=auUupgAjZ8IXUgoHrCzFJV3FieXQ2tOxGY/y2JKnUJM=; b=EHaSAi6vqN79BtcMYy2DsZehJiFc2Skr+Aul5ISOulZpfbc+Jm1hlTnP2f5IZn4kQJ8tmG DdRHskIhEDXrv2Y/dyqUvpz3Wrq1Epx/tRpxZaSw8MLFj61MvdAJMpUdLu9slUI6toKWSM 6Am8OX+S8xL/kZ3Rwmi+BNISnBAiPhY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702199188; 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=auUupgAjZ8IXUgoHrCzFJV3FieXQ2tOxGY/y2JKnUJM=; b=lLZu/D9ajZLkUd7nY1MZJmEKvo50YX0Iyk4pqhLqrjtldSdY2Qa/1kJRXrRlBjZEC9fURZ ON6lswGFNHqKESAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702199187; 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=auUupgAjZ8IXUgoHrCzFJV3FieXQ2tOxGY/y2JKnUJM=; b=E+ch+QtLS4RZ3jXqqSKJrESOnmXactI0IAmr1U8zN40eiZoZSTLIKa8RIkgd9aEMI1RNKU r+0qglLWvnoSWKZvF2F/9QhrsUEStNs/mq8YXB6chel13nvwkaQ9ScPhpJyKmLsK87HR37 rF+49DUjHlu5WMdoi7HfjUuuzysGjEM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702199187; 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=auUupgAjZ8IXUgoHrCzFJV3FieXQ2tOxGY/y2JKnUJM=; b=Ig9Ehg1k29XfvFVyMbPNAK6Lazk0rd4Z8KRututqyJavGub8Y3kcPVnCqshChyRb8jgEyo zPqtI0mDDr6BVXCQ== 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 ADF3A137D2; Sun, 10 Dec 2023 09:06:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id k/4cKZN/dWUVVQAAD6G6ig (envelope-from ); Sun, 10 Dec 2023 09:06:27 +0000 Date: Sun, 10 Dec 2023 10:06:27 +0100 Message-ID: <87fs0a5svg.wl-tiwai@suse.de> From: Takashi Iwai To: Gergo Koteles Cc: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, stable@vger.kernel.org Subject: Re: [PATCH v3] ALSA: hda/tas2781: leave hda_component in usable state In-Reply-To: <8b8ed2bd5f75fbb32e354a3226c2f966fa85b46b.1702156522.git.soyer@irl.hu> References: <8b8ed2bd5f75fbb32e354a3226c2f966fa85b46b.1702156522.git.soyer@irl.hu> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Level: X-Spam-Score: -0.03 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -0.02 X-Spamd-Result: default: False [-0.02 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.94)[-0.941]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(2.99)[0.998]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_SEVEN(0.00)[9]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.98)[99.90%] X-Spam-Flag: NO On Sat, 09 Dec 2023 22:18:29 +0100, Gergo Koteles wrote: > > Unloading then loading the module causes a NULL ponter dereference. > > The hda_unbind zeroes the hda_component, later the hda_bind tries > to dereference the codec field. > > The hda_component is only initialized once by tas2781_generic_fixup. > > Set only previously modified fields to NULL. > > BUG: kernel NULL pointer dereference, address: 0000000000000322 > Call Trace: > > ? __die+0x23/0x70 > ? page_fault_oops+0x171/0x4e0 > ? exc_page_fault+0x7f/0x180 > ? asm_exc_page_fault+0x26/0x30 > ? tas2781_hda_bind+0x59/0x140 [snd_hda_scodec_tas2781_i2c] > component_bind_all+0xf3/0x240 > try_to_bring_up_aggregate_device+0x1c3/0x270 > __component_add+0xbc/0x1a0 > tas2781_hda_i2c_probe+0x289/0x3a0 [snd_hda_scodec_tas2781_i2c] > i2c_device_probe+0x136/0x2e0 > > Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") > CC: stable@vger.kernel.org > Signed-off-by: Gergo Koteles Thanks, applied now. Takashi