[BUG] ALSA: echoaudio: warning when the driver fails to probe

Takashi Iwai tiwai at suse.de
Tue Apr 12 11:28:54 CEST 2022


On Tue, 12 Apr 2022 03:36:27 +0200,
Zheyu Ma wrote:
> 
> On Mon, Apr 11, 2022 at 11:14 PM Takashi Iwai <tiwai at suse.de> wrote:
> >
> > On Mon, 11 Apr 2022 12:34:56 +0200,
> > Zheyu Ma wrote:
> > >
> > > On Mon, Apr 11, 2022 at 6:30 PM Takashi Iwai <tiwai at suse.de> 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 <tiwai at suse.de> 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]  <TASK>
> > > > > > > > > [    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 <zheyuma97 at gmail.com>

Great, I'm going to submit a proper patch set.


Thanks!

Takashi


More information about the Alsa-devel mailing list