Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp28419pxb; Tue, 12 Apr 2022 15:53:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsCNg93HMilQkR0s/qSblySWoLmr8bu2ZiSKgmGOvXl5c9ChxcCug64W61pd78LuA/MBDE X-Received: by 2002:a05:6a00:1747:b0:505:d75c:e0b2 with SMTP id j7-20020a056a00174700b00505d75ce0b2mr8850018pfc.0.1649804006034; Tue, 12 Apr 2022 15:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649804006; cv=none; d=google.com; s=arc-20160816; b=vR5lS4gHmasq+9u9dEJZQNou77493xUzc8EXnawYvYRY2sFrk0LUf0VaSq9SCtH+sn 7Gbeaf0cIL7SxLYCvaICbOJaTYDREy7l2FD1LG0LudnH8NKYSsp2AseB12xGSn6Vmarr tnXQtrYn+F7V9+L9qx14PZN3FlKztQCl0vmzmNxZ4xYuWvewwAS6Vvnfa67+/nX93P8I jupd1EFOV6/302bZq2Cik5j11b3/RVPqN6bxzvmo5oxgCCYytQAAvDDu/DvOv5QCsbXP vmDSlCeCJJC33zCm/OhoLwNeZuRkbAs4UtUfrSVKNzSbGfXESTFlnV/LluDN8q3HRexS 0IcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rFRvD+s5/CV5Fwvh/2Kxb6y/LQ1QtPgz7+1+S1OLjeI=; b=rrGFhRfrs/aQROQq3GRaCS+CKjOrFUk/Y/51yQl+gAeVK05jG7vxvMa2E3KFvrs3XT KUw0B7kQKaqr8WxKmkLjDOSrp+uuvCpiHlSQ7JGwcX7CezrN2HmOnYa2K0PAq9zvNOxk XnI4kW8v655rmvIh8Fd+0GzkDwyq3zLlmaJuE8xK9bgQ7yc2glcY2BnNscUyU80cSGuM Bby2Rosp8CK7oXjtMgxAl4HKs6nRRDkpzrGgxpeRGvn3i/AjYhFur6oQc1Svm/Y+1xR3 7SrtT/V6Sz/Sqo+XuNyMgWorUmlsmIsmLNaeLhF+lt6CFeOrg7eXPexXwYa4M4DV7nvo 35Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pqKOYr+L; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id qe7-20020a17090b4f8700b001c5ed8fb090si16457924pjb.74.2022.04.12.15.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:53:26 -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=@gmail.com header.s=20210112 header.b=pqKOYr+L; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EC75F1C9B67; Tue, 12 Apr 2022 14:35:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343929AbiDLBi6 (ORCPT + 99 others); Mon, 11 Apr 2022 21:38:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243978AbiDLBiy (ORCPT ); Mon, 11 Apr 2022 21:38:54 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5A462126A for ; Mon, 11 Apr 2022 18:36:38 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id z16so16138862pfh.3 for ; Mon, 11 Apr 2022 18:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rFRvD+s5/CV5Fwvh/2Kxb6y/LQ1QtPgz7+1+S1OLjeI=; b=pqKOYr+LXaLecw0bb3DNqMe5E+IhIVzHNhjtZO1lym0KqdJPOKFntKwBTpuaiBTzQO fDVd8MCm8Y2D/De+jtEFuZjBJRjPTtB1+A0OhThytabGmrgoE3+7ZbQ3gjzAvkL5OiqT kj1+r1xM6lAgXNDoAcyF6S2c8LRJIiw0yHtBRi1rqfv3bxdWIk6NnxGvEvex7fyX90BM mzm1BsKvbOw22Mi4ytOyvzyjDUvvf3T+Rb1CphVJZ74sKzVBt3grHwndcAx5vFCgyqdJ 6iq6UxkE+t27QKQfY4VKpMu0MHtdO/tzlmmv7iEdDhULluaGopxoj1hAUQy+udOxzaDH tZkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rFRvD+s5/CV5Fwvh/2Kxb6y/LQ1QtPgz7+1+S1OLjeI=; b=5cjZeDQeqqk0ecwrJ1JsU5kt/nFyVQR/SAtaj+ZMt0oG8afC5pjiL+WsDD57erC16p augly0Pxvaedv2lkRBqRijegYKc4Pj898eer+ldhio3czjb+gh7Glo5QDcJvhUns87Mt o3ziHnVO9FeiUBZ5baBHHUgOFeuVzlASw16DqSBE7+4IuzHrUGO6Ql1d4s+vQx3sHjzw 2ULUh7R8jVOikfw4pQz5SEWmrrLNVZ6XfJltM8xIdmKfOTDLfR0+EAFhoOV8JJYGaKHB T5cX6svpyfCmFbQmGBDycVuLjGfObq09J3BrtP0Pda17u4s4YVegq9Gq6ZH4lC8OP3VK D96w== X-Gm-Message-State: AOAM533jDq4TURVtasKtfK9Dvhe66EgcEu4YkBeQhkfBF34dZ3WWJMbY 1XQ9y2CrOyXNZlVHy0FiVjei83Ikmj/gle+4sg== X-Received: by 2002:a63:610:0:b0:39d:300c:ad9b with SMTP id 16-20020a630610000000b0039d300cad9bmr9563708pgg.113.1649727398350; Mon, 11 Apr 2022 18:36:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Zheyu Ma Date: Tue, 12 Apr 2022 09:36:27 +0800 Message-ID: Subject: Re: [BUG] ALSA: echoaudio: warning when the driver fails to probe To: Takashi Iwai Cc: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 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 Zheyu Ma