lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <878rmvmshe.wl-tiwai@suse.de>
Date:   Wed, 07 Sep 2022 11:41:33 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     alsa-devel@...a-project.org, LKML <linux-kernel@...r.kernel.org>,
        stable <stable@...r.kernel.org>,
        Niklāvs Koļesņikovs 
        <89q1r14hd@...ay.firefox.com>, Wim Taymans <wtaymans@...hat.com>
Subject: Re: [PATCH] ALSA: usb-audio: Don't refcount multiple accesses on the single clock

On Wed, 07 Sep 2022 11:28:54 +0200,
Jason A. Donenfeld wrote:
> 
> On Wed, Sep 07, 2022 at 10:00:46AM +0200, Takashi Iwai wrote:
> > On Mon, 05 Sep 2022 14:16:39 +0200,
> > Jason A. Donenfeld wrote:
> > > 
> > > On Mon, Sep 5, 2022 at 1:44 PM Takashi Iwai <tiwai@...e.de> wrote:
> > > > When you load snd-usb-audio with dyndbg=+p option, does it show the
> > > > new error message "Mismatched sample rate xxx"?
> > > 
> > > No.
> > 
> > What about the patch below?
> > 
> > 
> > Takashi
> > 
> > -- 8< --
> > --- a/sound/usb/endpoint.c
> > +++ b/sound/usb/endpoint.c
> > @@ -925,6 +925,8 @@ void snd_usb_endpoint_close(struct snd_usb_audio *chip,
> >  		endpoint_set_interface(chip, ep, false);
> >  
> >  	if (!--ep->opened) {
> > +		if (ep->clock_ref && !atomic_read(&ep->clock_ref->locked))
> > +			ep->clock_ref->rate = 0;
> >  		ep->iface = 0;
> >  		ep->altsetting = 0;
> >  		ep->cur_audiofmt = NULL;
> 
> I think this works.

OK, thanks.

If this patch fixes, the problem is that the behavior of the
applications that do only PCM prepare without actually starting, then
closes.  This left the last set rate unexpectedly.

I'm going to write up the proper patch.


Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ