* [PATCH 3.10 00/45] 3.10.62-stable review
@ 2014-12-05 22:44 Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 01/45] MIPS: oprofile: Fix backtrace on 64-bit kernel Greg Kroah-Hartman
` (42 more replies)
0 siblings, 43 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, torvalds, akpm, linux, satoru.takeuchi,
shuah.kh, stable
This is the start of the stable review cycle for the 3.10.62 release.
There are 45 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun Dec 7 22:32:54 UTC 2014.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.62-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 3.10.62-rc1
Sergio Gelato <Sergio.Gelato@astro.su.se>
nfsd: Fix ACL null pointer deref
Benjamin Herrenschmidt <benh@kernel.crashing.org>
powerpc/powernv: Honor the generic "no_64bit_msi" flag
Maurizio Lombardi <mlombard@redhat.com>
bnx2fc: do not add shared skbs to the fcoe_rx_list
J. Bruce Fields <bfields@redhat.com>
nfsd4: fix leak of inode reference on delegation failure
Trond Myklebust <trond.myklebust@primarydata.com>
nfsd: Fix slot wake up race in the nfsv4.1 callback code
Stanislaw Gruszka <sgruszka@redhat.com>
rt2x00: do not align payload on modern H/W
Thomas Körper <thomas.koerper@esd.eu>
can: dev: avoid calling kfree_skb() from interrupt context
Thor Thayer <tthayer@opensource.altera.com>
spi: dw: Fix dynamic speed change.
Sagi Grimberg <sagig@dev.mellanox.co.il>
iser-target: Handle DEVICE_REMOVAL event on network portal listener correctly
Roland Dreier <roland@purestorage.com>
target: Don't call TFO->write_pending if data_length == 0
Bart Van Assche <bvanassche@acm.org>
srp-target: Retry when QP creation fails with ENOMEM
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Input: xpad - use proper endpoint type
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
ARM: 8222/1: mvebu: enable strex backoff delay
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
ARM: 8216/1: xscale: correct auxiliary register in suspend/resume
Jurgen Kramer <gtmkramer@xs4all.nl>
ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devices
Alexey Khoroshilov <khoroshilov@ispras.ru>
can: esd_usb2: fix memory leak on disconnect
Mathias Nyman <mathias.nyman@linux.intel.com>
USB: xhci: don't start a halted endpoint before its new dequeue is set
Hans de Goede <hdegoede@redhat.com>
usb-quirks: Add reset-resume quirk for MS Wireless Laser Mouse 6000
Troy Clark <tclark@matrixorbital.ca>
usb: serial: ftdi_sio: add PIDs for Matrix Orbital products
Preston Fick <pffick@gmail.com>
USB: serial: cp210x: add IDs for CEL MeshConnect USB Stick
Johan Hovold <johan@kernel.org>
USB: keyspan: fix tty line-status reporting
Johan Hovold <johan@kernel.org>
USB: keyspan: fix overrun-error reporting
Johan Hovold <johan@kernel.org>
USB: ssu100: fix overrun-error reporting
Cristina Ciocan <cristina.ciocan@intel.com>
iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask
Laurent Dufour <ldufour@linux.vnet.ibm.com>
powerpc/pseries: Fix endiannes issue in RTAS call from xmon
Benjamin Herrenschmidt <benh@kernel.crashing.org>
powerpc/pseries: Honor the generic "no_64bit_msi" flag
Benjamin Herrenschmidt <benh@kernel.crashing.org>
of/base: Fix PowerPC address parsing hack
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use
Fabio Estevam <fabio.estevam@freescale.com>
ASoC: sgtl5000: Fix SMALL_POP bit definition
Benjamin Herrenschmidt <benh@kernel.crashing.org>
PCI/MSI: Add device flag indicating that 64-bit MSIs don't work
Jiri Bohac <jbohac@suse.cz>
ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg
Mathias Krause <minipli@googlemail.com>
pptp: fix stack info leak in pptp_getname()
Martin Hauke <mardnh@gmx.de>
qmi_wwan: Add support for HP lt4112 LTE/HSPA+ Gobi 4G Modem
Alexey Khoroshilov <khoroshilov@ispras.ru>
ieee802154: fix error handling in ieee802154fake_probe()
Panu Matilainen <pmatilai@redhat.com>
ipv4: Fix incorrect error code when adding an unreachable route
Vincent BENAYOUN <vincent.benayoun@trust-in-soft.com>
inetdevice: fixed signed integer overflow
David S. Miller <davem@davemloft.net>
sparc64: Fix constraints on swab helpers.
Andy Lutomirski <luto@amacapital.net>
uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME
Kees Cook <keescook@chromium.org>
x86, mm: Set NX across entire PMD at boot
Dave Hansen <dave.hansen@linux.intel.com>
x86: Require exact match for 'noxsave' command line option
Andy Lutomirski <luto@amacapital.net>
x86_64, traps: Rework bad_iret
Andy Lutomirski <luto@amacapital.net>
x86_64, traps: Stop using IST for #SS
Andy Lutomirski <luto@amacapital.net>
x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C
Aaro Koskinen <aaro.koskinen@iki.fi>
MIPS: Loongson: Make platform serial setup always built-in.
Aaro Koskinen <aaro.koskinen@nsn.com>
MIPS: oprofile: Fix backtrace on 64-bit kernel
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mm/proc-v7.S | 2 -
arch/arm/mm/proc-xscale.S | 4 +-
arch/mips/loongson/common/Makefile | 3 +-
arch/mips/oprofile/backtrace.c | 2 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 3 +-
arch/powerpc/platforms/powernv/pci.c | 4 +-
arch/powerpc/platforms/pseries/msi.c | 2 +-
arch/powerpc/xmon/xmon.c | 6 +-
arch/sparc/include/uapi/asm/swab.h | 12 ++--
arch/x86/include/asm/page_32_types.h | 1 -
arch/x86/include/asm/page_64_types.h | 11 ++--
arch/x86/include/asm/thread_info.h | 2 +-
arch/x86/kernel/cpu/common.c | 2 +
arch/x86/kernel/dumpstack_64.c | 1 -
arch/x86/kernel/entry_64.S | 81 +++++++-------------------
arch/x86/kernel/traps.c | 71 ++++++++++++++++------
arch/x86/mm/init_64.c | 11 +++-
drivers/infiniband/ulp/isert/ib_isert.c | 29 +++++----
drivers/infiniband/ulp/srpt/ib_srpt.c | 8 +++
drivers/input/joystick/xpad.c | 16 ++++-
drivers/net/can/dev.c | 2 +-
drivers/net/can/usb/esd_usb2.c | 1 +
drivers/net/ieee802154/fakehard.c | 13 +++--
drivers/net/ppp/pptp.c | 4 +-
drivers/net/usb/qmi_wwan.c | 1 +
drivers/net/wireless/rt2x00/rt2x00queue.c | 50 ++++------------
drivers/of/address.c | 19 +++++-
drivers/pci/msi.c | 26 +++++++++
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 7 +++
drivers/spi/spi-dw.c | 6 +-
drivers/target/target_core_transport.c | 2 +-
drivers/usb/core/quirks.c | 3 +
drivers/usb/host/xhci-ring.c | 3 +-
drivers/usb/serial/cp210x.c | 1 +
drivers/usb/serial/ftdi_sio.c | 33 +++++++++++
drivers/usb/serial/ftdi_sio_ids.h | 39 +++++++++++--
drivers/usb/serial/keyspan.c | 97 +++++++++++++++++++------------
drivers/usb/serial/ssu100.c | 11 +---
fs/nfsd/nfs4callback.c | 8 ++-
fs/nfsd/nfs4state.c | 31 ++++++----
fs/nfsd/vfs.c | 3 +
include/linux/iio/events.h | 2 +-
include/linux/inetdevice.h | 2 +-
include/linux/pci.h | 1 +
kernel/events/uprobes.c | 1 -
net/ipv4/fib_rules.c | 4 ++
net/ipx/af_ipx.c | 6 +-
sound/soc/codecs/sgtl5000.c | 3 +-
sound/soc/codecs/sgtl5000.h | 2 +-
sound/soc/codecs/wm_adsp.c | 1 +
sound/usb/quirks.c | 14 +++++
52 files changed, 424 insertions(+), 247 deletions(-)
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 01/45] MIPS: oprofile: Fix backtrace on 64-bit kernel
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 02/45] MIPS: Loongson: Make platform serial setup always built-in Greg Kroah-Hartman
` (41 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Aaro Koskinen, linux-mips,
Ralf Baechle
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaro Koskinen <aaro.koskinen@nsn.com>
commit bbaf113a481b6ce32444c125807ad3618643ce57 upstream.
Fix incorrect cast that always results in wrong address for the new
frame on 64-bit kernels.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8110/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/oprofile/backtrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/mips/oprofile/backtrace.c
+++ b/arch/mips/oprofile/backtrace.c
@@ -92,7 +92,7 @@ static inline int unwind_user_frame(stru
/* This marks the end of the previous function,
which means we overran. */
break;
- stack_size = (unsigned) stack_adjustment;
+ stack_size = (unsigned long) stack_adjustment;
} else if (is_ra_save_ins(&ip)) {
int ra_slot = ip.i_format.simmediate;
if (ra_slot < 0)
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 02/45] MIPS: Loongson: Make platform serial setup always built-in.
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 01/45] MIPS: oprofile: Fix backtrace on 64-bit kernel Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 03/45] x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C Greg Kroah-Hartman
` (40 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Aaro Koskinen, Ralf Baechle,
linux-mips, Huacai Chen, Markos Chandras
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaro Koskinen <aaro.koskinen@iki.fi>
commit 26927f76499849e095714452b8a4e09350f6a3b9 upstream.
If SERIAL_8250 is compiled as a module, the platform specific setup
for Loongson will be a module too, and it will not work very well.
At least on Loongson 3 it will trigger a build failure,
since loongson_sysconf is not exported to modules.
Fix by making the platform specific serial code always built-in.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reported-by: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Huacai Chen <chenhc@lemote.com>
Cc: Markos Chandras <Markos.Chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/8533/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/loongson/common/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/mips/loongson/common/Makefile
+++ b/arch/mips/loongson/common/Makefile
@@ -10,7 +10,8 @@ obj-$(CONFIG_GPIOLIB) += gpio.o
# Serial port support
#
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
-obj-$(CONFIG_SERIAL_8250) += serial.o
+loongson-serial-$(CONFIG_SERIAL_8250) := serial.o
+obj-y += $(loongson-serial-m) $(loongson-serial-y)
obj-$(CONFIG_LOONGSON_UART_BASE) += uart_base.o
obj-$(CONFIG_LOONGSON_MC146818) += rtc.o
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 03/45] x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 01/45] MIPS: oprofile: Fix backtrace on 64-bit kernel Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 02/45] MIPS: Loongson: Make platform serial setup always built-in Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 04/45] x86_64, traps: Stop using IST for #SS Greg Kroah-Hartman
` (39 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Andy Lutomirski, Thomas Gleixner,
Linus Torvalds
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Lutomirski <luto@amacapital.net>
commit af726f21ed8af2cdaa4e93098dc211521218ae65 upstream.
There's nothing special enough about the espfix64 double fault fixup to
justify writing it in assembly. Move it to C.
This also fixes a bug: if the double fault came from an IST stack, the
old asm code would return to a partially uninitialized stack frame.
Fixes: 3891a04aafd668686239349ea58f3314ea2af86b
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kernel/entry_64.S | 34 ++--------------------------------
arch/x86/kernel/traps.c | 24 ++++++++++++++++++++++++
2 files changed, 26 insertions(+), 32 deletions(-)
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -1068,6 +1068,7 @@ ENTRY(native_iret)
jnz native_irq_return_ldt
#endif
+.global native_irq_return_iret
native_irq_return_iret:
iretq
_ASM_EXTABLE(native_irq_return_iret, bad_iret)
@@ -1164,37 +1165,6 @@ ENTRY(retint_kernel)
CFI_ENDPROC
END(common_interrupt)
- /*
- * If IRET takes a fault on the espfix stack, then we
- * end up promoting it to a doublefault. In that case,
- * modify the stack to make it look like we just entered
- * the #GP handler from user space, similar to bad_iret.
- */
-#ifdef CONFIG_X86_ESPFIX64
- ALIGN
-__do_double_fault:
- XCPT_FRAME 1 RDI+8
- movq RSP(%rdi),%rax /* Trap on the espfix stack? */
- sarq $PGDIR_SHIFT,%rax
- cmpl $ESPFIX_PGD_ENTRY,%eax
- jne do_double_fault /* No, just deliver the fault */
- cmpl $__KERNEL_CS,CS(%rdi)
- jne do_double_fault
- movq RIP(%rdi),%rax
- cmpq $native_irq_return_iret,%rax
- jne do_double_fault /* This shouldn't happen... */
- movq PER_CPU_VAR(kernel_stack),%rax
- subq $(6*8-KERNEL_STACK_OFFSET),%rax /* Reset to original stack */
- movq %rax,RSP(%rdi)
- movq $0,(%rax) /* Missing (lost) #GP error code */
- movq $general_protection,RIP(%rdi)
- retq
- CFI_ENDPROC
-END(__do_double_fault)
-#else
-# define __do_double_fault do_double_fault
-#endif
-
/*
* End of kprobes section
*/
@@ -1363,7 +1333,7 @@ zeroentry overflow do_overflow
zeroentry bounds do_bounds
zeroentry invalid_op do_invalid_op
zeroentry device_not_available do_device_not_available
-paranoiderrorentry double_fault __do_double_fault
+paranoiderrorentry double_fault do_double_fault
zeroentry coprocessor_segment_overrun do_coprocessor_segment_overrun
errorentry invalid_TSS do_invalid_TSS
errorentry segment_not_present do_segment_not_present
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -247,6 +247,30 @@ dotraplinkage void do_double_fault(struc
static const char str[] = "double fault";
struct task_struct *tsk = current;
+#ifdef CONFIG_X86_ESPFIX64
+ extern unsigned char native_irq_return_iret[];
+
+ /*
+ * If IRET takes a non-IST fault on the espfix64 stack, then we
+ * end up promoting it to a doublefault. In that case, modify
+ * the stack to make it look like we just entered the #GP
+ * handler from user space, similar to bad_iret.
+ */
+ if (((long)regs->sp >> PGDIR_SHIFT) == ESPFIX_PGD_ENTRY &&
+ regs->cs == __KERNEL_CS &&
+ regs->ip == (unsigned long)native_irq_return_iret)
+ {
+ struct pt_regs *normal_regs = task_pt_regs(current);
+
+ /* Fake a #GP(0) from userspace. */
+ memmove(&normal_regs->ip, (void *)regs->sp, 5*8);
+ normal_regs->orig_ax = 0; /* Missing (lost) #GP error code */
+ regs->ip = (unsigned long)general_protection;
+ regs->sp = (unsigned long)&normal_regs->orig_ax;
+ return;
+ }
+#endif
+
exception_enter();
/* Return not checked because double check cannot be ignored */
notify_die(DIE_TRAP, str, regs, error_code, X86_TRAP_DF, SIGSEGV);
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 04/45] x86_64, traps: Stop using IST for #SS
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (2 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 03/45] x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 05/45] x86_64, traps: Rework bad_iret Greg Kroah-Hartman
` (38 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Andy Lutomirski, Thomas Gleixner,
Linus Torvalds
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Lutomirski <luto@amacapital.net>
commit 6f442be2fb22be02cafa606f1769fa1e6f894441 upstream.
On a 32-bit kernel, this has no effect, since there are no IST stacks.
On a 64-bit kernel, #SS can only happen in user code, on a failed iret
to user space, a canonical violation on access via RSP or RBP, or a
genuine stack segment violation in 32-bit kernel code. The first two
cases don't need IST, and the latter two cases are unlikely fatal bugs,
and promoting them to double faults would be fine.
This fixes a bug in which the espfix64 code mishandles a stack segment
violation.
This saves 4k of memory per CPU and a tiny bit of code.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/include/asm/page_32_types.h | 1 -
arch/x86/include/asm/page_64_types.h | 11 +++++------
arch/x86/kernel/dumpstack_64.c | 1 -
arch/x86/kernel/entry_64.S | 2 +-
arch/x86/kernel/traps.c | 18 +-----------------
5 files changed, 7 insertions(+), 26 deletions(-)
--- a/arch/x86/include/asm/page_32_types.h
+++ b/arch/x86/include/asm/page_32_types.h
@@ -18,7 +18,6 @@
#define THREAD_SIZE_ORDER 1
#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
-#define STACKFAULT_STACK 0
#define DOUBLEFAULT_STACK 1
#define NMI_STACK 0
#define DEBUG_STACK 0
--- a/arch/x86/include/asm/page_64_types.h
+++ b/arch/x86/include/asm/page_64_types.h
@@ -14,12 +14,11 @@
#define IRQ_STACK_ORDER 2
#define IRQ_STACK_SIZE (PAGE_SIZE << IRQ_STACK_ORDER)
-#define STACKFAULT_STACK 1
-#define DOUBLEFAULT_STACK 2
-#define NMI_STACK 3
-#define DEBUG_STACK 4
-#define MCE_STACK 5
-#define N_EXCEPTION_STACKS 5 /* hw limit: 7 */
+#define DOUBLEFAULT_STACK 1
+#define NMI_STACK 2
+#define DEBUG_STACK 3
+#define MCE_STACK 4
+#define N_EXCEPTION_STACKS 4 /* hw limit: 7 */
#define PUD_PAGE_SIZE (_AC(1, UL) << PUD_SHIFT)
#define PUD_PAGE_MASK (~(PUD_PAGE_SIZE-1))
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -24,7 +24,6 @@ static char x86_stack_ids[][8] = {
[ DEBUG_STACK-1 ] = "#DB",
[ NMI_STACK-1 ] = "NMI",
[ DOUBLEFAULT_STACK-1 ] = "#DF",
- [ STACKFAULT_STACK-1 ] = "#SS",
[ MCE_STACK-1 ] = "#MC",
#if DEBUG_STKSZ > EXCEPTION_STKSZ
[ N_EXCEPTION_STACKS ...
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -1503,7 +1503,7 @@ apicinterrupt HYPERVISOR_CALLBACK_VECTOR
paranoidzeroentry_ist debug do_debug DEBUG_STACK
paranoidzeroentry_ist int3 do_int3 DEBUG_STACK
-paranoiderrorentry stack_segment do_stack_segment
+errorentry stack_segment do_stack_segment
#ifdef CONFIG_XEN
zeroentry xen_debug do_debug
zeroentry xen_int3 do_int3
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -220,28 +220,12 @@ DO_ERROR(X86_TRAP_OLD_MF, SIGFPE, "copro
coprocessor_segment_overrun)
DO_ERROR(X86_TRAP_TS, SIGSEGV, "invalid TSS", invalid_TSS)
DO_ERROR(X86_TRAP_NP, SIGBUS, "segment not present", segment_not_present)
-#ifdef CONFIG_X86_32
DO_ERROR(X86_TRAP_SS, SIGBUS, "stack segment", stack_segment)
-#endif
DO_ERROR_INFO(X86_TRAP_AC, SIGBUS, "alignment check", alignment_check,
BUS_ADRALN, 0)
#ifdef CONFIG_X86_64
/* Runs on IST stack */
-dotraplinkage void do_stack_segment(struct pt_regs *regs, long error_code)
-{
- enum ctx_state prev_state;
-
- prev_state = exception_enter();
- if (notify_die(DIE_TRAP, "stack segment", regs, error_code,
- X86_TRAP_SS, SIGBUS) != NOTIFY_STOP) {
- preempt_conditional_sti(regs);
- do_trap(X86_TRAP_SS, SIGBUS, "stack segment", regs, error_code, NULL);
- preempt_conditional_cli(regs);
- }
- exception_exit(prev_state);
-}
-
dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code)
{
static const char str[] = "double fault";
@@ -769,7 +753,7 @@ void __init trap_init(void)
set_intr_gate(X86_TRAP_OLD_MF, &coprocessor_segment_overrun);
set_intr_gate(X86_TRAP_TS, &invalid_TSS);
set_intr_gate(X86_TRAP_NP, &segment_not_present);
- set_intr_gate_ist(X86_TRAP_SS, &stack_segment, STACKFAULT_STACK);
+ set_intr_gate(X86_TRAP_SS, stack_segment);
set_intr_gate(X86_TRAP_GP, &general_protection);
set_intr_gate(X86_TRAP_SPURIOUS, &spurious_interrupt_bug);
set_intr_gate(X86_TRAP_MF, &coprocessor_error);
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 05/45] x86_64, traps: Rework bad_iret
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (3 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 04/45] x86_64, traps: Stop using IST for #SS Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 06/45] x86: Require exact match for noxsave command line option Greg Kroah-Hartman
` (37 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Andy Lutomirski, Thomas Gleixner,
Linus Torvalds
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Lutomirski <luto@amacapital.net>
commit b645af2d5905c4e32399005b867987919cbfc3ae upstream.
It's possible for iretq to userspace to fail. This can happen because
of a bad CS, SS, or RIP.
Historically, we've handled it by fixing up an exception from iretq to
land at bad_iret, which pretends that the failed iret frame was really
the hardware part of #GP(0) from userspace. To make this work, there's
an extra fixup to fudge the gs base into a usable state.
This is suboptimal because it loses the original exception. It's also
buggy because there's no guarantee that we were on the kernel stack to
begin with. For example, if the failing iret happened on return from an
NMI, then we'll end up executing general_protection on the NMI stack.
This is bad for several reasons, the most immediate of which is that
general_protection, as a non-paranoid idtentry, will try to deliver
signals and/or schedule from the wrong stack.
This patch throws out bad_iret entirely. As a replacement, it augments
the existing swapgs fudge into a full-blown iret fixup, mostly written
in C. It's should be clearer and more correct.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kernel/entry_64.S | 45 +++++++++++++++++++--------------------------
arch/x86/kernel/traps.c | 29 +++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 26 deletions(-)
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -1070,8 +1070,13 @@ ENTRY(native_iret)
.global native_irq_return_iret
native_irq_return_iret:
+ /*
+ * This may fault. Non-paranoid faults on return to userspace are
+ * handled by fixup_bad_iret. These include #SS, #GP, and #NP.
+ * Double-faults due to espfix64 are handled in do_double_fault.
+ * Other faults here are fatal.
+ */
iretq
- _ASM_EXTABLE(native_irq_return_iret, bad_iret)
#ifdef CONFIG_X86_ESPFIX64
native_irq_return_ldt:
@@ -1099,25 +1104,6 @@ native_irq_return_ldt:
jmp native_irq_return_iret
#endif
- .section .fixup,"ax"
-bad_iret:
- /*
- * The iret traps when the %cs or %ss being restored is bogus.
- * We've lost the original trap vector and error code.
- * #GPF is the most likely one to get for an invalid selector.
- * So pretend we completed the iret and took the #GPF in user mode.
- *
- * We are now running with the kernel GS after exception recovery.
- * But error_entry expects us to have user GS to match the user %cs,
- * so swap back.
- */
- pushq $0
-
- SWAPGS
- jmp general_protection
-
- .previous
-
/* edi: workmask, edx: work */
retint_careful:
CFI_RESTORE_STATE
@@ -1613,16 +1599,15 @@ error_sti:
/*
* There are two places in the kernel that can potentially fault with
- * usergs. Handle them here. The exception handlers after iret run with
- * kernel gs again, so don't set the user space flag. B stepping K8s
- * sometimes report an truncated RIP for IRET exceptions returning to
- * compat mode. Check for these here too.
+ * usergs. Handle them here. B stepping K8s sometimes report a
+ * truncated RIP for IRET exceptions returning to compat mode. Check
+ * for these here too.
*/
error_kernelspace:
incl %ebx
leaq native_irq_return_iret(%rip),%rcx
cmpq %rcx,RIP+8(%rsp)
- je error_swapgs
+ je error_bad_iret
movl %ecx,%eax /* zero extend */
cmpq %rax,RIP+8(%rsp)
je bstep_iret
@@ -1633,7 +1618,15 @@ error_kernelspace:
bstep_iret:
/* Fix truncated RIP */
movq %rcx,RIP+8(%rsp)
- jmp error_swapgs
+ /* fall through */
+
+error_bad_iret:
+ SWAPGS
+ mov %rsp,%rdi
+ call fixup_bad_iret
+ mov %rax,%rsp
+ decl %ebx /* Return to usergs */
+ jmp error_sti
CFI_ENDPROC
END(error_entry)
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -381,6 +381,35 @@ asmlinkage __kprobes struct pt_regs *syn
*regs = *eregs;
return regs;
}
+
+struct bad_iret_stack {
+ void *error_entry_ret;
+ struct pt_regs regs;
+};
+
+asmlinkage __visible
+struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s)
+{
+ /*
+ * This is called from entry_64.S early in handling a fault
+ * caused by a bad iret to user mode. To handle the fault
+ * correctly, we want move our stack frame to task_pt_regs
+ * and we want to pretend that the exception came from the
+ * iret target.
+ */
+ struct bad_iret_stack *new_stack =
+ container_of(task_pt_regs(current),
+ struct bad_iret_stack, regs);
+
+ /* Copy the IRET target to the new stack. */
+ memmove(&new_stack->regs.ip, (void *)s->regs.sp, 5*8);
+
+ /* Copy the remainder of the stack from the current stack. */
+ memmove(new_stack, s, offsetof(struct bad_iret_stack, regs.ip));
+
+ BUG_ON(!user_mode_vm(&new_stack->regs));
+ return new_stack;
+}
#endif
/*
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 06/45] x86: Require exact match for noxsave command line option
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (4 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 05/45] x86_64, traps: Rework bad_iret Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 07/45] x86, mm: Set NX across entire PMD at boot Greg Kroah-Hartman
` (36 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dave Hansen, Dave Hansen, Fenghua Yu,
x86, Thomas Gleixner
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Hansen <dave.hansen@linux.intel.com>
commit 2cd3949f702692cf4c5d05b463f19cd706a92dd3 upstream.
We have some very similarly named command-line options:
arch/x86/kernel/cpu/common.c:__setup("noxsave", x86_xsave_setup);
arch/x86/kernel/cpu/common.c:__setup("noxsaveopt", x86_xsaveopt_setup);
arch/x86/kernel/cpu/common.c:__setup("noxsaves", x86_xsaves_setup);
__setup() is designed to match options that take arguments, like
"foo=bar" where you would have:
__setup("foo", x86_foo_func...);
The problem is that "noxsave" actually _matches_ "noxsaves" in
the same way that "foo" matches "foo=bar". If you boot an old
kernel that does not know about "noxsaves" with "noxsaves" on the
command line, it will interpret the argument as "noxsave", which
is not what you want at all.
This makes the "noxsave" handler only return success when it finds
an *exact* match.
[ tglx: We really need to make __setup() more robust. ]
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/20141111220133.FE053984@viggo.jf.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kernel/cpu/common.c | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -144,6 +144,8 @@ EXPORT_PER_CPU_SYMBOL_GPL(gdt_page);
static int __init x86_xsave_setup(char *s)
{
+ if (strlen(s))
+ return 0;
setup_clear_cpu_cap(X86_FEATURE_XSAVE);
setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
setup_clear_cpu_cap(X86_FEATURE_AVX);
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 07/45] x86, mm: Set NX across entire PMD at boot
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (5 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 06/45] x86: Require exact match for noxsave command line option Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 08/45] uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME Greg Kroah-Hartman
` (35 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Kees Cook, Andy Lutomirski,
Toshi Kani, Yasuaki Ishimatsu, David Vrabel, Wang Nan, Yinghai Lu,
Thomas Gleixner
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kees Cook <keescook@chromium.org>
commit 45e2a9d4701d8c624d4a4bcdd1084eae31e92f58 upstream.
When setting up permissions on kernel memory at boot, the end of the
PMD that was split from bss remained executable. It should be NX like
the rest. This performs a PMD alignment instead of a PAGE alignment to
get the correct span of memory.
Before:
---[ High Kernel Mapping ]---
...
0xffffffff8202d000-0xffffffff82200000 1868K RW GLB NX pte
0xffffffff82200000-0xffffffff82c00000 10M RW PSE GLB NX pmd
0xffffffff82c00000-0xffffffff82df5000 2004K RW GLB NX pte
0xffffffff82df5000-0xffffffff82e00000 44K RW GLB x pte
0xffffffff82e00000-0xffffffffc0000000 978M pmd
After:
---[ High Kernel Mapping ]---
...
0xffffffff8202d000-0xffffffff82200000 1868K RW GLB NX pte
0xffffffff82200000-0xffffffff82e00000 12M RW PSE GLB NX pmd
0xffffffff82e00000-0xffffffffc0000000 978M pmd
[ tglx: Changed it to roundup(_brk_end, PMD_SIZE) and added a comment.
We really should unmap the reminder along with the holes
caused by init,initdata etc. but thats a different issue ]
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Toshi Kani <toshi.kani@hp.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/20141114194737.GA3091@www.outflux.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/mm/init_64.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -1142,7 +1142,7 @@ void mark_rodata_ro(void)
unsigned long end = (unsigned long) &__end_rodata_hpage_align;
unsigned long text_end = PFN_ALIGN(&__stop___ex_table);
unsigned long rodata_end = PFN_ALIGN(&__end_rodata);
- unsigned long all_end = PFN_ALIGN(&_end);
+ unsigned long all_end;
printk(KERN_INFO "Write protecting the kernel read-only data: %luk\n",
(end - start) >> 10);
@@ -1153,7 +1153,16 @@ void mark_rodata_ro(void)
/*
* The rodata/data/bss/brk section (but not the kernel text!)
* should also be not-executable.
+ *
+ * We align all_end to PMD_SIZE because the existing mapping
+ * is a full PMD. If we would align _brk_end to PAGE_SIZE we
+ * split the PMD and the reminder between _brk_end and the end
+ * of the PMD will remain mapped executable.
+ *
+ * Any PMD which was setup after the one which covers _brk_end
+ * has been zapped already via cleanup_highmem().
*/
+ all_end = roundup((unsigned long)_brk_end, PMD_SIZE);
set_memory_nx(rodata_start, (all_end - rodata_start) >> PAGE_SHIFT);
rodata_test();
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 08/45] uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (6 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 07/45] x86, mm: Set NX across entire PMD at boot Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 09/45] sparc64: Fix constraints on swab helpers Greg Kroah-Hartman
` (34 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Oleg Nesterov, Srikar Dronamraju,
Borislav Petkov, Andy Lutomirski, Linus Torvalds
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Lutomirski <luto@amacapital.net>
commit 82975bc6a6df743b9a01810fb32cb65d0ec5d60b upstream.
x86 call do_notify_resume on paranoid returns if TIF_UPROBE is set but
not on non-paranoid returns. I suspect that this is a mistake and that
the code only works because int3 is paranoid.
Setting _TIF_NOTIFY_RESUME in the uprobe code was probably a workaround
for the x86 bug. With that bug fixed, we can remove _TIF_NOTIFY_RESUME
from the uprobes code.
Reported-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/include/asm/thread_info.h | 2 +-
kernel/events/uprobes.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -147,7 +147,7 @@ struct thread_info {
/* Only used for 64 bit */
#define _TIF_DO_NOTIFY_MASK \
(_TIF_SIGPENDING | _TIF_MCE_NOTIFY | _TIF_NOTIFY_RESUME | \
- _TIF_USER_RETURN_NOTIFY)
+ _TIF_USER_RETURN_NOTIFY | _TIF_UPROBE)
/* flags to check in __switch_to() */
#define _TIF_WORK_CTXSW \
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1511,7 +1511,6 @@ bool uprobe_deny_signal(void)
if (__fatal_signal_pending(t) || arch_uprobe_xol_was_trapped(t)) {
utask->state = UTASK_SSTEP_TRAPPED;
set_tsk_thread_flag(t, TIF_UPROBE);
- set_tsk_thread_flag(t, TIF_NOTIFY_RESUME);
}
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 09/45] sparc64: Fix constraints on swab helpers.
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (7 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 08/45] uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 10/45] inetdevice: fixed signed integer overflow Greg Kroah-Hartman
` (33 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Martin K. Petersen, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
[ Upstream commit 5a2b59d3993e8ca4f7788a48a23e5cb303f26954 ]
We are reading the memory location, so we have to have a memory
constraint in there purely for the sake of showing the data flow
to the compiler.
Reported-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/sparc/include/uapi/asm/swab.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/arch/sparc/include/uapi/asm/swab.h
+++ b/arch/sparc/include/uapi/asm/swab.h
@@ -9,9 +9,9 @@ static inline __u16 __arch_swab16p(const
{
__u16 ret;
- __asm__ __volatile__ ("lduha [%1] %2, %0"
+ __asm__ __volatile__ ("lduha [%2] %3, %0"
: "=r" (ret)
- : "r" (addr), "i" (ASI_PL));
+ : "m" (*addr), "r" (addr), "i" (ASI_PL));
return ret;
}
#define __arch_swab16p __arch_swab16p
@@ -20,9 +20,9 @@ static inline __u32 __arch_swab32p(const
{
__u32 ret;
- __asm__ __volatile__ ("lduwa [%1] %2, %0"
+ __asm__ __volatile__ ("lduwa [%2] %3, %0"
: "=r" (ret)
- : "r" (addr), "i" (ASI_PL));
+ : "m" (*addr), "r" (addr), "i" (ASI_PL));
return ret;
}
#define __arch_swab32p __arch_swab32p
@@ -31,9 +31,9 @@ static inline __u64 __arch_swab64p(const
{
__u64 ret;
- __asm__ __volatile__ ("ldxa [%1] %2, %0"
+ __asm__ __volatile__ ("ldxa [%2] %3, %0"
: "=r" (ret)
- : "r" (addr), "i" (ASI_PL));
+ : "m" (*addr), "r" (addr), "i" (ASI_PL));
return ret;
}
#define __arch_swab64p __arch_swab64p
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 10/45] inetdevice: fixed signed integer overflow
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (8 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 09/45] sparc64: Fix constraints on swab helpers Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 11/45] ipv4: Fix incorrect error code when adding an unreachable route Greg Kroah-Hartman
` (32 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Vincent BENAYOUN, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vincent BENAYOUN <vincent.benayoun@trust-in-soft.com>
[ Upstream commit 84bc88688e3f6ef843aa8803dbcd90168bb89faf ]
There could be a signed overflow in the following code.
The expression, (32-logmask) is comprised between 0 and 31 included.
It may be equal to 31.
In such a case the left shift will produce a signed integer overflow.
According to the C99 Standard, this is an undefined behavior.
A simple fix is to replace the signed int 1 with the unsigned int 1U.
Signed-off-by: Vincent BENAYOUN <vincent.benayoun@trust-in-soft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/inetdevice.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/inetdevice.h
+++ b/include/linux/inetdevice.h
@@ -261,7 +261,7 @@ static inline void in_dev_put(struct in_
static __inline__ __be32 inet_make_mask(int logmask)
{
if (logmask)
- return htonl(~((1<<(32-logmask))-1));
+ return htonl(~((1U<<(32-logmask))-1));
return 0;
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 11/45] ipv4: Fix incorrect error code when adding an unreachable route
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (9 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 10/45] inetdevice: fixed signed integer overflow Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 12/45] ieee802154: fix error handling in ieee802154fake_probe() Greg Kroah-Hartman
` (31 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Panu Matilainen, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Panu Matilainen <pmatilai@redhat.com>
[ Upstream commit 49dd18ba4615eaa72f15c9087dea1c2ab4744cf5 ]
Trying to add an unreachable route incorrectly returns -ESRCH if
if custom FIB rules are present:
[root@localhost ~]# ip route add 74.125.31.199 dev eth0 via 1.2.3.4
RTNETLINK answers: Network is unreachable
[root@localhost ~]# ip rule add to 55.66.77.88 table 200
[root@localhost ~]# ip route add 74.125.31.199 dev eth0 via 1.2.3.4
RTNETLINK answers: No such process
[root@localhost ~]#
Commit 83886b6b636173b206f475929e58fac75c6f2446 ("[NET]: Change "not found"
return value for rule lookup") changed fib_rules_lookup()
to use -ESRCH as a "not found" code internally, but for user space it
should be translated into -ENETUNREACH. Handle the translation centrally in
ipv4-specific fib_lookup(), leaving the DECnet case alone.
On a related note, commit b7a71b51ee37d919e4098cd961d59a883fd272d8
("ipv4: removed redundant conditional") removed a similar translation from
ip_route_input_slow() prematurely AIUI.
Fixes: b7a71b51ee37 ("ipv4: removed redundant conditional")
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/fib_rules.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -62,6 +62,10 @@ int __fib_lookup(struct net *net, struct
else
res->tclassid = 0;
#endif
+
+ if (err == -ESRCH)
+ err = -ENETUNREACH;
+
return err;
}
EXPORT_SYMBOL_GPL(__fib_lookup);
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 12/45] ieee802154: fix error handling in ieee802154fake_probe()
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (10 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 11/45] ipv4: Fix incorrect error code when adding an unreachable route Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 14/45] pptp: fix stack info leak in pptp_getname() Greg Kroah-Hartman
` (30 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Alexey Khoroshilov, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
[ Upstream commit 8c2dd54485ccee7fc4086611e188478584758c8d ]
In case of any failure ieee802154fake_probe() just calls unregister_netdev().
But it does not look safe to unregister netdevice before it was registered.
The patch implements straightforward resource deallocation in case of
failure in ieee802154fake_probe().
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ieee802154/fakehard.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
--- a/drivers/net/ieee802154/fakehard.c
+++ b/drivers/net/ieee802154/fakehard.c
@@ -376,17 +376,20 @@ static int ieee802154fake_probe(struct p
err = wpan_phy_register(phy);
if (err)
- goto out;
+ goto err_phy_reg;
err = register_netdev(dev);
- if (err < 0)
- goto out;
+ if (err)
+ goto err_netdev_reg;
dev_info(&pdev->dev, "Added ieee802154 HardMAC hardware\n");
return 0;
-out:
- unregister_netdev(dev);
+err_netdev_reg:
+ wpan_phy_unregister(phy);
+err_phy_reg:
+ free_netdev(dev);
+ wpan_phy_free(phy);
return err;
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 14/45] pptp: fix stack info leak in pptp_getname()
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (11 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 12/45] ieee802154: fix error handling in ieee802154fake_probe() Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 15/45] ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg Greg Kroah-Hartman
` (29 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dmitry Kozlov, Mathias Krause,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Krause <minipli@googlemail.com>
[ Upstream commit a5f6fc28d6e6cc379c6839f21820e62262419584 ]
pptp_getname() only partially initializes the stack variable sa,
particularly only fills the pptp part of the sa_addr union. The code
thereby discloses 16 bytes of kernel stack memory via getsockname().
Fix this by memset(0)'ing the union before.
Cc: Dmitry Kozlov <xeb@mail.ru>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ppp/pptp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -506,7 +506,9 @@ static int pptp_getname(struct socket *s
int len = sizeof(struct sockaddr_pppox);
struct sockaddr_pppox sp;
- sp.sa_family = AF_PPPOX;
+ memset(&sp.sa_addr, 0, sizeof(sp.sa_addr));
+
+ sp.sa_family = AF_PPPOX;
sp.sa_protocol = PX_PROTO_PPTP;
sp.sa_addr.pptp = pppox_sk(sock->sk)->proto.pptp.src_addr;
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 15/45] ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (12 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 14/45] pptp: fix stack info leak in pptp_getname() Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 16/45] PCI/MSI: Add device flag indicating that 64-bit MSIs dont work Greg Kroah-Hartman
` (28 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Jiri Bohac, Arnd Bergmann,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Bohac <jbohac@suse.cz>
[ Upstream commit 01462405f0c093b2f8dfddafcadcda6c9e4c5cdf ]
This fixes an old regression introduced by commit
b0d0d915 (ipx: remove the BKL).
When a recvmsg syscall blocks waiting for new data, no data can be sent on the
same socket with sendmsg because ipx_recvmsg() sleeps with the socket locked.
This breaks mars-nwe (NetWare emulator):
- the ncpserv process reads the request using recvmsg
- ncpserv forks and spawns nwconn
- ncpserv calls a (blocking) recvmsg and waits for new requests
- nwconn deadlocks in sendmsg on the same socket
Commit b0d0d915 has simply replaced BKL locking with
lock_sock/release_sock. Unlike now, BKL got unlocked while
sleeping, so a blocking recvmsg did not block a concurrent
sendmsg.
Only keep the socket locked while actually working with the socket data and
release it prior to calling skb_recv_datagram().
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipx/af_ipx.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -1778,6 +1778,7 @@ static int ipx_recvmsg(struct kiocb *ioc
struct ipxhdr *ipx = NULL;
struct sk_buff *skb;
int copied, rc;
+ bool locked = true;
lock_sock(sk);
/* put the autobinding in */
@@ -1804,6 +1805,8 @@ static int ipx_recvmsg(struct kiocb *ioc
if (sock_flag(sk, SOCK_ZAPPED))
goto out;
+ release_sock(sk);
+ locked = false;
skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
flags & MSG_DONTWAIT, &rc);
if (!skb)
@@ -1837,7 +1840,8 @@ static int ipx_recvmsg(struct kiocb *ioc
out_free:
skb_free_datagram(sk, skb);
out:
- release_sock(sk);
+ if (locked)
+ release_sock(sk);
return rc;
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 16/45] PCI/MSI: Add device flag indicating that 64-bit MSIs dont work
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (13 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 15/45] ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg Greg Kroah-Hartman
@ 2014-12-05 22:44 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 17/45] ASoC: sgtl5000: Fix SMALL_POP bit definition Greg Kroah-Hartman
` (27 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Benjamin Herrenschmidt, Bjorn Helgaas
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
commit f144d1496b47e7450f41b767d0d91c724c2198bc upstream.
This can be set by quirks/drivers to be used by the architecture code
that assigns the MSI addresses.
We additionally add verification in the core MSI code that the values
assigned by the architecture do satisfy the limitation in order to fail
gracefully if they don't (ie. the arch hasn't been updated to deal with
that quirk yet).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/pci/msi.c | 26 ++++++++++++++++++++++++++
include/linux/pci.h | 1 +
2 files changed, 27 insertions(+)
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -530,6 +530,20 @@ out_unroll:
return ret;
}
+static int msi_verify_entries(struct pci_dev *dev)
+{
+ struct msi_desc *entry;
+
+ list_for_each_entry(entry, &dev->msi_list, list) {
+ if (!dev->no_64bit_msi || !entry->msg.address_hi)
+ continue;
+ dev_err(&dev->dev, "Device has broken 64-bit MSI but arch"
+ " tried to assign one above 4G\n");
+ return -EIO;
+ }
+ return 0;
+}
+
/**
* msi_capability_init - configure device's MSI capability structure
* @dev: pointer to the pci_dev data structure of MSI device function
@@ -583,6 +597,13 @@ static int msi_capability_init(struct pc
return ret;
}
+ ret = msi_verify_entries(dev);
+ if (ret) {
+ msi_mask_irq(entry, mask, ~mask);
+ free_msi_irqs(dev);
+ return ret;
+ }
+
ret = populate_msi_sysfs(dev);
if (ret) {
msi_mask_irq(entry, mask, ~mask);
@@ -698,6 +719,11 @@ static int msix_capability_init(struct p
if (ret)
goto error;
+ /* Check if all MSI entries honor device restrictions */
+ ret = msi_verify_entries(dev);
+ if (ret)
+ goto error;
+
/*
* Some devices require MSI-X to be enabled before we can touch the
* MSI-X registers. We need to mask all the vectors to prevent
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -310,6 +310,7 @@ struct pci_dev {
unsigned int is_added:1;
unsigned int is_busmaster:1; /* device is busmaster */
unsigned int no_msi:1; /* device may not use msi */
+ unsigned int no_64bit_msi:1; /* device may only use 32-bit MSIs */
unsigned int block_cfg_access:1; /* config space access is blocked */
unsigned int broken_parity_status:1; /* Device generates false positive parity */
unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 17/45] ASoC: sgtl5000: Fix SMALL_POP bit definition
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (14 preceding siblings ...)
2014-12-05 22:44 ` [PATCH 3.10 16/45] PCI/MSI: Add device flag indicating that 64-bit MSIs dont work Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 18/45] ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use Greg Kroah-Hartman
` (26 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Fabio Estevam, Mark Brown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fabio Estevam <fabio.estevam@freescale.com>
commit c251ea7bd7a04f1f2575467e0de76e803cf59149 upstream.
On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound to happen
5 seconds after the end of a playback.
The SMALL_POP bit should fix this, but its definition is incorrect:
according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not
bit 1.
Fix the definition accordingly and enable the bit as intended per the code
comment.
After applying this change, no loud 'click' sound is heard after playback
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/codecs/sgtl5000.c | 3 +--
sound/soc/codecs/sgtl5000.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1317,8 +1317,7 @@ static int sgtl5000_probe(struct snd_soc
/* enable small pop, introduce 400ms delay in turning off */
snd_soc_update_bits(codec, SGTL5000_CHIP_REF_CTRL,
- SGTL5000_SMALL_POP,
- SGTL5000_SMALL_POP);
+ SGTL5000_SMALL_POP, 1);
/* disable short cut detector */
snd_soc_write(codec, SGTL5000_CHIP_SHORT_CTRL, 0);
--- a/sound/soc/codecs/sgtl5000.h
+++ b/sound/soc/codecs/sgtl5000.h
@@ -275,7 +275,7 @@
#define SGTL5000_BIAS_CTRL_MASK 0x000e
#define SGTL5000_BIAS_CTRL_SHIFT 1
#define SGTL5000_BIAS_CTRL_WIDTH 3
-#define SGTL5000_SMALL_POP 0x0001
+#define SGTL5000_SMALL_POP 0
/*
* SGTL5000_CHIP_MIC_CTRL
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 18/45] ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (15 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 17/45] ASoC: sgtl5000: Fix SMALL_POP bit definition Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 19/45] of/base: Fix PowerPC address parsing hack Greg Kroah-Hartman
` (25 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, JS Park, Charles Keepax, Mark Brown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
commit 9da7a5a9fdeeb76b2243f6b473363a7e6147ab6f upstream.
We should not free any buffers associated with writing out coefficients
to the DSP until all the async writes have completed. This patch updates
the out of memory path when allocating a new buffer to include a call to
regmap_async_complete.
Reported-by: JS Park <aitdark.park@samsung.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/codecs/wm_adsp.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -964,6 +964,7 @@ static int wm_adsp_load_coeff(struct wm_
file, blocks, pos - firmware->size);
out_fw:
+ regmap_async_complete(regmap);
release_firmware(firmware);
wm_adsp_buf_free(&buf_list);
out:
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 19/45] of/base: Fix PowerPC address parsing hack
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (16 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 18/45] ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 20/45] powerpc/pseries: Honor the generic "no_64bit_msi" flag Greg Kroah-Hartman
` (24 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Benjamin Herrenschmidt, Grant Likely,
Rob Herring
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
commit 746c9e9f92dde2789908e51a354ba90a1962a2eb upstream.
We have a historical hack that treats missing ranges properties as the
equivalent of an empty one. This is needed for ancient PowerMac "bad"
device-trees, and shouldn't be enabled for any other PowerPC platform,
otherwise we get some nasty layout of devices in sysfs or even
duplication when a set of otherwise identically named devices is
created multiple times under a different parent node with no ranges
property.
This fix is needed for the PowerNV i2c busses to be exposed properly
and will fix a number of other embedded cases.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/of/address.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
--- a/drivers/of/address.c
+++ b/drivers/of/address.c
@@ -334,6 +334,21 @@ static struct of_bus *of_match_bus(struc
return NULL;
}
+static int of_empty_ranges_quirk(void)
+{
+ if (IS_ENABLED(CONFIG_PPC)) {
+ /* To save cycles, we cache the result */
+ static int quirk_state = -1;
+
+ if (quirk_state < 0)
+ quirk_state =
+ of_machine_is_compatible("Power Macintosh") ||
+ of_machine_is_compatible("MacRISC");
+ return quirk_state;
+ }
+ return false;
+}
+
static int of_translate_one(struct device_node *parent, struct of_bus *bus,
struct of_bus *pbus, __be32 *addr,
int na, int ns, int pna, const char *rprop)
@@ -359,12 +374,10 @@ static int of_translate_one(struct devic
* This code is only enabled on powerpc. --gcl
*/
ranges = of_get_property(parent, rprop, &rlen);
-#if !defined(CONFIG_PPC)
- if (ranges == NULL) {
+ if (ranges == NULL && !of_empty_ranges_quirk()) {
pr_err("OF: no ranges; cannot translate\n");
return 1;
}
-#endif /* !defined(CONFIG_PPC) */
if (ranges == NULL || rlen == 0) {
offset = of_read_number(addr, na);
memset(addr, 0, pna * 4);
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 20/45] powerpc/pseries: Honor the generic "no_64bit_msi" flag
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (17 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 19/45] of/base: Fix PowerPC address parsing hack Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 21/45] powerpc/pseries: Fix endiannes issue in RTAS call from xmon Greg Kroah-Hartman
` (23 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Benjamin Herrenschmidt
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
commit 415072a041bf50dbd6d56934ffc0cbbe14c97be8 upstream.
Instead of the arch specific quirk which we are deprecating
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/platforms/pseries/msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -426,7 +426,7 @@ static int rtas_setup_msi_irqs(struct pc
*/
again:
if (type == PCI_CAP_ID_MSI) {
- if (pdn->force_32bit_msi) {
+ if (pdev->no_64bit_msi) {
rc = rtas_change_msi(pdn, RTAS_CHANGE_32MSI_FN, nvec);
if (rc < 0) {
/*
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 21/45] powerpc/pseries: Fix endiannes issue in RTAS call from xmon
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (18 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 20/45] powerpc/pseries: Honor the generic "no_64bit_msi" flag Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 22/45] iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask Greg Kroah-Hartman
` (22 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Laurent Dufour, Michael Ellerman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
commit 3b8a3c01096925a824ed3272601082289d9c23a5 upstream.
On pseries system (LPAR) xmon failed to enter when running in LE mode,
system is hunging. Inititating xmon will lead to such an output on the
console:
SysRq : Entering xmon
cpu 0x15: Vector: 0 at [c0000003f39ffb10]
pc: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
lr: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
sp: c0000003f39ffc70
msr: 8000000000009033
current = 0xc0000003fafa7180
paca = 0xc000000007d75e80 softe: 0 irq_happened: 0x01
pid = 14617, comm = bash
Bad kernel stack pointer fafb4b0 at eca7cc4
cpu 0x15: Vector: 300 (Data Access) at [c000000007f07d40]
pc: 000000000eca7cc4
lr: 000000000eca7c44
sp: fafb4b0
msr: 8000000000001000
dar: 10000000
dsisr: 42000000
current = 0xc0000003fafa7180
paca = 0xc000000007d75e80 softe: 0 irq_happened: 0x01
pid = 14617, comm = bash
cpu 0x15: Exception 300 (Data Access) in xmon, returning to main loop
xmon: WARNING: bad recursive fault on cpu 0x15
The root cause is that xmon is calling RTAS to turn off the surveillance
when entering xmon, and RTAS is requiring big endian parameters.
This patch is byte swapping the RTAS arguments when running in LE mode.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/xmon/xmon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -288,10 +288,10 @@ static inline void disable_surveillance(
args.token = rtas_token("set-indicator");
if (args.token == RTAS_UNKNOWN_SERVICE)
return;
- args.nargs = 3;
- args.nret = 1;
+ args.nargs = cpu_to_be32(3);
+ args.nret = cpu_to_be32(1);
args.rets = &args.args[3];
- args.args[0] = SURVEILLANCE_TOKEN;
+ args.args[0] = cpu_to_be32(SURVEILLANCE_TOKEN);
args.args[1] = 0;
args.args[2] = 0;
enter_rtas(__pa(&args));
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 22/45] iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (19 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 21/45] powerpc/pseries: Fix endiannes issue in RTAS call from xmon Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 23/45] USB: ssu100: fix overrun-error reporting Greg Kroah-Hartman
` (21 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Cristina Ciocan, Jonathan Cameron
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristina Ciocan <cristina.ciocan@intel.com>
commit ccf54555da9a5e91e454b909ca6a5303c7d6b910 upstream.
The direction field is set on 7 bits, thus we need to AND it with 0111 111 mask
in order to retrieve it, that is 0x7F, not 0xCF as it is now.
Fixes: ade7ef7ba (staging:iio: Differential channel handling)
Signed-off-by: Cristina Ciocan <cristina.ciocan@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/iio/events.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/iio/events.h
+++ b/include/linux/iio/events.h
@@ -90,7 +90,7 @@ enum iio_event_direction {
#define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF)
-#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0xCF)
+#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0x7F)
#define IIO_EVENT_CODE_EXTRACT_CHAN_TYPE(mask) ((mask >> 32) & 0xFF)
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 23/45] USB: ssu100: fix overrun-error reporting
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (20 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 22/45] iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 24/45] USB: keyspan: " Greg Kroah-Hartman
` (20 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 75bcbf29c284dd0154c3e895a0bd1ef0e796160e upstream.
Fix reporting of overrun errors, which should only be reported once
using the inserted null character.
Fixes: 6b8f1ca5581b ("USB: ssu100: set tty_flags in ssu100_process_packet")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/ssu100.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
--- a/drivers/usb/serial/ssu100.c
+++ b/drivers/usb/serial/ssu100.c
@@ -495,10 +495,9 @@ static void ssu100_update_lsr(struct usb
if (*tty_flag == TTY_NORMAL)
*tty_flag = TTY_FRAME;
}
- if (lsr & UART_LSR_OE){
+ if (lsr & UART_LSR_OE) {
port->icount.overrun++;
- if (*tty_flag == TTY_NORMAL)
- *tty_flag = TTY_OVERRUN;
+ tty_insert_flip_char(&port->port, 0, TTY_OVERRUN);
}
}
@@ -516,12 +515,8 @@ static void ssu100_process_read_urb(stru
if ((len >= 4) &&
(packet[0] == 0x1b) && (packet[1] == 0x1b) &&
((packet[2] == 0x00) || (packet[2] == 0x01))) {
- if (packet[2] == 0x00) {
+ if (packet[2] == 0x00)
ssu100_update_lsr(port, packet[3], &flag);
- if (flag == TTY_OVERRUN)
- tty_insert_flip_char(&port->port, 0,
- TTY_OVERRUN);
- }
if (packet[2] == 0x01)
ssu100_update_msr(port, packet[3]);
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 24/45] USB: keyspan: fix overrun-error reporting
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (21 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 23/45] USB: ssu100: fix overrun-error reporting Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 25/45] USB: keyspan: fix tty line-status reporting Greg Kroah-Hartman
` (19 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 855515a6d3731242d85850a206f2ec084c917338 upstream.
Fix reporting of overrun errors, which are not associated with a
character. Instead insert a null character and report only once.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/keyspan.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -308,12 +308,13 @@ static void usa26_indat_callback(struct
if ((data[0] & 0x80) == 0) {
/* no errors on individual bytes, only
possible overrun err */
- if (data[0] & RXERROR_OVERRUN)
- err = TTY_OVERRUN;
- else
- err = 0;
+ if (data[0] & RXERROR_OVERRUN) {
+ tty_insert_flip_char(&port->port, 0,
+ TTY_OVERRUN);
+ }
for (i = 1; i < urb->actual_length ; ++i)
- tty_insert_flip_char(&port->port, data[i], err);
+ tty_insert_flip_char(&port->port, data[i],
+ TTY_NORMAL);
} else {
/* some bytes had errors, every byte has status */
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
@@ -796,13 +797,13 @@ static void usa90_indat_callback(struct
if ((data[0] & 0x80) == 0) {
/* no errors on individual bytes, only
possible overrun err*/
- if (data[0] & RXERROR_OVERRUN)
- err = TTY_OVERRUN;
- else
- err = 0;
+ if (data[0] & RXERROR_OVERRUN) {
+ tty_insert_flip_char(&port->port, 0,
+ TTY_OVERRUN);
+ }
for (i = 1; i < urb->actual_length ; ++i)
tty_insert_flip_char(&port->port,
- data[i], err);
+ data[i], TTY_NORMAL);
} else {
/* some bytes had errors, every byte has status */
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 25/45] USB: keyspan: fix tty line-status reporting
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (22 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 24/45] USB: keyspan: " Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 26/45] USB: serial: cp210x: add IDs for CEL MeshConnect USB Stick Greg Kroah-Hartman
` (18 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <johan@kernel.org>
commit 5d1678a33c731b56e245e888fdae5e88efce0997 upstream.
Fix handling of TTY error flags, which are not bitmasks and must
specifically not be ORed together as this prevents the line discipline
from recognising them.
Also insert null characters when reporting overrun errors as these are
not associated with the received character.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/keyspan.c | 76 +++++++++++++++++++++++++++----------------
1 file changed, 48 insertions(+), 28 deletions(-)
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -319,14 +319,19 @@ static void usa26_indat_callback(struct
/* some bytes had errors, every byte has status */
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
for (i = 0; i + 1 < urb->actual_length; i += 2) {
- int stat = data[i], flag = 0;
- if (stat & RXERROR_OVERRUN)
- flag |= TTY_OVERRUN;
- if (stat & RXERROR_FRAMING)
- flag |= TTY_FRAME;
- if (stat & RXERROR_PARITY)
- flag |= TTY_PARITY;
+ int stat = data[i];
+ int flag = TTY_NORMAL;
+
+ if (stat & RXERROR_OVERRUN) {
+ tty_insert_flip_char(&port->port, 0,
+ TTY_OVERRUN);
+ }
/* XXX should handle break (0x10) */
+ if (stat & RXERROR_PARITY)
+ flag = TTY_PARITY;
+ else if (stat & RXERROR_FRAMING)
+ flag = TTY_FRAME;
+
tty_insert_flip_char(&port->port, data[i+1],
flag);
}
@@ -673,14 +678,19 @@ static void usa49_indat_callback(struct
} else {
/* some bytes had errors, every byte has status */
for (i = 0; i + 1 < urb->actual_length; i += 2) {
- int stat = data[i], flag = 0;
- if (stat & RXERROR_OVERRUN)
- flag |= TTY_OVERRUN;
- if (stat & RXERROR_FRAMING)
- flag |= TTY_FRAME;
- if (stat & RXERROR_PARITY)
- flag |= TTY_PARITY;
+ int stat = data[i];
+ int flag = TTY_NORMAL;
+
+ if (stat & RXERROR_OVERRUN) {
+ tty_insert_flip_char(&port->port, 0,
+ TTY_OVERRUN);
+ }
/* XXX should handle break (0x10) */
+ if (stat & RXERROR_PARITY)
+ flag = TTY_PARITY;
+ else if (stat & RXERROR_FRAMING)
+ flag = TTY_FRAME;
+
tty_insert_flip_char(&port->port, data[i+1],
flag);
}
@@ -737,15 +747,19 @@ static void usa49wg_indat_callback(struc
*/
for (x = 0; x + 1 < len &&
i + 1 < urb->actual_length; x += 2) {
- int stat = data[i], flag = 0;
+ int stat = data[i];
+ int flag = TTY_NORMAL;
- if (stat & RXERROR_OVERRUN)
- flag |= TTY_OVERRUN;
- if (stat & RXERROR_FRAMING)
- flag |= TTY_FRAME;
- if (stat & RXERROR_PARITY)
- flag |= TTY_PARITY;
+ if (stat & RXERROR_OVERRUN) {
+ tty_insert_flip_char(&port->port, 0,
+ TTY_OVERRUN);
+ }
/* XXX should handle break (0x10) */
+ if (stat & RXERROR_PARITY)
+ flag = TTY_PARITY;
+ else if (stat & RXERROR_FRAMING)
+ flag = TTY_FRAME;
+
tty_insert_flip_char(&port->port, data[i+1],
flag);
i += 2;
@@ -808,14 +822,20 @@ static void usa90_indat_callback(struct
/* some bytes had errors, every byte has status */
dev_dbg(&port->dev, "%s - RX error!!!!\n", __func__);
for (i = 0; i + 1 < urb->actual_length; i += 2) {
- int stat = data[i], flag = 0;
- if (stat & RXERROR_OVERRUN)
- flag |= TTY_OVERRUN;
- if (stat & RXERROR_FRAMING)
- flag |= TTY_FRAME;
- if (stat & RXERROR_PARITY)
- flag |= TTY_PARITY;
+ int stat = data[i];
+ int flag = TTY_NORMAL;
+
+ if (stat & RXERROR_OVERRUN) {
+ tty_insert_flip_char(
+ &port->port, 0,
+ TTY_OVERRUN);
+ }
/* XXX should handle break (0x10) */
+ if (stat & RXERROR_PARITY)
+ flag = TTY_PARITY;
+ else if (stat & RXERROR_FRAMING)
+ flag = TTY_FRAME;
+
tty_insert_flip_char(&port->port,
data[i+1], flag);
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 26/45] USB: serial: cp210x: add IDs for CEL MeshConnect USB Stick
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (23 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 25/45] USB: keyspan: fix tty line-status reporting Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 27/45] usb: serial: ftdi_sio: add PIDs for Matrix Orbital products Greg Kroah-Hartman
` (17 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Preston Fick, Johan Hovold
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Preston Fick <pffick@gmail.com>
commit ffcfe30ebd8dd703d0fc4324ffe56ea21f5479f4 upstream.
Signed-off-by: Preston Fick <pffick@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/cp210x.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -120,6 +120,7 @@ static const struct usb_device_id id_tab
{ USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */
{ USB_DEVICE(0x10C4, 0x8664) }, /* AC-Services CAN-IF */
{ USB_DEVICE(0x10C4, 0x8665) }, /* AC-Services OBD-IF */
+ { USB_DEVICE(0x10C4, 0x8875) }, /* CEL MeshConnect USB Stick */
{ USB_DEVICE(0x10C4, 0x88A4) }, /* MMB Networks ZigBee USB Device */
{ USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */
{ USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 27/45] usb: serial: ftdi_sio: add PIDs for Matrix Orbital products
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (24 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 26/45] USB: serial: cp210x: add IDs for CEL MeshConnect USB Stick Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 28/45] usb-quirks: Add reset-resume quirk for MS Wireless Laser Mouse 6000 Greg Kroah-Hartman
` (16 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Troy Clark, Johan Hovold
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Troy Clark <tclark@matrixorbital.ca>
commit 204ec6e07ea7aff863df0f7c53301f9cbbfbb9d3 upstream.
Add PIDs for new Matrix Orbital GTT series products.
Signed-off-by: Troy Clark <tclark@matrixorbital.ca>
[johan: shorten commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/ftdi_sio.c | 33 ++++++++++++++++++++++++++++++++
drivers/usb/serial/ftdi_sio_ids.h | 39 ++++++++++++++++++++++++++++++++++----
2 files changed, 68 insertions(+), 4 deletions(-)
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -486,6 +486,39 @@ static struct usb_device_id id_table_com
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FD_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FE_PID) },
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_01FF_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_4701_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9300_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9301_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9302_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9303_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9304_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9305_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9306_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9307_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9308_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9309_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930A_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930B_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930C_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930D_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930E_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_930F_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9310_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9311_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9312_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9313_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9314_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9315_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9316_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9317_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9318_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_9319_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931A_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931B_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931C_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931D_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931E_PID) },
+ { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_931F_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_PERLE_ULTRAPORT_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_PIEGROUP_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_TNC_X_PID) },
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -926,8 +926,8 @@
#define BAYER_CONTOUR_CABLE_PID 0x6001
/*
- * The following are the values for the Matrix Orbital FTDI Range
- * Anything in this range will use an FT232RL.
+ * Matrix Orbital Intelligent USB displays.
+ * http://www.matrixorbital.com
*/
#define MTXORB_VID 0x1B3D
#define MTXORB_FTDI_RANGE_0100_PID 0x0100
@@ -1186,8 +1186,39 @@
#define MTXORB_FTDI_RANGE_01FD_PID 0x01FD
#define MTXORB_FTDI_RANGE_01FE_PID 0x01FE
#define MTXORB_FTDI_RANGE_01FF_PID 0x01FF
-
-
+#define MTXORB_FTDI_RANGE_4701_PID 0x4701
+#define MTXORB_FTDI_RANGE_9300_PID 0x9300
+#define MTXORB_FTDI_RANGE_9301_PID 0x9301
+#define MTXORB_FTDI_RANGE_9302_PID 0x9302
+#define MTXORB_FTDI_RANGE_9303_PID 0x9303
+#define MTXORB_FTDI_RANGE_9304_PID 0x9304
+#define MTXORB_FTDI_RANGE_9305_PID 0x9305
+#define MTXORB_FTDI_RANGE_9306_PID 0x9306
+#define MTXORB_FTDI_RANGE_9307_PID 0x9307
+#define MTXORB_FTDI_RANGE_9308_PID 0x9308
+#define MTXORB_FTDI_RANGE_9309_PID 0x9309
+#define MTXORB_FTDI_RANGE_930A_PID 0x930A
+#define MTXORB_FTDI_RANGE_930B_PID 0x930B
+#define MTXORB_FTDI_RANGE_930C_PID 0x930C
+#define MTXORB_FTDI_RANGE_930D_PID 0x930D
+#define MTXORB_FTDI_RANGE_930E_PID 0x930E
+#define MTXORB_FTDI_RANGE_930F_PID 0x930F
+#define MTXORB_FTDI_RANGE_9310_PID 0x9310
+#define MTXORB_FTDI_RANGE_9311_PID 0x9311
+#define MTXORB_FTDI_RANGE_9312_PID 0x9312
+#define MTXORB_FTDI_RANGE_9313_PID 0x9313
+#define MTXORB_FTDI_RANGE_9314_PID 0x9314
+#define MTXORB_FTDI_RANGE_9315_PID 0x9315
+#define MTXORB_FTDI_RANGE_9316_PID 0x9316
+#define MTXORB_FTDI_RANGE_9317_PID 0x9317
+#define MTXORB_FTDI_RANGE_9318_PID 0x9318
+#define MTXORB_FTDI_RANGE_9319_PID 0x9319
+#define MTXORB_FTDI_RANGE_931A_PID 0x931A
+#define MTXORB_FTDI_RANGE_931B_PID 0x931B
+#define MTXORB_FTDI_RANGE_931C_PID 0x931C
+#define MTXORB_FTDI_RANGE_931D_PID 0x931D
+#define MTXORB_FTDI_RANGE_931E_PID 0x931E
+#define MTXORB_FTDI_RANGE_931F_PID 0x931F
/*
* The Mobility Lab (TML)
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 28/45] usb-quirks: Add reset-resume quirk for MS Wireless Laser Mouse 6000
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (25 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 27/45] usb: serial: ftdi_sio: add PIDs for Matrix Orbital products Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 29/45] USB: xhci: dont start a halted endpoint before its new dequeue is set Greg Kroah-Hartman
` (15 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans de Goede
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <hdegoede@redhat.com>
commit 263e80b43559a6103e178a9176938ce171b23872 upstream.
This wireless mouse receiver needs a reset-resume quirk to properly come
out of reset.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1165206
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/core/quirks.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -43,6 +43,9 @@ static const struct usb_device_id usb_qu
/* Creative SB Audigy 2 NX */
{ USB_DEVICE(0x041e, 0x3020), .driver_info = USB_QUIRK_RESET_RESUME },
+ /* Microsoft Wireless Laser Mouse 6000 Receiver */
+ { USB_DEVICE(0x045e, 0x00e1), .driver_info = USB_QUIRK_RESET_RESUME },
+
/* Microsoft LifeCam-VX700 v2.0 */
{ USB_DEVICE(0x045e, 0x0770), .driver_info = USB_QUIRK_RESET_RESUME },
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 29/45] USB: xhci: dont start a halted endpoint before its new dequeue is set
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (26 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 28/45] usb-quirks: Add reset-resume quirk for MS Wireless Laser Mouse 6000 Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 30/45] can: esd_usb2: fix memory leak on disconnect Greg Kroah-Hartman
` (14 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Felipe Balbi, Mathias Nyman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mathias Nyman <mathias.nyman@linux.intel.com>
commit c3492dbfa1050debf23a5b5cd2bc7514c5b37896 upstream.
A halted endpoint ring must first be reset, then move the ring
dequeue pointer past the problematic TRB. If we start the ring too
early after reset, but before moving the dequeue pointer we
will end up executing the same problematic TRB again.
As we always issue a set transfer dequeue command after a reset
endpoint command we can skip starting endpoint rings at reset endpoint
command completion.
Without this fix we end up trying to handle the same faulty TD for
contol endpoints. causing timeout, and failing testusb ctrl_out write
tests.
Fixes: e9df17e (USB: xhci: Correct assumptions about number of rings per endpoint.)
Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/host/xhci-ring.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1178,9 +1178,8 @@ static void handle_reset_ep_completion(s
false);
xhci_ring_cmd_db(xhci);
} else {
- /* Clear our internal halted state and restart the ring(s) */
+ /* Clear our internal halted state */
xhci->devs[slot_id]->eps[ep_index].ep_state &= ~EP_HALTED;
- ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
}
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 30/45] can: esd_usb2: fix memory leak on disconnect
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (27 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 29/45] USB: xhci: dont start a halted endpoint before its new dequeue is set Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 31/45] ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devices Greg Kroah-Hartman
` (13 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Alexey Khoroshilov, Matthias Fuchs,
Marc Kleine-Budde
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
commit efbd50d2f62fc1f69a3dcd153e63ba28cc8eb27f upstream.
It seems struct esd_usb2 dev is not deallocated on disconnect. The patch adds
the missing deallocation.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/can/usb/esd_usb2.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/can/usb/esd_usb2.c
+++ b/drivers/net/can/usb/esd_usb2.c
@@ -1132,6 +1132,7 @@ static void esd_usb2_disconnect(struct u
}
}
unlink_all_urbs(dev);
+ kfree(dev);
}
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 31/45] ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devices
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (28 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 30/45] can: esd_usb2: fix memory leak on disconnect Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 32/45] ARM: 8216/1: xscale: correct auxiliary register in suspend/resume Greg Kroah-Hartman
` (12 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jurgen Kramer, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jurgen Kramer <gtmkramer@xs4all.nl>
commit 6e84a8d7ac3ba246ef44e313e92bc16a1da1b04a upstream.
This patch adds a USB control message delay quirk for a few specific Marantz/Denon
devices. Without the delay the DACs will not work properly and produces the
following type of messages:
Nov 15 10:09:21 orwell kernel: [ 91.342880] usb 3-13: clock source 41 is not valid, cannot use
Nov 15 10:09:21 orwell kernel: [ 91.343775] usb 3-13: clock source 41 is not valid, cannot use
There are likely other Marantz/Denon devices using the same USB module which exhibit the
same problems. But as this cannot be verified I limited the patch to the devices
I could test.
The following two devices are covered by this path:
- Marantz SA-14S1
- Marantz HD-DAC1
Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/usb/quirks.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -914,6 +914,20 @@ void snd_usb_ctl_msg_quirk(struct usb_de
if ((le16_to_cpu(dev->descriptor.idVendor) == 0x23ba) &&
(requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
mdelay(20);
+
+ /* Marantz/Denon devices with USB DAC functionality need a delay
+ * after each class compliant request
+ */
+ if ((le16_to_cpu(dev->descriptor.idVendor) == 0x154e) &&
+ (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) {
+
+ switch (le16_to_cpu(dev->descriptor.idProduct)) {
+ case 0x3005: /* Marantz HD-DAC1 */
+ case 0x3006: /* Marantz SA-14S1 */
+ mdelay(20);
+ break;
+ }
+ }
}
/*
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 32/45] ARM: 8216/1: xscale: correct auxiliary register in suspend/resume
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (29 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 31/45] ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devices Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 33/45] ARM: 8222/1: mvebu: enable strex backoff delay Greg Kroah-Hartman
` (11 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Robert Jarzmik,
Dmitry Eremin-Solenikov, Russell King
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
commit ef59a20ba375aeb97b3150a118318884743452a8 upstream.
According to the manuals I have, XScale auxiliary register should be
reached with opc_2 = 1 instead of crn = 1. cpu_xscale_proc_init
correctly uses c1, c0, 1 arguments, but cpu_xscale_do_suspend and
cpu_xscale_do_resume use c1, c1, 0. Correct suspend/resume functions to
also use c1, c0, 1.
The issue was primarily noticed thanks to qemu reporing "unsupported
instruction" on the pxa suspend path. Confirmed in PXA210/250 and PXA255
XScale Core manuals and in PXA270 and PXA320 Developers Guides.
Harware tested by me on tosa (pxa255). Robert confirmed on pxa270 board.
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/mm/proc-xscale.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -535,7 +535,7 @@ ENTRY(cpu_xscale_do_suspend)
mrc p15, 0, r5, c15, c1, 0 @ CP access reg
mrc p15, 0, r6, c13, c0, 0 @ PID
mrc p15, 0, r7, c3, c0, 0 @ domain ID
- mrc p15, 0, r8, c1, c1, 0 @ auxiliary control reg
+ mrc p15, 0, r8, c1, c0, 1 @ auxiliary control reg
mrc p15, 0, r9, c1, c0, 0 @ control reg
bic r4, r4, #2 @ clear frequency change bit
stmia r0, {r4 - r9} @ store cp regs
@@ -552,7 +552,7 @@ ENTRY(cpu_xscale_do_resume)
mcr p15, 0, r6, c13, c0, 0 @ PID
mcr p15, 0, r7, c3, c0, 0 @ domain ID
mcr p15, 0, r1, c2, c0, 0 @ translation table base addr
- mcr p15, 0, r8, c1, c1, 0 @ auxiliary control reg
+ mcr p15, 0, r8, c1, c0, 1 @ auxiliary control reg
mov r0, r9 @ control register
b cpu_resume_mmu
ENDPROC(cpu_xscale_do_resume)
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 33/45] ARM: 8222/1: mvebu: enable strex backoff delay
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (30 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 32/45] ARM: 8216/1: xscale: correct auxiliary register in suspend/resume Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 34/45] Input: xpad - use proper endpoint type Greg Kroah-Hartman
` (10 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Nadav Haklai, Thomas Petazzoni,
Gregory CLEMENT, Jason Cooper, Russell King
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
commit 995ab5189d1d7264e79e665dfa032a19b3ac646e upstream.
Under extremely rare conditions, in an MPCore node consisting of at
least 3 CPUs, two CPUs trying to perform a STREX to data on the same
shared cache line can enter a livelock situation.
This patch enables the HW mechanism that overcomes the bug. This fixes
the incorrect setup of the STREX backoff delay bit due to a wrong
description in the specification.
Note that enabling the STREX backoff delay mechanism is done by
leaving the bit *cleared*, while the bit was currently being set by
the proc-v7.S code.
[Thomas: adapt to latest mainline, slightly reword the commit log, add
stable markers.]
Fixes: de4901933f6d ("arm: mm: Add support for PJ4B cpu and init routines")
Signed-off-by: Nadav Haklai <nadavh@marvell.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/mm/proc-v7.S | 2 --
1 file changed, 2 deletions(-)
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -201,7 +201,6 @@ __v7_pj4b_setup:
/* Auxiliary Debug Modes Control 1 Register */
#define PJ4B_STATIC_BP (1 << 2) /* Enable Static BP */
#define PJ4B_INTER_PARITY (1 << 8) /* Disable Internal Parity Handling */
-#define PJ4B_BCK_OFF_STREX (1 << 5) /* Enable the back off of STREX instr */
#define PJ4B_CLEAN_LINE (1 << 16) /* Disable data transfer for clean line */
/* Auxiliary Debug Modes Control 2 Register */
@@ -224,7 +223,6 @@ __v7_pj4b_setup:
/* Auxiliary Debug Modes Control 1 Register */
mrc p15, 1, r0, c15, c1, 1
orr r0, r0, #PJ4B_CLEAN_LINE
- orr r0, r0, #PJ4B_BCK_OFF_STREX
orr r0, r0, #PJ4B_INTER_PARITY
bic r0, r0, #PJ4B_STATIC_BP
mcr p15, 1, r0, c15, c1, 1
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 34/45] Input: xpad - use proper endpoint type
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (31 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 33/45] ARM: 8222/1: mvebu: enable strex backoff delay Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 35/45] srp-target: Retry when QP creation fails with ENOMEM Greg Kroah-Hartman
` (9 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Pierre-Loup A. Griffais,
Dmitry Torokhov
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit a1f9a4072655843fc03186acbad65990cc05dd2d upstream.
The xpad wireless endpoint is not a bulk endpoint on my devices, but
rather an interrupt one, so the USB core complains when it is submitted.
I'm guessing that the author really did mean that this should be an
interrupt urb, but as there are a zillion different xpad devices out
there, let's cover out bases and handle both bulk and interrupt
endpoints just as easily.
Signed-off-by: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/input/joystick/xpad.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1002,9 +1002,19 @@ static int xpad_probe(struct usb_interfa
}
ep_irq_in = &intf->cur_altsetting->endpoint[1].desc;
- usb_fill_bulk_urb(xpad->bulk_out, udev,
- usb_sndbulkpipe(udev, ep_irq_in->bEndpointAddress),
- xpad->bdata, XPAD_PKT_LEN, xpad_bulk_out, xpad);
+ if (usb_endpoint_is_bulk_out(ep_irq_in)) {
+ usb_fill_bulk_urb(xpad->bulk_out, udev,
+ usb_sndbulkpipe(udev,
+ ep_irq_in->bEndpointAddress),
+ xpad->bdata, XPAD_PKT_LEN,
+ xpad_bulk_out, xpad);
+ } else {
+ usb_fill_int_urb(xpad->bulk_out, udev,
+ usb_sndintpipe(udev,
+ ep_irq_in->bEndpointAddress),
+ xpad->bdata, XPAD_PKT_LEN,
+ xpad_bulk_out, xpad, 0);
+ }
/*
* Submit the int URB immediately rather than waiting for open
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 35/45] srp-target: Retry when QP creation fails with ENOMEM
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (32 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 34/45] Input: xpad - use proper endpoint type Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 36/45] target: Dont call TFO->write_pending if data_length == 0 Greg Kroah-Hartman
` (8 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Mark Lehrer, Bart Van Assche,
Sagi Grimberg, Nicholas Bellinger
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bart Van Assche <bvanassche@acm.org>
commit ab477c1ff5e0a744c072404bf7db51bfe1f05b6e upstream.
It is not guaranteed to that srp_sq_size is supported
by the HCA. So if we failed to create the QP with ENOMEM,
try with a smaller srp_sq_size. Keep it up until we hit
MIN_SRPT_SQ_SIZE, then fail the connection.
Reported-by: Mark Lehrer <lehrer@gmail.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/ulp/srpt/ib_srpt.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -2101,6 +2101,7 @@ static int srpt_create_ch_ib(struct srpt
if (!qp_init)
goto out;
+retry:
ch->cq = ib_create_cq(sdev->device, srpt_completion, NULL, ch,
ch->rq_size + srp_sq_size, 0);
if (IS_ERR(ch->cq)) {
@@ -2124,6 +2125,13 @@ static int srpt_create_ch_ib(struct srpt
ch->qp = ib_create_qp(sdev->pd, qp_init);
if (IS_ERR(ch->qp)) {
ret = PTR_ERR(ch->qp);
+ if (ret == -ENOMEM) {
+ srp_sq_size /= 2;
+ if (srp_sq_size >= MIN_SRPT_SQ_SIZE) {
+ ib_destroy_cq(ch->cq);
+ goto retry;
+ }
+ }
printk(KERN_ERR "failed to create_qp ret= %d\n", ret);
goto err_destroy_cq;
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 36/45] target: Dont call TFO->write_pending if data_length == 0
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (33 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 35/45] srp-target: Retry when QP creation fails with ENOMEM Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 37/45] iser-target: Handle DEVICE_REMOVAL event on network portal listener correctly Greg Kroah-Hartman
` (7 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Craig Watson, Roland Dreier,
Nicholas Bellinger
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roland Dreier <roland@purestorage.com>
commit 885e7b0e181c14e4d0ddd26c688bad2b84c1ada9 upstream.
If an initiator sends a zero-length command (e.g. TEST UNIT READY) but
sets the transfer direction in the transport layer to indicate a
data-out phase, we still shouldn't try to transfer data. At best it's
a NOP, and depending on the transport, we might crash on an
uninitialized sg list.
Reported-by: Craig Watson <craig.watson@vanguard-rugged.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/target_core_transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2128,7 +2128,7 @@ transport_generic_new_cmd(struct se_cmd
* and let it call back once the write buffers are ready.
*/
target_add_to_state_list(cmd);
- if (cmd->data_direction != DMA_TO_DEVICE) {
+ if (cmd->data_direction != DMA_TO_DEVICE || cmd->data_length == 0) {
target_execute_cmd(cmd);
return 0;
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 37/45] iser-target: Handle DEVICE_REMOVAL event on network portal listener correctly
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (34 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 36/45] target: Dont call TFO->write_pending if data_length == 0 Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 38/45] spi: dw: Fix dynamic speed change Greg Kroah-Hartman
` (6 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Sagi Grimberg, Nicholas Bellinger
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sagi Grimberg <sagig@dev.mellanox.co.il>
commit 3b726ae2de02a406cc91903f80132daee37b6f1b upstream.
In this case the cm_id->context is the isert_np, and the cm_id->qp
is NULL, so use that to distinct the cases.
Since we don't expect any other events on this cm_id we can
just return -1 for explicit termination of the cm_id by the
cma layer.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/infiniband/ulp/isert/ib_isert.c | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -585,14 +585,25 @@ wake_up:
complete(&isert_conn->conn_wait);
}
-static void
+static int
isert_disconnected_handler(struct rdma_cm_id *cma_id, bool disconnect)
{
- struct isert_conn *isert_conn = (struct isert_conn *)cma_id->context;
+ struct isert_conn *isert_conn;
+
+ if (!cma_id->qp) {
+ struct isert_np *isert_np = cma_id->context;
+
+ isert_np->np_cm_id = NULL;
+ return -1;
+ }
+
+ isert_conn = (struct isert_conn *)cma_id->context;
isert_conn->disconnect = disconnect;
INIT_WORK(&isert_conn->conn_logout_work, isert_disconnect_work);
schedule_work(&isert_conn->conn_logout_work);
+
+ return 0;
}
static int
@@ -607,6 +618,9 @@ isert_cma_handler(struct rdma_cm_id *cma
switch (event->event) {
case RDMA_CM_EVENT_CONNECT_REQUEST:
ret = isert_connect_request(cma_id, event);
+ if (ret)
+ pr_err("isert_cma_handler failed RDMA_CM_EVENT: 0x%08x %d\n",
+ event->event, ret);
break;
case RDMA_CM_EVENT_ESTABLISHED:
isert_connected_handler(cma_id);
@@ -616,7 +630,7 @@ isert_cma_handler(struct rdma_cm_id *cma
case RDMA_CM_EVENT_DEVICE_REMOVAL: /* FALLTHRU */
disconnect = true;
case RDMA_CM_EVENT_TIMEWAIT_EXIT: /* FALLTHRU */
- isert_disconnected_handler(cma_id, disconnect);
+ ret = isert_disconnected_handler(cma_id, disconnect);
break;
case RDMA_CM_EVENT_CONNECT_ERROR:
default:
@@ -624,12 +638,6 @@ isert_cma_handler(struct rdma_cm_id *cma
break;
}
- if (ret != 0) {
- pr_err("isert_cma_handler failed RDMA_CM_EVENT: 0x%08x %d\n",
- event->event, ret);
- dump_stack();
- }
-
return ret;
}
@@ -2233,7 +2241,8 @@ isert_free_np(struct iscsi_np *np)
{
struct isert_np *isert_np = (struct isert_np *)np->np_context;
- rdma_destroy_id(isert_np->np_cm_id);
+ if (isert_np->np_cm_id)
+ rdma_destroy_id(isert_np->np_cm_id);
np->np_context = NULL;
kfree(isert_np);
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 38/45] spi: dw: Fix dynamic speed change.
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (35 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 37/45] iser-target: Handle DEVICE_REMOVAL event on network portal listener correctly Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 40/45] rt2x00: do not align payload on modern H/W Greg Kroah-Hartman
` (5 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Vlastimil Setka, Thor Thayer,
Mark Brown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thor Thayer <tthayer@opensource.altera.com>
commit 0a8727e69778683495058852f783eeda141a754e upstream.
An IOCTL call that calls spi_setup() and then dw_spi_setup() will
overwrite the persisted last transfer speed. On each transfer, the
SPI speed is compared to the last transfer speed to determine if the
clock divider registers need to be updated (did the speed change?).
This bug was observed with the spidev driver using spi-config to
update the max transfer speed.
This fix: Don't overwrite the persisted last transaction clock speed
when updating the SPI parameters in dw_spi_setup(). On the next
transaction, the new speed won't match the persisted last speed
and the hardware registers will be updated.
On initialization, the persisted last transaction clock
speed will be 0 but will be updated after the first SPI
transaction.
Move zeroed clock divider check into clock change test because
chip->clk_div is zero on startup and would cause a divide-by-zero
error. The calculation was wrong as well (can't support odd #).
Reported-by: Vlastimil Setka <setka@vsis.cz>
Signed-off-by: Vlastimil Setka <setka@vsis.cz>
Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/spi/spi-dw.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -394,9 +394,6 @@ static void pump_transfers(unsigned long
chip = dws->cur_chip;
spi = message->spi;
- if (unlikely(!chip->clk_div))
- chip->clk_div = dws->max_freq / chip->speed_hz;
-
if (message->state == ERROR_STATE) {
message->status = -EIO;
goto early_exit;
@@ -438,7 +435,7 @@ static void pump_transfers(unsigned long
if (transfer->speed_hz) {
speed = chip->speed_hz;
- if (transfer->speed_hz != speed) {
+ if ((transfer->speed_hz != speed) || (!chip->clk_div)) {
speed = transfer->speed_hz;
if (speed > dws->max_freq) {
printk(KERN_ERR "MRST SPI0: unsupported"
@@ -677,7 +674,6 @@ static int dw_spi_setup(struct spi_devic
dev_err(&spi->dev, "No max speed HZ parameter\n");
return -EINVAL;
}
- chip->speed_hz = spi->max_speed_hz;
chip->tmode = 0; /* Tx & Rx */
/* Default SPI mode is SCPOL = 0, SCPH = 0 */
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 40/45] rt2x00: do not align payload on modern H/W
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (36 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 38/45] spi: dw: Fix dynamic speed change Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 41/45] nfsd: Fix slot wake up race in the nfsv4.1 callback code Greg Kroah-Hartman
` (4 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Henrik Asp, Stanislaw Gruszka,
John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanislaw Gruszka <sgruszka@redhat.com>
commit cfd9167af14eb4ec21517a32911d460083ee3d59 upstream.
RT2800 and newer hardware require padding between header and payload if
header length is not multiple of 4.
For historical reasons we also align payload to to 4 bytes boundary, but
such alignment is not needed on modern H/W.
Patch fixes skb_under_panic problems reported from time to time:
https://bugzilla.kernel.org/show_bug.cgi?id=84911
https://bugzilla.kernel.org/show_bug.cgi?id=72471
http://marc.info/?l=linux-wireless&m=139108549530402&w=2
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1087591
Panic happened because we eat 4 bytes of skb headroom on each
(re)transmission when sending frame without the payload and the header
length not being multiple of 4 (i.e. QoS header has 26 bytes). On such
case because paylad_aling=2 is bigger than header_align=0 we increase
header_align by 4 bytes. To prevent that we could change the check to:
if (payload_length && payload_align > header_align)
header_align += 4;
but not aligning payload at all is more effective and alignment is not
really needed by H/W (that has been tested on OpenWrt project for few
years now).
Reported-and-tested-by: Antti S. Lankila <alankila@bel.fi>
Debugged-by: Antti S. Lankila <alankila@bel.fi>
Reported-by: Henrik Asp <solenskiner@gmail.com>
Originally-From: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rt2x00/rt2x00queue.c | 50 +++++++-----------------------
1 file changed, 12 insertions(+), 38 deletions(-)
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -160,55 +160,29 @@ void rt2x00queue_align_frame(struct sk_b
skb_trim(skb, frame_length);
}
-void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length)
+/*
+ * H/W needs L2 padding between the header and the paylod if header size
+ * is not 4 bytes aligned.
+ */
+void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int hdr_len)
{
- unsigned int payload_length = skb->len - header_length;
- unsigned int header_align = ALIGN_SIZE(skb, 0);
- unsigned int payload_align = ALIGN_SIZE(skb, header_length);
- unsigned int l2pad = payload_length ? L2PAD_SIZE(header_length) : 0;
-
- /*
- * Adjust the header alignment if the payload needs to be moved more
- * than the header.
- */
- if (payload_align > header_align)
- header_align += 4;
+ unsigned int l2pad = (skb->len > hdr_len) ? L2PAD_SIZE(hdr_len) : 0;
- /* There is nothing to do if no alignment is needed */
- if (!header_align)
+ if (!l2pad)
return;
- /* Reserve the amount of space needed in front of the frame */
- skb_push(skb, header_align);
-
- /*
- * Move the header.
- */
- memmove(skb->data, skb->data + header_align, header_length);
-
- /* Move the payload, if present and if required */
- if (payload_length && payload_align)
- memmove(skb->data + header_length + l2pad,
- skb->data + header_length + l2pad + payload_align,
- payload_length);
-
- /* Trim the skb to the correct size */
- skb_trim(skb, header_length + l2pad + payload_length);
+ skb_push(skb, l2pad);
+ memmove(skb->data, skb->data + l2pad, hdr_len);
}
-void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length)
+void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int hdr_len)
{
- /*
- * L2 padding is only present if the skb contains more than just the
- * IEEE 802.11 header.
- */
- unsigned int l2pad = (skb->len > header_length) ?
- L2PAD_SIZE(header_length) : 0;
+ unsigned int l2pad = (skb->len > hdr_len) ? L2PAD_SIZE(hdr_len) : 0;
if (!l2pad)
return;
- memmove(skb->data + l2pad, skb->data, header_length);
+ memmove(skb->data + l2pad, skb->data, hdr_len);
skb_pull(skb, l2pad);
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 41/45] nfsd: Fix slot wake up race in the nfsv4.1 callback code
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (37 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 40/45] rt2x00: do not align payload on modern H/W Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 43/45] bnx2fc: do not add shared skbs to the fcoe_rx_list Greg Kroah-Hartman
` (3 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Trond Myklebust, J. Bruce Fields
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <trond.myklebust@primarydata.com>
commit c6c15e1ed303ffc47e696ea1c9a9df1761c1f603 upstream.
The currect code for nfsd41_cb_get_slot() and nfsd4_cb_done() has no
locking in order to guarantee atomicity, and so allows for races of
the form.
Task 1 Task 2
====== ======
if (test_and_set_bit(0) != 0) {
clear_bit(0)
rpc_wake_up_next(queue)
rpc_sleep_on(queue)
return false;
}
This patch breaks the race condition by adding a retest of the bit
after the call to rpc_sleep_on().
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/nfsd/nfs4callback.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -784,8 +784,12 @@ static bool nfsd41_cb_get_slot(struct nf
{
if (test_and_set_bit(0, &clp->cl_cb_slot_busy) != 0) {
rpc_sleep_on(&clp->cl_cb_waitq, task, NULL);
- dprintk("%s slot is busy\n", __func__);
- return false;
+ /* Race breaker */
+ if (test_and_set_bit(0, &clp->cl_cb_slot_busy) != 0) {
+ dprintk("%s slot is busy\n", __func__);
+ return false;
+ }
+ rpc_wake_up_queued_task(&clp->cl_cb_waitq, task);
}
return true;
}
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 43/45] bnx2fc: do not add shared skbs to the fcoe_rx_list
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (38 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 41/45] nfsd: Fix slot wake up race in the nfsv4.1 callback code Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 44/45] powerpc/powernv: Honor the generic "no_64bit_msi" flag Greg Kroah-Hartman
` (2 subsequent siblings)
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Maurizio Lombardi, Chad Dupuis,
Christoph Hellwig
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maurizio Lombardi <mlombard@redhat.com>
commit 01a4cc4d0cd6a836c7b923760e8eb1cbb6a47258 upstream.
In some cases, the fcoe_rx_list may contains multiple instances
of the same skb (the so called "shared skbs").
the bnx2fc_l2_rcv thread is a loop that extracts a skb from the list,
modifies (and destroys) its content and then proceed to the next one.
The problem is that if the skb is shared, the remaining instances will
be corrupted.
The solution is to use skb_share_check() before adding the skb to the
fcoe_rx_list.
[ 6286.808725] ------------[ cut here ]------------
[ 6286.808729] WARNING: at include/scsi/fc_frame.h:173 bnx2fc_l2_rcv_thread+0x425/0x450 [bnx2fc]()
[ 6286.808748] Modules linked in: bnx2x(-) mdio dm_service_time bnx2fc cnic uio fcoe libfcoe 8021q garp stp mrp libfc llc scsi_transport_fc scsi_tgt sg iTCO_wdt iTCO_vendor_support coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul crc32c_intel e1000e ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper ptp cryptd hpilo serio_raw hpwdt lpc_ich pps_core ipmi_si pcspkr mfd_core ipmi_msghandler shpchp pcc_cpufreq mperf nfsd auth_rpcgss nfs_acl lockd sunrpc dm_multipath xfs libcrc32c ata_generic pata_acpi sd_mod crc_t10dif crct10dif_common mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit ata_piix drm_kms_helper ttm drm libata i2c_core hpsa dm_mirror dm_region_hash dm_log dm_mod [last unloaded: mdio]
[ 6286.808750] CPU: 3 PID: 1304 Comm: bnx2fc_l2_threa Not tainted 3.10.0-121.el7.x86_64 #1
[ 6286.808750] Hardware name: HP ProLiant DL120 G7, BIOS J01 07/01/2013
[ 6286.808752] 0000000000000000 000000000b36e715 ffff8800deba1e00 ffffffff815ec0ba
[ 6286.808753] ffff8800deba1e38 ffffffff8105dee1 ffffffffa05618c0 ffff8801e4c81888
[ 6286.808754] ffffe8ffff663868 ffff8801f402b180 ffff8801f56bc000 ffff8800deba1e48
[ 6286.808754] Call Trace:
[ 6286.808759] [<ffffffff815ec0ba>] dump_stack+0x19/0x1b
[ 6286.808762] [<ffffffff8105dee1>] warn_slowpath_common+0x61/0x80
[ 6286.808763] [<ffffffff8105e00a>] warn_slowpath_null+0x1a/0x20
[ 6286.808765] [<ffffffffa054f415>] bnx2fc_l2_rcv_thread+0x425/0x450 [bnx2fc]
[ 6286.808767] [<ffffffffa054eff0>] ? bnx2fc_disable+0x90/0x90 [bnx2fc]
[ 6286.808769] [<ffffffff81085aef>] kthread+0xcf/0xe0
[ 6286.808770] [<ffffffff81085a20>] ? kthread_create_on_node+0x140/0x140
[ 6286.808772] [<ffffffff815fc76c>] ret_from_fork+0x7c/0xb0
[ 6286.808773] [<ffffffff81085a20>] ? kthread_create_on_node+0x140/0x140
[ 6286.808774] ---[ end trace c6cdb939184ccb4e ]---
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -411,6 +411,7 @@ static int bnx2fc_rcv(struct sk_buff *sk
struct fc_frame_header *fh;
struct fcoe_rcv_info *fr;
struct fcoe_percpu_s *bg;
+ struct sk_buff *tmp_skb;
unsigned short oxid;
interface = container_of(ptype, struct bnx2fc_interface,
@@ -423,6 +424,12 @@ static int bnx2fc_rcv(struct sk_buff *sk
goto err;
}
+ tmp_skb = skb_share_check(skb, GFP_ATOMIC);
+ if (!tmp_skb)
+ goto err;
+
+ skb = tmp_skb;
+
if (unlikely(eth_hdr(skb)->h_proto != htons(ETH_P_FCOE))) {
printk(KERN_ERR PFX "bnx2fc_rcv: Wrong FC type frame\n");
goto err;
^ permalink raw reply [flat|nested] 44+ messages in thread
* [PATCH 3.10 44/45] powerpc/powernv: Honor the generic "no_64bit_msi" flag
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (39 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 43/45] bnx2fc: do not add shared skbs to the fcoe_rx_list Greg Kroah-Hartman
@ 2014-12-05 22:45 ` Greg Kroah-Hartman
2014-12-06 3:29 ` [PATCH 3.10 00/45] 3.10.62-stable review Guenter Roeck
2014-12-06 21:36 ` Shuah Khan
42 siblings, 0 replies; 44+ messages in thread
From: Greg Kroah-Hartman @ 2014-12-05 22:45 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Benjamin Herrenschmidt
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
commit 360743814c4082515581aa23ab1d8e699e1fbe88 upstream.
Instead of the arch specific quirk which we are deprecating
and that drivers don't understand.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/platforms/powernv/pci-ioda.c | 3 +--
arch/powerpc/platforms/powernv/pci.c | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -789,7 +789,6 @@ static int pnv_pci_ioda_msi_setup(struct
unsigned int is_64, struct msi_msg *msg)
{
struct pnv_ioda_pe *pe = pnv_ioda_get_pe(dev);
- struct pci_dn *pdn = pci_get_pdn(dev);
struct irq_data *idata;
struct irq_chip *ichip;
unsigned int xive_num = hwirq - phb->msi_base;
@@ -806,7 +805,7 @@ static int pnv_pci_ioda_msi_setup(struct
return -ENXIO;
/* Force 32-bit MSI on some broken devices */
- if (pdn && pdn->force_32bit_msi)
+ if (dev->no_64bit_msi)
is_64 = 0;
/* Assign XIVE to PE */
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -1,3 +1,4 @@
+
/*
* Support PCI/PCIe on PowerNV platforms
*
@@ -47,9 +48,8 @@ static int pnv_msi_check_device(struct p
{
struct pci_controller *hose = pci_bus_to_host(pdev->bus);
struct pnv_phb *phb = hose->private_data;
- struct pci_dn *pdn = pci_get_pdn(pdev);
- if (pdn && pdn->force_32bit_msi && !phb->msi32_support)
+ if (pdev->no_64bit_msi && !phb->msi32_support)
return -ENODEV;
return (phb && phb->msi_bmp.bitmap) ? 0 : -ENODEV;
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 3.10 00/45] 3.10.62-stable review
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (40 preceding siblings ...)
2014-12-05 22:45 ` [PATCH 3.10 44/45] powerpc/powernv: Honor the generic "no_64bit_msi" flag Greg Kroah-Hartman
@ 2014-12-06 3:29 ` Guenter Roeck
2014-12-06 21:36 ` Shuah Khan
42 siblings, 0 replies; 44+ messages in thread
From: Guenter Roeck @ 2014-12-06 3:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Cc: torvalds, akpm, satoru.takeuchi, shuah.kh, stable
On 12/05/2014 02:44 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.62 release.
> There are 45 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Sun Dec 7 22:32:54 UTC 2014.
> Anything received after that time might be too late.
>
Build results:
total: 137 pass: 137 fail: 0
Qemu tests:
total: 27 pass: 27 fail: 0
Details are available at http://server.roeck-us.net:8010/builders..
Guenter
^ permalink raw reply [flat|nested] 44+ messages in thread
* Re: [PATCH 3.10 00/45] 3.10.62-stable review
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
` (41 preceding siblings ...)
2014-12-06 3:29 ` [PATCH 3.10 00/45] 3.10.62-stable review Guenter Roeck
@ 2014-12-06 21:36 ` Shuah Khan
42 siblings, 0 replies; 44+ messages in thread
From: Shuah Khan @ 2014-12-06 21:36 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Cc: torvalds, akpm, linux, satoru.takeuchi, shuah.kh, stable
On 12/05/2014 03:44 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.62 release.
> There are 45 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Sun Dec 7 22:32:54 UTC 2014.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.62-rc1.gz
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Compiled and booted on my test system. No dmesg regressions.
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Open Source Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 44+ messages in thread
end of thread, other threads:[~2014-12-06 21:36 UTC | newest]
Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-05 22:44 [PATCH 3.10 00/45] 3.10.62-stable review Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 01/45] MIPS: oprofile: Fix backtrace on 64-bit kernel Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 02/45] MIPS: Loongson: Make platform serial setup always built-in Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 03/45] x86_64, traps: Fix the espfix64 #DF fixup and rewrite it in C Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 04/45] x86_64, traps: Stop using IST for #SS Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 05/45] x86_64, traps: Rework bad_iret Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 06/45] x86: Require exact match for noxsave command line option Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 07/45] x86, mm: Set NX across entire PMD at boot Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 08/45] uprobes, x86: Fix _TIF_UPROBE vs _TIF_NOTIFY_RESUME Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 09/45] sparc64: Fix constraints on swab helpers Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 10/45] inetdevice: fixed signed integer overflow Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 11/45] ipv4: Fix incorrect error code when adding an unreachable route Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 12/45] ieee802154: fix error handling in ieee802154fake_probe() Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 14/45] pptp: fix stack info leak in pptp_getname() Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 15/45] ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg Greg Kroah-Hartman
2014-12-05 22:44 ` [PATCH 3.10 16/45] PCI/MSI: Add device flag indicating that 64-bit MSIs dont work Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 17/45] ASoC: sgtl5000: Fix SMALL_POP bit definition Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 18/45] ASoC: wm_adsp: Avoid attempt to free buffers that might still be in use Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 19/45] of/base: Fix PowerPC address parsing hack Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 20/45] powerpc/pseries: Honor the generic "no_64bit_msi" flag Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 21/45] powerpc/pseries: Fix endiannes issue in RTAS call from xmon Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 22/45] iio: Fix IIO_EVENT_CODE_EXTRACT_DIR bit mask Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 23/45] USB: ssu100: fix overrun-error reporting Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 24/45] USB: keyspan: " Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 25/45] USB: keyspan: fix tty line-status reporting Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 26/45] USB: serial: cp210x: add IDs for CEL MeshConnect USB Stick Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 27/45] usb: serial: ftdi_sio: add PIDs for Matrix Orbital products Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 28/45] usb-quirks: Add reset-resume quirk for MS Wireless Laser Mouse 6000 Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 29/45] USB: xhci: dont start a halted endpoint before its new dequeue is set Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 30/45] can: esd_usb2: fix memory leak on disconnect Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 31/45] ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devices Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 32/45] ARM: 8216/1: xscale: correct auxiliary register in suspend/resume Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 33/45] ARM: 8222/1: mvebu: enable strex backoff delay Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 34/45] Input: xpad - use proper endpoint type Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 35/45] srp-target: Retry when QP creation fails with ENOMEM Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 36/45] target: Dont call TFO->write_pending if data_length == 0 Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 37/45] iser-target: Handle DEVICE_REMOVAL event on network portal listener correctly Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 38/45] spi: dw: Fix dynamic speed change Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 40/45] rt2x00: do not align payload on modern H/W Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 41/45] nfsd: Fix slot wake up race in the nfsv4.1 callback code Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 43/45] bnx2fc: do not add shared skbs to the fcoe_rx_list Greg Kroah-Hartman
2014-12-05 22:45 ` [PATCH 3.10 44/45] powerpc/powernv: Honor the generic "no_64bit_msi" flag Greg Kroah-Hartman
2014-12-06 3:29 ` [PATCH 3.10 00/45] 3.10.62-stable review Guenter Roeck
2014-12-06 21:36 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).