Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5902229rdb; Thu, 14 Dec 2023 03:04:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IECucThNJ9Lk9FS9AaofYsJ5HuqNS8cK9fUK5/cQgzdINAbR46sfm2geHIY1UwM/2HsZOmF X-Received: by 2002:a05:6e02:198a:b0:35f:7212:a059 with SMTP id g10-20020a056e02198a00b0035f7212a059mr2832644ilf.94.1702551868463; Thu, 14 Dec 2023 03:04:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702551868; cv=none; d=google.com; s=arc-20160816; b=KBXoA/fE6nOJdYg6vU2Kfc7D/PnKpqNJZW6ngzh2Z6H9W+G2ekEky3LMD6mwoq3GZv 2euSP0OmXF2AaN4AHvAJxotYzfUvMzzlD9Exl9tOOW3IYtzb9yz5+EGh8aVTTgfML7Qd ZXbn8h6hmiymp0aKy/yITpwBMzgcz+d7sEsqtsuMInCdEmLGt56BAyjXsOCKmHT3jWbu Pk9qOEo6YYnKS8Ifi1WrSjTEmXtpNBrTMuYgr5NphKCpE+k76F759Z2xAumh1oUZDpjE ypcRe7Lg65F6EONlNZ1a2h8IAHM+TCy9HPZCytxYFdUFN8Nxe5D2VCMMAJxIlDyyb05J dIVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=Skljw5BSFfgpdqQOUDwAU/GCeFOgAjR5XeHFC81qJ/A=; fh=BKtipKovsCGcWnDysz6K+aSHDcfhPOHqPEDNW3phKx8=; b=1AGP0lHkWqY8lDLVgHSJpwwEHhg3MfnyL//Afvw4fFEg9y1v39+1uSxsmU3O9F9qhN RohNA1wT1wllac6PPL7dEl9u/A2ThxCbENAgi5X81uXiRlEOByGt/n2Rxczy+hH92tCf NIypjyST3l4QNhN6+xThdJUG1/VxiqVSLHY6SsorPUk4OTK1TOJbaaTBSQcoLn3E9kmU 7ZdsA50Ui3v/Y7AczIvRv0IKSxjsadS/YyuC3aSk9+4ji2rbC5zl5iV+YsYRn8Ildx9F n9BLFznBq22Yh9HI4/Bv6CXFlly9oxmyzoCl/0yd9FXMXeWA0Wo1EzzUj9wrtyGVd5UU AgEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vQkTMrY5; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vQkTMrY5; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id o2-20020a655202000000b005b8eaeabf49si11325388pgp.178.2023.12.14.03.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:04:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vQkTMrY5; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vQkTMrY5; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 7E58E81FEC7D; Thu, 14 Dec 2023 03:04:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443821AbjLNLEJ (ORCPT + 99 others); Thu, 14 Dec 2023 06:04:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443785AbjLNLEI (ORCPT ); Thu, 14 Dec 2023 06:04:08 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC03E11A; Thu, 14 Dec 2023 03:04:14 -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-out2.suse.de (Postfix) with ESMTPS id 3E1E71F7C5; Thu, 14 Dec 2023 11:04:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702551851; 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=Skljw5BSFfgpdqQOUDwAU/GCeFOgAjR5XeHFC81qJ/A=; b=vQkTMrY51vyqlOg2jW5/nLQEPzZYE1f5yCnE4mFBzuluT+Njn+CXslgqe6U70uf9/1tT3P EzkUXzYNjB/at29bS8wHUI++bWErXHEwijxXpk/xZP6DJByPieFXU9oTkZniEuAkDx/fzA 8nZ0f7FozdBeDA5GIhbh+nRyftoUpFc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702551851; 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=Skljw5BSFfgpdqQOUDwAU/GCeFOgAjR5XeHFC81qJ/A=; b=3bzta1/DtvaaOVt6hYd6neZPDuvXk7u9Vqc6CdtOsl03namm2nc4Pk9CipUVASKQOrKvGa TxZ2knK6DoJRBpAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702551851; 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=Skljw5BSFfgpdqQOUDwAU/GCeFOgAjR5XeHFC81qJ/A=; b=vQkTMrY51vyqlOg2jW5/nLQEPzZYE1f5yCnE4mFBzuluT+Njn+CXslgqe6U70uf9/1tT3P EzkUXzYNjB/at29bS8wHUI++bWErXHEwijxXpk/xZP6DJByPieFXU9oTkZniEuAkDx/fzA 8nZ0f7FozdBeDA5GIhbh+nRyftoUpFc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702551851; 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=Skljw5BSFfgpdqQOUDwAU/GCeFOgAjR5XeHFC81qJ/A=; b=3bzta1/DtvaaOVt6hYd6neZPDuvXk7u9Vqc6CdtOsl03namm2nc4Pk9CipUVASKQOrKvGa TxZ2knK6DoJRBpAQ== 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 DEF27137E8; Thu, 14 Dec 2023 11:04:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id LA0HNSrhemXnZgAAD6G6ig (envelope-from ); Thu, 14 Dec 2023 11:04:10 +0000 Date: Thu, 14 Dec 2023 12:04:10 +0100 Message-ID: <87edfpqc45.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 v2] ALSA: hda/tas2781: call cleanup functions only once In-Reply-To: <1a0885c424bb21172702d254655882b59ef6477a.1702510018.git.soyer@irl.hu> References: <1a0885c424bb21172702d254655882b59ef6477a.1702510018.git.soyer@irl.hu> 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 X-Spam-Score: 0.87 X-Spam-Level: X-Spam-Score: 0.84 X-Spam-Level: Authentication-Results: smtp-out2.suse.de; none X-Spamd-Result: default: False [0.84 / 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)[]; MIME_GOOD(-0.10)[text/plain]; 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(-0.06)[60.79%] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 14 Dec 2023 03:04:25 -0800 (PST) On Thu, 14 Dec 2023 00:28:16 +0100, Gergo Koteles wrote: > > If the module can load the RCA but not the firmware binary, it will call > the cleanup functions. Then unloading the module causes general > protection fault due to double free. > > Do not call the cleanup functions in tasdev_fw_ready. > > general protection fault, probably for non-canonical address > 0x6f2b8a2bff4c8fec: 0000 [#1] PREEMPT SMP NOPTI > Call Trace: > > ? die_addr+0x36/0x90 > ? exc_general_protection+0x1c5/0x430 > ? asm_exc_general_protection+0x26/0x30 > ? tasdevice_config_info_remove+0x6d/0xd0 [snd_soc_tas2781_fmwlib] > tas2781_hda_unbind+0xaa/0x100 [snd_hda_scodec_tas2781_i2c] > component_unbind+0x2e/0x50 > component_unbind_all+0x92/0xa0 > component_del+0xa8/0x140 > tas2781_hda_remove.isra.0+0x32/0x60 [snd_hda_scodec_tas2781_i2c] > i2c_device_remove+0x26/0xb0 > > Fixes: 5be27f1e3ec9 ("ALSA: hda/tas2781: Add tas2781 HDA driver") > CC: stable@vger.kernel.org > Signed-off-by: Gergo Koteles Thanks, applied. Takashi