summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorKuan-Wei Chiu <visitorckw@gmail.com>2025-01-29 00:54:15 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-17 10:05:20 +0100
commit679beb818093bcc9735e3ebc97a86db22ed1d1ea (patch)
tree5cc5908ceae0f2b07df15dfd1bcab3462909bda3 /scripts/stackusage
parentcf5870192a0a1b25523ddf013ea90149e9f9193f (diff)
downloadlinux-679beb818093bcc9735e3ebc97a86db22ed1d1ea.tar.gz
linux-679beb818093bcc9735e3ebc97a86db22ed1d1ea.tar.bz2
linux-679beb818093bcc9735e3ebc97a86db22ed1d1ea.zip
ALSA: hda: Fix headset detection failure due to unstable sort
commit 3b4309546b48fc167aa615a2d881a09c0a97971f upstream. The auto_parser assumed sort() was stable, but the kernel's sort() uses heapsort, which has never been stable. After commit 0e02ca29a563 ("lib/sort: optimize heapsort with double-pop variation"), the order of equal elements changed, causing the headset to fail to work. Fix the issue by recording the original order of elements before sorting and using it as a tiebreaker for equal elements in the comparison function. Fixes: b9030a005d58 ("ALSA: hda - Use standard sort function in hda_auto_parser.c") Reported-by: Austrum <austrum.lab@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219158 Tested-by: Austrum <austrum.lab@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Link: https://patch.msgid.link/20250128165415.643223-1-visitorckw@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions