From: Greg Kroah-Hartman Date: Tue, 27 Jan 2015 18:06:06 +0000 (-0800) Subject: 3.14-stable patches X-Git-Tag: v3.10.67~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=29e986415b6b17e6bad11955ea21381e93e45418;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: alsa-usb-audio-add-mic-volume-fix-quirk-for-logitech-webcam-c210.patch libata-prevent-hsm-state-change-race-between-isr-and-pio.patch pinctrl-fix-two-deadlocks.patch scripts-recordmcount.pl-there-is-no-m32-gcc-option-on-super-h-anymore.patch --- diff --git a/queue-3.14/alsa-usb-audio-add-mic-volume-fix-quirk-for-logitech-webcam-c210.patch b/queue-3.14/alsa-usb-audio-add-mic-volume-fix-quirk-for-logitech-webcam-c210.patch new file mode 100644 index 00000000000..abc54c982ab --- /dev/null +++ b/queue-3.14/alsa-usb-audio-add-mic-volume-fix-quirk-for-logitech-webcam-c210.patch @@ -0,0 +1,27 @@ +From 6455931186bff407493135e74c5f32efd30860e2 Mon Sep 17 00:00:00 2001 +From: Jason Lee Cragg +Date: Sat, 17 Jan 2015 12:28:29 -0500 +Subject: ALSA: usb-audio: Add mic volume fix quirk for Logitech Webcam C210 + +From: Jason Lee Cragg + +commit 6455931186bff407493135e74c5f32efd30860e2 upstream. + +Signed-off-by: Jason Lee Cragg +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/mixer.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/usb/mixer.c ++++ b/sound/usb/mixer.c +@@ -886,6 +886,7 @@ static void volume_control_quirks(struct + case USB_ID(0x046d, 0x0807): /* Logitech Webcam C500 */ + case USB_ID(0x046d, 0x0808): + case USB_ID(0x046d, 0x0809): ++ case USB_ID(0x046d, 0x0819): /* Logitech Webcam C210 */ + case USB_ID(0x046d, 0x081b): /* HD Webcam c310 */ + case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */ + case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */ diff --git a/queue-3.14/libata-prevent-hsm-state-change-race-between-isr-and-pio.patch b/queue-3.14/libata-prevent-hsm-state-change-race-between-isr-and-pio.patch new file mode 100644 index 00000000000..39ad8c7e44c --- /dev/null +++ b/queue-3.14/libata-prevent-hsm-state-change-race-between-isr-and-pio.patch @@ -0,0 +1,72 @@ +From ce7514526742c0898b837d4395f515b79dfb5a12 Mon Sep 17 00:00:00 2001 +From: David Jeffery +Date: Mon, 19 Jan 2015 13:03:25 -0600 +Subject: libata: prevent HSM state change race between ISR and PIO + +From: David Jeffery + +commit ce7514526742c0898b837d4395f515b79dfb5a12 upstream. + +It is possible for ata_sff_flush_pio_task() to set ap->hsm_task_state to +HSM_ST_IDLE in between the time __ata_sff_port_intr() checks for HSM_ST_IDLE +and before it calls ata_sff_hsm_move() causing ata_sff_hsm_move() to BUG(). + +This problem is hard to reproduce making this patch hard to verify, but this +fix will prevent the race. + +I have not been able to reproduce the problem, but here is a crash dump from +a 2.6.32 kernel. + +On examining the ata port's state, its hsm_task_state field has a value of HSM_ST_IDLE: + +crash> struct ata_port.hsm_task_state ffff881c1121c000 + hsm_task_state = 0 + +Normally, this should not be possible as ata_sff_hsm_move() was called from ata_sff_host_intr(), +which checks hsm_task_state and won't call ata_sff_hsm_move() if it has a HSM_ST_IDLE value. + +PID: 11053 TASK: ffff8816e846cae0 CPU: 0 COMMAND: "sshd" + #0 [ffff88008ba03960] machine_kexec at ffffffff81038f3b + #1 [ffff88008ba039c0] crash_kexec at ffffffff810c5d92 + #2 [ffff88008ba03a90] oops_end at ffffffff8152b510 + #3 [ffff88008ba03ac0] die at ffffffff81010e0b + #4 [ffff88008ba03af0] do_trap at ffffffff8152ad74 + #5 [ffff88008ba03b50] do_invalid_op at ffffffff8100cf95 + #6 [ffff88008ba03bf0] invalid_op at ffffffff8100bf9b + [exception RIP: ata_sff_hsm_move+317] + RIP: ffffffff813a77ad RSP: ffff88008ba03ca0 RFLAGS: 00010097 + RAX: 0000000000000000 RBX: ffff881c1121dc60 RCX: 0000000000000000 + RDX: ffff881c1121dd10 RSI: ffff881c1121dc60 RDI: ffff881c1121c000 + RBP: ffff88008ba03d00 R8: 0000000000000000 R9: 000000000000002e + R10: 000000000001003f R11: 000000000000009b R12: ffff881c1121c000 + R13: 0000000000000000 R14: 0000000000000050 R15: ffff881c1121dd78 + ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 + #7 [ffff88008ba03d08] ata_sff_host_intr at ffffffff813a7fbd + #8 [ffff88008ba03d38] ata_sff_interrupt at ffffffff813a821e + #9 [ffff88008ba03d78] handle_IRQ_event at ffffffff810e6ec0 +--- + drivers/ata/libata-sff.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +--- a/drivers/ata/libata-sff.c ++++ b/drivers/ata/libata-sff.c +@@ -1333,7 +1333,19 @@ void ata_sff_flush_pio_task(struct ata_p + DPRINTK("ENTER\n"); + + cancel_delayed_work_sync(&ap->sff_pio_task); ++ ++ /* ++ * We wanna reset the HSM state to IDLE. If we do so without ++ * grabbing the port lock, critical sections protected by it which ++ * expect the HSM state to stay stable may get surprised. For ++ * example, we may set IDLE in between the time ++ * __ata_sff_port_intr() checks for HSM_ST_IDLE and before it calls ++ * ata_sff_hsm_move() causing ata_sff_hsm_move() to BUG(). ++ */ ++ spin_lock_irq(ap->lock); + ap->hsm_task_state = HSM_ST_IDLE; ++ spin_unlock_irq(ap->lock); ++ + ap->sff_pio_task_link = NULL; + + if (ata_msg_ctl(ap)) diff --git a/queue-3.14/pinctrl-fix-two-deadlocks.patch b/queue-3.14/pinctrl-fix-two-deadlocks.patch new file mode 100644 index 00000000000..1458fd62d7c --- /dev/null +++ b/queue-3.14/pinctrl-fix-two-deadlocks.patch @@ -0,0 +1,80 @@ +From db93facfb0ef542aa5d8079e47580b3e669a4d82 Mon Sep 17 00:00:00 2001 +From: Jim Lin +Date: Thu, 8 Jan 2015 20:25:05 +0800 +Subject: pinctrl: Fix two deadlocks + +From: Jim Lin + +commit db93facfb0ef542aa5d8079e47580b3e669a4d82 upstream. + +This patch is to fix two deadlock cases. +Deadlock 1: +CPU #1 + pinctrl_register-> pinctrl_get -> + create_pinctrl + (Holding lock pinctrl_maps_mutex) + -> get_pinctrl_dev_from_devname + (Trying to acquire lock pinctrldev_list_mutex) +CPU #0 + pinctrl_unregister + (Holding lock pinctrldev_list_mutex) + -> pinctrl_put ->> pinctrl_free -> + pinctrl_dt_free_maps -> pinctrl_unregister_map + (Trying to acquire lock pinctrl_maps_mutex) + +Simply to say +CPU#1 is holding lock A and trying to acquire lock B, +CPU#0 is holding lock B and trying to acquire lock A. + +Deadlock 2: +CPU #3 + pinctrl_register-> pinctrl_get -> + create_pinctrl + (Holding lock pinctrl_maps_mutex) + -> get_pinctrl_dev_from_devname + (Trying to acquire lock pinctrldev_list_mutex) +CPU #2 + pinctrl_unregister + (Holding lock pctldev->mutex) + -> pinctrl_put ->> pinctrl_free -> + pinctrl_dt_free_maps -> pinctrl_unregister_map + (Trying to acquire lock pinctrl_maps_mutex) +CPU #0 + tegra_gpio_request + (Holding lock pinctrldev_list_mutex) + -> pinctrl_get_device_gpio_range + (Trying to acquire lock pctldev->mutex) + +Simply to say +CPU#3 is holding lock A and trying to acquire lock D, +CPU#2 is holding lock B and trying to acquire lock A, +CPU#0 is holding lock D and trying to acquire lock B. + +Signed-off-by: Jim Lin +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pinctrl/core.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/pinctrl/core.c ++++ b/drivers/pinctrl/core.c +@@ -1812,14 +1812,15 @@ void pinctrl_unregister(struct pinctrl_d + if (pctldev == NULL) + return; + +- mutex_lock(&pinctrldev_list_mutex); + mutex_lock(&pctldev->mutex); +- + pinctrl_remove_device_debugfs(pctldev); ++ mutex_unlock(&pctldev->mutex); + + if (!IS_ERR(pctldev->p)) + pinctrl_put(pctldev->p); + ++ mutex_lock(&pinctrldev_list_mutex); ++ mutex_lock(&pctldev->mutex); + /* TODO: check that no pinmuxes are still active? */ + list_del(&pctldev->node); + /* Destroy descriptor tree */ diff --git a/queue-3.14/scripts-recordmcount.pl-there-is-no-m32-gcc-option-on-super-h-anymore.patch b/queue-3.14/scripts-recordmcount.pl-there-is-no-m32-gcc-option-on-super-h-anymore.patch new file mode 100644 index 00000000000..648653d2881 --- /dev/null +++ b/queue-3.14/scripts-recordmcount.pl-there-is-no-m32-gcc-option-on-super-h-anymore.patch @@ -0,0 +1,44 @@ +From 1caf6aaaa47471831d77c75f094d4e00ad1ec808 Mon Sep 17 00:00:00 2001 +From: Michael Karcher +Date: Sun, 18 Jan 2015 00:36:15 +0100 +Subject: scripts/recordmcount.pl: There is no -m32 gcc option on Super-H anymore + +From: Michael Karcher + +commit 1caf6aaaa47471831d77c75f094d4e00ad1ec808 upstream. + +Compiling SH with gcc-4.8 fails due to the -m32 option not being +supported. + +From http://buildd.debian-ports.org/status/fetch.php?pkg=linux&arch=sh4&ver=3.16.7-ckt4-1&stamp=1421425783 + + CC init/main.o + gcc-4.8: error: unrecognized command line option '-m32' + ld: cannot find init/.tmp_mc_main.o: No such file or directory + objcopy: 'init/.tmp_mx_main.o': No such file + rm: cannot remove 'init/.tmp_mx_main.o': No such file or directory + rm: cannot remove 'init/.tmp_mc_main.o': No such file or directory + +Link: http://lkml.kernel.org/r/1421537778-29001-1-git-send-email-kernel@mkarcher.dialup.fu-berlin.de +Link: http://lkml.kernel.org/r/54BCBDD4.10102@physik.fu-berlin.de + +Cc: Matt Fleming +Reported-by: John Paul Adrian Glaubitz +Signed-off-by: Michael Karcher +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + scripts/recordmcount.pl | 1 - + 1 file changed, 1 deletion(-) + +--- a/scripts/recordmcount.pl ++++ b/scripts/recordmcount.pl +@@ -262,7 +262,6 @@ if ($arch eq "x86_64") { + # force flags for this arch + $ld .= " -m shlelf_linux"; + $objcopy .= " -O elf32-sh-linux"; +- $cc .= " -m32"; + + } elsif ($arch eq "powerpc") { + $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)"; diff --git a/queue-3.14/series b/queue-3.14/series index 40c40b6fc54..419712422b7 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -1,2 +1,6 @@ gpio-sysfs-fix-gpio-chip-device-attribute-leak.patch gpio-sysfs-fix-gpio-device-attribute-leak.patch +pinctrl-fix-two-deadlocks.patch +libata-prevent-hsm-state-change-race-between-isr-and-pio.patch +alsa-usb-audio-add-mic-volume-fix-quirk-for-logitech-webcam-c210.patch +scripts-recordmcount.pl-there-is-no-m32-gcc-option-on-super-h-anymore.patch