mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, patches@lists.linux.dev,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, linux@roeck-us.net, shuah@kernel.org,
	patches@kernelci.org, lkft-triage@lists.linaro.org,
	jonathanh@nvidia.com, f.fainelli@gmail.com,
	sudipm.mukherjee@gmail.com, rwarsow@gmx.de, conor@kernel.org,
	hargar@microsoft.com, broonie@kernel.org, achill@achill.org,
	sr@sladewatkins.com
Subject: Re: [PATCH 6.12 000/185] 6.12.59-rc1 review
Date: Wed, 26 Nov 2025 11:01:19 +0100	[thread overview]
Message-ID: <aSbP77sRVyWjXxWC@duo.ucw.cz> (raw)
In-Reply-To: <87ecpmp69f.wl-tiwai@suse.de>

[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]

Hi!

> > > Takashi Iwai <tiwai@suse.de>
> > >     ALSA: usb-audio: Fix potential overflow of PCM transfer buffer
> > 
> > This one is wrong for at least 6.12 and older.
> > 
> > +       if (ep->packsize[1] > ep->maxpacksize) {
> > +               usb_audio_dbg(chip, "Too small maxpacksize %u for rate %u / pps %u\n",
> > +                             ep->maxpacksize, ep->cur_rate, ep->pps);
> > +               return -EINVAL;
> > +       }
> >  
> > Needs to be err = -EINVAL; goto unlock;.
> > 
> > (Or cherry pick guard() handling from newer kernels).
> 
> Thanks Pavel, a good catch!
> 
> A cherry-pick of the commit efea7a57370b for converting to guard()
> doesn't seem to be cleanly applicable on 6.12.y, unfortunately.
> So I guess it'd be easier to have a correction on the top instead,
> something like below.

Yes, works for me, thanks for handling this.

> -- 8< --
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH v6.12.y] ALSA: usb-audio: Fix missing unlock at error path of
>  maxpacksize check
> 
> The recent backport of the upstream commit 05a1fc5efdd8 ("ALSA:
> usb-audio: Fix potential overflow of PCM transfer buffer") on the
> older stable kernels like 6.12.y was broken since it doesn't consider
> the mutex unlock, where the upstream code manages with guard().
> In the older code, we still need an explicit unlock.
> 
> This is a fix that corrects the error path, applied only on old stable
> trees.
> 
> Reported-by: Pavel Machek <pavel@denx.de>
> Closes: https://lore.kernel.org/aSWtH0AZH5+aeb+a@duo.ucw.cz
> Fixes: 98e9d5e33bda ("ALSA: usb-audio: Fix potential overflow of PCM transfer buffer")
> Signed-off-by: Takashi Iwai <tiwai@suse.de>

Reviewed-by: Pavel Machek <pavel@denx.de>

Best regards,
								Pavel
-- 
In cooperation with DENX Software Engineering GmbH, HRB 165235 Munich,
Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2025-11-26 10:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21 13:10 Greg Kroah-Hartman
2025-11-21 13:13 ` [PATCH 6.12 172/185] io_uring/napi: fix io_napi_entry RCU accesses Greg Kroah-Hartman
2025-11-21 13:46 ` [PATCH 6.12 000/185] 6.12.59-rc1 review Pavel Machek
2025-11-21 16:28 ` Jon Hunter
2025-11-21 17:05 ` Brett Mastbergen
2025-11-21 18:22 ` Florian Fainelli
2025-11-22  4:46 ` Naresh Kamboju
2025-11-22  6:47   ` Greg Kroah-Hartman
2025-11-22  5:53 ` Brett A C Sheffield
2025-11-22  8:51 ` Pavel Machek
2025-11-22  9:05 ` Peter Schneider
2025-11-22 10:54 ` Jeffrin Thalakkottoor
2025-11-22 11:09 ` Ron Economos
2025-11-22 23:37 ` Miguel Ojeda
2025-11-23 11:53 ` Mark Brown
2025-11-25 13:20 ` Pavel Machek
2025-11-25 13:54   ` Takashi Iwai
2025-11-26 10:01     ` Pavel Machek [this message]
2025-11-26 10:06       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aSbP77sRVyWjXxWC@duo.ucw.cz \
    --to=pavel@denx.de \
    --cc=achill@achill.org \
    --cc=akpm@linux-foundation.org \
    --cc=broonie@kernel.org \
    --cc=conor@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hargar@microsoft.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lkft-triage@lists.linaro.org \
    --cc=patches@kernelci.org \
    --cc=patches@lists.linux.dev \
    --cc=rwarsow@gmx.de \
    --cc=shuah@kernel.org \
    --cc=sr@sladewatkins.com \
    --cc=stable@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=tiwai@suse.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®