-
Notifications
You must be signed in to change notification settings - Fork 107
[Deepin-Kernel-SIG] [linux 6.6.y] [Upstream] ALSA: usb-audio: Fix missing unlock at error path of maxpacksize check #1466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: linux-6.6.y
Are you sure you want to change the base?
Conversation
stable inclusion from stable-v6.12.60 category: bugfix The recent backport of the upstream commit 05a1fc5 ("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") Reviewed-by: Pavel Machek <pavel@denx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit fdf0dc82eb60091772ecea73cbc5a8fb7562fc45) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideFixes the error path in the USB audio endpoint parameter setup so that the endpoint mutex is properly unlocked before returning when maxpacksize is too small, mirroring upstream behavior on older stable kernels. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Avenger-285714 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Fixes a mutex leak in the error path of USB audio endpoint parameter setup on older stable kernels, aligning behavior with upstream’s guard-based locking.
Changes:
- Replace a direct
return -EINVALwitherr = -EINVAL; goto unlock;whenmaxpacksizeis too small. - Ensure
chip->mutexis always released before returning fromsnd_usb_endpoint_set_params().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stable inclusion
from stable-v6.12.60
category: bugfix
The recent backport of the upstream commit 05a1fc5 ("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")
Reviewed-by: Pavel Machek pavel@denx.de
(cherry picked from commit fdf0dc82eb60091772ecea73cbc5a8fb7562fc45)
Summary by Sourcery
Bug Fixes: