Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp798737pxb; Tue, 12 Apr 2022 13:46:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYHeeEk7hj7xZ4P07bCP4lqqpMT3ZnqdA71xM6EfUFoCRtY04yumGXTrAsuVeNnDIWUwaj X-Received: by 2002:a17:90b:38d2:b0:1c6:fa94:96bb with SMTP id nn18-20020a17090b38d200b001c6fa9496bbmr7034905pjb.206.1649796419687; Tue, 12 Apr 2022 13:46:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649796419; cv=none; d=google.com; s=arc-20160816; b=oQ//NChmhEnfiTfahqU941ie88oFVnKkmrz7iz5yiFzn66rSAD7uo69VBzd3G+Q5NH y5S/88I8xcju/XMZlOiANih9F/J7BTUauQDs/rNaka2t02xRn5xFzJnfzkYWBdXEtonU xq2FRDbn5ILnXLaoJwYR8QjFh4yIgMhS5Dkc8rZx2sljFaKo8lckzK3j8B6zcqfuIRwI JdxrZ2hBwKxAklT43HDqgRlmJqii2u8tmSV3P5fns2MEYp6dRkDGkJnExh+qEJxyxtvg tJGMhI4tqrh96z9bgHop7SMzZ2jEa+UJycbv6c/ts8KG1MRK0muZFNM8F4OznxPDW5Vz +S2Q== 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; bh=T2Rx21k8VxcsRpmbn7I5LQ0UCXULFAyPawiB+5E+i2k=; b=IdedDFr8MpKD/mf6XfTYkNLjDmYBsljyt3VgmuyOPwz4zS6Oh7lug4CntEgknkx45y HYKZrUIs0QKEVvSkq6Kkyc6tMigssGcun/CICffn5kqMK2Yn62LCdUC8HdI+DQ4WATSO o2hhR/TzaRHLmxcIkSltHjEKlWS39MV1hENiOUecx/bLOBJm52HjvgRucHtzA3fRiU5C EJ1MiZv5gGuQcKMjZlYOjKDEFNHxG/HHkdtdPGEaOdBSx2sdb13l7zh4SSrK2gh6h+PZ 2qo8gIphLxOcbtqmZpn+NxMUag4t1OTTZSjio8ysH76HNVFcSYkq9VKYQ14j9uJjUJma 3a6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=DpakoTOJ; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x12-20020a65538c000000b0039d59a0d9a2si3951666pgq.412.2022.04.12.13.46.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 13:46:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=DpakoTOJ; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F88862BC3; Tue, 12 Apr 2022 13:16:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236808AbiDLK3u (ORCPT + 99 others); Tue, 12 Apr 2022 06:29:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380717AbiDLKZk (ORCPT ); Tue, 12 Apr 2022 06:25:40 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9703A52B28 for ; Tue, 12 Apr 2022 02:28:55 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 1ACEA21607; Tue, 12 Apr 2022 09:28:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1649755734; 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=T2Rx21k8VxcsRpmbn7I5LQ0UCXULFAyPawiB+5E+i2k=; b=DpakoTOJZFatp1oV8Xjm5wVfwHPScVHlCSyxWF5vgexTUzQzYV93wSF1w5xJ04Pbw0AoS2 tIM7gQ9ULVoh5T7tTbjnKrIYcJwo7Hjyq4K/99c4KuCZcp+SgorTGDmWoZOT66W0yqsKjl rVRKZL8e5x43nC+bA23PUeOhLEWvPu4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1649755734; 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=T2Rx21k8VxcsRpmbn7I5LQ0UCXULFAyPawiB+5E+i2k=; b=Yua83Tc8tRMQk6PJJ4AjeA//lKRqOKzUPnZfaYGeHdNLIw1d7yBByT0DYcmxnDcCrDvblx BUp1z4TQJTuJi0Dw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 07EFAA3B82; Tue, 12 Apr 2022 09:28:54 +0000 (UTC) Date: Tue, 12 Apr 2022 11:28:54 +0200 Message-ID: From: Takashi Iwai To: Zheyu Ma Cc: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, Linux Kernel Mailing List Subject: Re: [BUG] ALSA: echoaudio: warning when the driver fails to probe In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Apr 2022 03:36:27 +0200, Zheyu Ma wrote: > > On Mon, Apr 11, 2022 at 11:14 PM Takashi Iwai wrote: > > > > On Mon, 11 Apr 2022 12:34:56 +0200, > > Zheyu Ma wrote: > > > > > > On Mon, Apr 11, 2022 at 6:30 PM Takashi Iwai wrote: > > > > > > > > On Mon, 11 Apr 2022 11:15:41 +0200, > > > > Takashi Iwai wrote: > > > > > > > > > > On Mon, 11 Apr 2022 11:06:09 +0200, > > > > > Takashi Iwai wrote: > > > > > > > > > > > > On Mon, 11 Apr 2022 10:49:53 +0200, > > > > > > Zheyu Ma wrote: > > > > > > > > > > > > > > On Mon, Apr 11, 2022 at 3:41 PM Takashi Iwai wrote: > > > > > > > > > > > > > > > > On Sun, 10 Apr 2022 11:13:55 +0200, > > > > > > > > Zheyu Ma wrote: > > > > > > > > > > > > > > > > > > Hello, > > > > > > > > > > > > > > > > > > I found a bug in echoaudio.c. > > > > > > > > > When the driver fails at the function snd_echo_create(), it should > > > > > > > > > release resources requested before, otherwise we will get the > > > > > > > > > following warning: > > > > > > > > > > > > > > > > > > [ 3.262866] remove_proc_entry: removing non-empty directory > > > > > > > > > 'irq/21', leaking at least 'snd_indigodj' > > > > > > > > > [ 3.263577] WARNING: CPU: 3 PID: 261 at fs/proc/generic.c:717 > > > > > > > > > remove_proc_entry+0x389/0x3f0 > > > > > > > > > [ 3.267098] RIP: 0010:remove_proc_entry+0x389/0x3f0 > > > > > > > > > [ 3.269976] Call Trace: > > > > > > > > > [ 3.269979] > > > > > > > > > [ 3.269988] unregister_irq_proc+0x14c/0x170 > > > > > > > > > [ 3.269997] irq_free_descs+0x94/0xe0 > > > > > > > > > [ 3.270004] mp_unmap_irq+0xb6/0x100 > > > > > > > > > [ 3.270011] acpi_unregister_gsi_ioapic+0x27/0x40 > > > > > > > > > [ 3.270017] acpi_pci_irq_disable+0x1d3/0x320 > > > > > > > > > [ 3.270025] pci_disable_device+0x1ad/0x380 > > > > > > > > > [ 3.270034] pcim_release+0x566/0x6d0 > > > > > > > > > [ 3.270046] devres_release_all+0x1f1/0x2c0 > > > > > > > > > [ 3.270057] really_probe+0xe0/0x920 > > > > > > > > > > > > > > > > Could you try the patch below? > > > > > > > > > > > > > > The following patch works for me, the previous warning disappears, thank you. > > > > > > > But I got another error, I have no idea about it. > > > > > > > > > > > > OK, that's bad, it's basically the destructor order problem. > > > > > > Could you try the patch below instead of the previous one? > > > > > > > > > > Sorry, the below one instead. > > > > > > > > Err, scratch this one, too. It's a deeper problem than I thought. > > > > Will post a revised patch later. > > > > > > Yeah, you are right, these two patches do not work, I got the same > > > error message. > > > Thanks for your effort. > > > > Here we go, a revised patch. Basically it enforces the call of > > snd_card_free() at the error path during probe. > > Thanks for your patch, it works for me :) > > Tested-by: Zheyu Ma Great, I'm going to submit a proper patch set. Thanks! Takashi