From 227a77467edd70203927be4b234780e99e62fb42 Mon Sep 17 00:00:00 2001 From: Jan Alexander Steffens Date: Fri, 29 Dec 2017 20:26:04 +0000 Subject: [PATCH] 4.14.10-1 --- ...ix-the-missing-ctl-name-suffix-at-pa.patch | 77 ------------------- PKGBUILD | 12 +-- 2 files changed, 4 insertions(+), 85 deletions(-) delete mode 100644 0001-ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch diff --git a/0001-ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch b/0001-ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch deleted file mode 100644 index fe62f65..0000000 --- a/0001-ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 16b5ff888e251b8c4dedd3994d2e85ab25ea7fa4 Mon Sep 17 00:00:00 2001 -Message-Id: <16b5ff888e251b8c4dedd3994d2e85ab25ea7fa4.1514245036.git.jan.steffens@gmail.com> -From: Takashi Iwai -Date: Mon, 18 Dec 2017 23:36:57 +0100 -Subject: [PATCH] ALSA: usb-audio: Fix the missing ctl name suffix at parsing - SU - -The commit 89b89d121ffc ("ALSA: usb-audio: Add check return value for -usb_string()") added the check of the return value from -snd_usb_copy_string_desc(), which is correct per se, but it introduced -a regression. In the original code, either the "Clock Source", -"Playback Source" or "Capture Source" suffix is added after the -terminal string, while the commit changed it to add the suffix only -when get_term_name() is failing. It ended up with an incorrect ctl -name like "PCM" instead of "PCM Capture Source". - -Also, even the original code has a similar bug: when the ctl name is -generated from snd_usb_copy_string_desc() for the given iSelector, it -also doesn't put the suffix. - -This patch addresses these issues: the suffix is added always when no -static mapping is found. Also the patch tries to put more comments -and cleans up the if/else block for better readability in order to -avoid the same pitfall again. - -Fixes: 89b89d121ffc ("ALSA: usb-audio: Add check return value for usb_string()") -Reported-and-tested-by: Mauro Santos -Cc: -Signed-off-by: Takashi Iwai ---- - sound/usb/mixer.c | 27 ++++++++++++++++----------- - 1 file changed, 16 insertions(+), 11 deletions(-) - -diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c -index 4fde4f8d4444a597..75bce127d768c613 100644 ---- a/sound/usb/mixer.c -+++ b/sound/usb/mixer.c -@@ -2173,20 +2173,25 @@ static int parse_audio_selector_unit(struct mixer_build *state, int unitid, - kctl->private_value = (unsigned long)namelist; - kctl->private_free = usb_mixer_selector_elem_free; - -- nameid = uac_selector_unit_iSelector(desc); -+ /* check the static mapping table at first */ - len = check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name)); -- if (len) -- ; -- else if (nameid) -- len = snd_usb_copy_string_desc(state, nameid, kctl->id.name, -- sizeof(kctl->id.name)); -- else -- len = get_term_name(state, &state->oterm, -- kctl->id.name, sizeof(kctl->id.name), 0); -- - if (!len) { -- strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name)); -+ /* no mapping ? */ -+ /* if iSelector is given, use it */ -+ nameid = uac_selector_unit_iSelector(desc); -+ if (nameid) -+ len = snd_usb_copy_string_desc(state, nameid, -+ kctl->id.name, -+ sizeof(kctl->id.name)); -+ /* ... or pick up the terminal name at next */ -+ if (!len) -+ len = get_term_name(state, &state->oterm, -+ kctl->id.name, sizeof(kctl->id.name), 0); -+ /* ... or use the fixed string "USB" as the last resort */ -+ if (!len) -+ strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name)); - -+ /* and add the proper suffix */ - if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR) - append_ctl_name(kctl, " Clock Source"); - else if ((state->oterm.type & 0xff00) == 0x0100) --- -2.15.1 - diff --git a/PKGBUILD b/PKGBUILD index 8c8f300..314e6ee 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,7 +4,7 @@ pkgbase=linux # Build stock -ARCH kernel #pkgbase=linux-custom # Build kernel with a different name _srcname=linux-4.14 -pkgver=4.14.9 +pkgver=4.14.10 pkgrel=1 arch=('x86_64') url="https://www.kernel.org/" @@ -26,7 +26,6 @@ source=( 0001-Revert-xfrm-Fix-stack-out-of-bounds-read-in-xfrm_sta.patch 0002-xfrm-Fix-stack-out-of-bounds-read-on-socket-policy-l.patch 0003-cgroup-fix-css_task_iter-crash-on-CSS_TASK_ITER_PROC.patch - 0001-ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch ) validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds @@ -34,7 +33,7 @@ validpgpkeys=( ) sha256sums=('f81d59477e90a130857ce18dc02f4fbe5725854911db1e7ba770c7cd350f96a7' 'SKIP' - '5edc955bb67b04c7ed426b1df17a3e322e32ad9fdda9c6abb53ab6eca7faf704' + '16f560aa713b46c707f04a226f67dc31fdd280aae57dd19e0413d61df5336c74' 'SKIP' '4d12ed868b05720c3d263c8454622c67bdee6969400049d7adac7b00907ad195' 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21' @@ -45,8 +44,7 @@ sha256sums=('f81d59477e90a130857ce18dc02f4fbe5725854911db1e7ba770c7cd350f96a7' '1d69940c6bf1731fa1d1da29b32ec4f594fa360118fe7b128c9810285ebf13e2' 'ed3266ab03f836f57de0faf8a10ffd7566c909515c2649de99adaab2fac4aa32' '64a014f7e1b4588728b3ea9538beee67ec63fb792d890c7be9cc13ddc2121b00' - '3d4c41086c077fbd515d04f5e59c0c258f700433c5da3365d960b696c2e56efb' - '95f0d0a94983b0dafd295f660a663f9be5ef2fcb9646098426a5d12b59f50638') + '3d4c41086c077fbd515d04f5e59c0c258f700433c5da3365d960b696c2e56efb') _kernelname=${pkgbase#linux} @@ -55,6 +53,7 @@ prepare() { # add upstream patch patch -p1 -i ../patch-${pkgver} + chmod +x tools/objtool/sync-check.sh # GNU patch doesn't support git-style file mode # security patches @@ -77,9 +76,6 @@ prepare() { # https://bugs.archlinux.org/task/56846 patch -Np1 -i ../0003-cgroup-fix-css_task_iter-crash-on-CSS_TASK_ITER_PROC.patch - # https://bugs.archlinux.org/task/56830 - patch -Np1 -i ../0001-ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch - cp -Tf ../config .config if [ "${_kernelname}" != "" ]; then