* [PATCH 3.10 00/53] 3.10.96-stable review
@ 2016-01-27 18:15 Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 01/53] af_unix: fix incorrect revert of lock_interruptible in stream receive code Greg Kroah-Hartman
` (54 more replies)
0 siblings, 55 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah.kh, info, stable
-------------------------
NOTE:
There are still a lot of pending stable patches in the queue, well
over 400 of them to be specific, so some of your favorite/pet patches
might not be included in these releases. Please be patient as I dig
out from this backlog over the next few weeks. If there are specific
patches that you just _must_ have included in a stable release soon,
please let me know.
-------------------------
This is the start of the stable review cycle for the 3.10.96 release.
There are 53 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 Fri Jan 29 18:06:17 UTC 2016.
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.x/stable-review/patch-3.10.96-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.96-rc1
Guenter Roeck <linux@roeck-us.net>
mn10300: Select CONFIG_HAVE_UID16 to fix build failure
Andrew Morton <akpm@linux-foundation.org>
openrisc: fix CONFIG_UID16 setting
Richard Purdie <richard.purdie@linuxfoundation.org>
HID: core: Avoid uninitialized buffer access
Mikulas Patocka <mpatocka@redhat.com>
parisc iommu: fix panic due to trying to allocate too large region
Will Deacon <will.deacon@arm.com>
arm64: mm: ensure that the zero page is visible to the page table walker
John Blackwood <john.blackwood@ccur.com>
arm64: Clear out any singlestep state on a ptrace detach operation
Arnd Bergmann <arnd@arndb.de>
arm64: fix building without CONFIG_UID16
Ulrich Weigand <ulrich.weigand@de.ibm.com>
scripts/recordmcount.pl: support data in text section on powerpc
Boqun Feng <boqun.feng@gmail.com>
powerpc: Make {cmp}xchg* and their atomic_ versions fully ordered
Boqun Feng <boqun.feng@gmail.com>
powerpc: Make value-returning atomics fully ordered
Michael Neuling <mikey@neuling.org>
powerpc/tm: Block signal return setting invalid MSR state
Ido Schimmel <idosch@mellanox.com>
team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid
Ben Hutchings <ben@decadent.org.uk>
ppp, slip: Validate VJ compression slot parameters completely
Ben Hutchings <ben@decadent.org.uk>
isdn_ppp: Add checks for allocation failure in isdn_ppp_open()
Eric Dumazet <edumazet@google.com>
phonet: properly unshare skbs in phonet_rcv()
Neal Cardwell <ncardwell@google.com>
tcp_yeah: don't set ssthresh below 2
Francesco Ruggeri <fruggeri@aristanetworks.com>
net: possible use after free in dst_release
Hannes Frederic Sowa <hannes@stressinduktion.org>
bridge: Only call /sbin/bridge-stp for the initial network namespace
willy tarreau <w@1wt.eu>
unix: properly account for FDs passed over unix sockets
Florian Westphal <fw@strlen.de>
connector: bump skb->users before callback invocation
Xin Long <lucien.xin@gmail.com>
sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close
Andrey Ryabinin <aryabinin@virtuozzo.com>
ipv6/addrlabel: fix ip6addrlbl_get()
Vijay Pandurangan <vijayp@vijayp.ca>
veth: don’t modify ip_summed; doing so treats packets with bad checksums as good.
Oliver Neukum <oneukum@suse.com>
xhci: refuse loading if nousb is used
Oliver Freyermuth <o.freyermuth@googlemail.com>
USB: cp210x: add ID for ELV Marble Sound Board 1
Dan Carpenter <dan.carpenter@oracle.com>
USB: ipaq.c: fix a timeout loop
Chunfeng Yun <chunfeng.yun@mediatek.com>
usb: xhci: fix config fail of FS hub behind a HS hub with MTT
Vinod Koul <vinod.koul@intel.com>
ASoC: compress: Fix compress device direction check
Nikesh Oswal <Nikesh.Oswal@cirrus.com>
ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz
Sachin Pandhare <sachinpandhare@gmail.com>
ASoC: wm8962: correct addresses for HPF_C_0/1
Takashi Iwai <tiwai@suse.de>
ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0
Takashi Iwai <tiwai@suse.de>
ALSA: hrtimer: Fix stall by hrtimer_cancel()
Nicolas Boichat <drinkcat@chromium.org>
ALSA: pcm: Fix snd_pcm_hw_params struct copy in compat mode
Nicolas Boichat <drinkcat@chromium.org>
ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode
Takashi Iwai <tiwai@suse.de>
ALSA: timer: Fix double unlink of active_list
Takashi Iwai <tiwai@suse.de>
ALSA: timer: Fix race among timer ioctls
Takashi Iwai <tiwai@suse.de>
ALSA: timer: Harden slave timer list handling
Takashi Iwai <tiwai@suse.de>
ALSA: seq: Fix race at timer setup and close
Takashi Iwai <tiwai@suse.de>
ALSA: seq: Fix missing NULL check at remove_events ioctl
Mario Kleiner <mario.kleiner.de@gmail.com>
ALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2)
Xiong Zhang <xiong.y.zhang@intel.com>
ALSA: hda - Set SKL+ hda controller power at freeze() and thaw()
David Henningsson <david.henningsson@canonical.com>
ALSA: hda - Add inverted dmic for Packard Bell DOTS
Takashi Iwai <tiwai@suse.de>
ALSA: rme96: Fix unexpected volume reset after rate changes
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Apply pin fixup for HP ProBook 6550b
Alexandra Yates <alexandra.yates@linux.intel.com>
ALSA: hda - Add Intel Lewisburg device IDs Audio
Jan Stancek <jstancek@redhat.com>
ipmi: move timer init to before irq is setup
H.J. Lu <hjl.tools@gmail.com>
x86/boot: Double BOOT_HEAP_SIZE to 64KB
Mario Kleiner <mario.kleiner.de@gmail.com>
x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[]
Paul Mackerras <paulus@ozlabs.org>
KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR
Ouyang Zhaowei (Charles) <ouyangzhaowei@huawei.com>
x86/xen: don't reset vcpu_info on a cancelled suspend
Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/gntdev: Grant maps should not be subject to NUMA balancing
Dmitry V. Levin <ldv@altlinux.org>
x86/signal: Fix restart_syscall number for x32 tasks
Willy Tarreau <w@1wt.eu>
af_unix: fix incorrect revert of 'lock_interruptible' in stream receive code
-------------
Diffstat:
Makefile | 4 +--
arch/arm64/kernel/ptrace.c | 6 +++++
arch/arm64/mm/mmu.c | 3 +++
arch/mn10300/Kconfig | 4 +--
arch/openrisc/Kconfig | 4 +--
arch/powerpc/include/asm/cmpxchg.h | 16 ++++++------
arch/powerpc/include/asm/reg.h | 1 +
arch/powerpc/include/asm/synch.h | 2 +-
arch/powerpc/kernel/signal_32.c | 14 ++++++----
arch/powerpc/kernel/signal_64.c | 4 +++
arch/powerpc/kvm/book3s_hv.c | 6 +++++
arch/x86/include/asm/boot.h | 2 +-
arch/x86/kernel/reboot.c | 8 ++++++
arch/x86/kernel/signal.c | 17 ++++++++-----
arch/x86/xen/suspend.c | 3 ++-
drivers/char/ipmi/ipmi_si_intf.c | 8 +++---
drivers/connector/connector.c | 11 +++-----
drivers/hid/hid-core.c | 2 +-
drivers/isdn/i4l/isdn_ppp.c | 12 ++++++---
drivers/net/ppp/ppp_generic.c | 6 ++---
drivers/net/slip/slhc.c | 12 ++++++---
drivers/net/slip/slip.c | 2 +-
drivers/net/team/team.c | 6 ++---
drivers/net/veth.c | 6 -----
drivers/parisc/iommu-helpers.h | 15 ++++++-----
drivers/usb/host/xhci.c | 12 +++++++++
drivers/usb/serial/cp210x.c | 1 +
drivers/usb/serial/ipaq.c | 3 ++-
drivers/xen/gntdev.c | 2 +-
include/linux/sched.h | 1 +
include/linux/syscalls.h | 2 +-
include/linux/types.h | 2 +-
net/bridge/br_stp_if.c | 5 +++-
net/core/dst.c | 3 ++-
net/ipv4/tcp_yeah.c | 2 +-
net/ipv6/addrlabel.c | 2 +-
net/phonet/af_phonet.c | 4 +++
net/sctp/sm_statefuns.c | 6 +++--
net/sctp/socket.c | 3 +--
net/unix/af_unix.c | 42 ++++++++++++++++++++----------
net/unix/garbage.c | 16 +++++++++---
scripts/recordmcount.pl | 3 ++-
sound/core/control.c | 2 ++
sound/core/hrtimer.c | 3 ++-
sound/core/pcm_compat.c | 13 +++++++---
sound/core/seq/seq_clientmgr.c | 2 +-
sound/core/seq/seq_compat.c | 9 ++++---
sound/core/seq/seq_queue.c | 2 ++
sound/core/timer.c | 52 +++++++++++++++++++++++++-------------
sound/pci/hda/hda_intel.c | 39 ++++++++++++++++++++++++++++
sound/pci/hda/patch_realtek.c | 12 +++++++--
sound/pci/hda/patch_sigmatel.c | 1 +
sound/pci/rme96.c | 41 +++++++++++++++++++-----------
sound/soc/codecs/arizona.c | 2 +-
sound/soc/codecs/wm8962.c | 4 +--
sound/soc/soc-compress.c | 23 ++++++++++++++---
56 files changed, 334 insertions(+), 154 deletions(-)
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 01/53] af_unix: fix incorrect revert of lock_interruptible in stream receive code
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 02/53] x86/signal: Fix restart_syscall number for x32 tasks Greg Kroah-Hartman
` (53 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Sultan Qasim, Willy Tarreau
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Willy Tarreau <w@1wt.eu>
As reported by Sultan Qasim, commit 3822b5c ("af_unix: Revert
'lock_interruptible' in stream receive code") was accidently applied
at the wrong place in the backport that appeared in 3.10.95, it
affected unix_dgram_recvmsg() instead of unix_stream_recvmsg() due
to now similar code sections there. The dgram part needs to remain
but the stream part needs to be removed.
Reported-By: Sultan Qasim <sultanqasim@gmail.com>
Fixes: 3a57e78 (3.10.95)
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
net/unix/af_unix.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1934,7 +1934,14 @@ static int unix_dgram_recvmsg(struct kio
if (flags&MSG_OOB)
goto out;
- mutex_lock(&u->readlock);
+ err = mutex_lock_interruptible(&u->readlock);
+ if (unlikely(err)) {
+ /* recvmsg() in non blocking mode is supposed to return -EAGAIN
+ * sk_rcvtimeo is not honored by mutex_lock_interruptible()
+ */
+ err = noblock ? -EAGAIN : -ERESTARTSYS;
+ goto out;
+ }
skip = sk_peek_offset(sk, flags);
@@ -2083,14 +2090,7 @@ static int unix_stream_recvmsg(struct ki
memset(&tmp_scm, 0, sizeof(tmp_scm));
}
- err = mutex_lock_interruptible(&u->readlock);
- if (unlikely(err)) {
- /* recvmsg() in non blocking mode is supposed to return -EAGAIN
- * sk_rcvtimeo is not honored by mutex_lock_interruptible()
- */
- err = noblock ? -EAGAIN : -ERESTARTSYS;
- goto out;
- }
+ mutex_lock(&u->readlock);
do {
int chunk;
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 02/53] x86/signal: Fix restart_syscall number for x32 tasks
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 01/53] af_unix: fix incorrect revert of lock_interruptible in stream receive code Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 03/53] xen/gntdev: Grant maps should not be subject to NUMA balancing Greg Kroah-Hartman
` (52 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dmitry V. Levin, Elvira Khabirova,
Thomas Gleixner
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Dmitry V. Levin" <ldv@altlinux.org>
commit 22eab1108781eff09961ae7001704f7bd8fb1dce upstream.
When restarting a syscall with regs->ax == -ERESTART_RESTARTBLOCK,
regs->ax is assigned to a restart_syscall number. For x32 tasks, this
syscall number must have __X32_SYSCALL_BIT set, otherwise it will be
an x86_64 syscall number instead of a valid x32 syscall number. This
issue has been there since the introduction of x32.
Reported-by: strace/tests/restart_syscall.test
Reported-and-tested-by: Elvira Khabirova <lineprinter0@gmail.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Cc: Elvira Khabirova <lineprinter0@gmail.com>
Link: http://lkml.kernel.org/r/20151130215436.GA25996@altlinux.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kernel/signal.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -686,12 +686,15 @@ handle_signal(struct ksignal *ksig, stru
signal_setup_done(failed, ksig, test_thread_flag(TIF_SINGLESTEP));
}
-#ifdef CONFIG_X86_32
-#define NR_restart_syscall __NR_restart_syscall
-#else /* !CONFIG_X86_32 */
-#define NR_restart_syscall \
- test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall
-#endif /* CONFIG_X86_32 */
+static inline unsigned long get_nr_restart_syscall(const struct pt_regs *regs)
+{
+#if defined(CONFIG_X86_32) || !defined(CONFIG_X86_64)
+ return __NR_restart_syscall;
+#else /* !CONFIG_X86_32 && CONFIG_X86_64 */
+ return test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall :
+ __NR_restart_syscall | (regs->orig_ax & __X32_SYSCALL_BIT);
+#endif /* CONFIG_X86_32 || !CONFIG_X86_64 */
+}
/*
* Note that 'init' is a special process: it doesn't get signals it doesn't
@@ -720,7 +723,7 @@ static void do_signal(struct pt_regs *re
break;
case -ERESTART_RESTARTBLOCK:
- regs->ax = NR_restart_syscall;
+ regs->ax = get_nr_restart_syscall(regs);
regs->ip -= 2;
break;
}
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 03/53] xen/gntdev: Grant maps should not be subject to NUMA balancing
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 01/53] af_unix: fix incorrect revert of lock_interruptible in stream receive code Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 02/53] x86/signal: Fix restart_syscall number for x32 tasks Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 04/53] x86/xen: dont reset vcpu_info on a cancelled suspend Greg Kroah-Hartman
` (51 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Boris Ostrovsky, David Vrabel
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
commit 9c17d96500f78d7ecdb71ca6942830158bc75a2b upstream.
Doing so will cause the grant to be unmapped and then, during
fault handling, the fault to be mistakenly treated as NUMA hint
fault.
In addition, even if those maps could partcipate in NUMA
balancing, it wouldn't provide any benefit since we are unable
to determine physical page's node (even if/when VNUMA is
implemented).
Marking grant maps' VMAs as VM_IO will exclude them from being
part of NUMA balancing.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/xen/gntdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -770,7 +770,7 @@ static int gntdev_mmap(struct file *flip
vma->vm_ops = &gntdev_vmops;
- vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
+ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP | VM_IO;
if (use_ptemod)
vma->vm_flags |= VM_DONTCOPY;
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 04/53] x86/xen: dont reset vcpu_info on a cancelled suspend
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (2 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 03/53] xen/gntdev: Grant maps should not be subject to NUMA balancing Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 05/53] KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR Greg Kroah-Hartman
` (50 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Charles Ouyang, Boris Ostrovsky,
David Vrabel
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Ouyang Zhaowei (Charles)" <ouyangzhaowei@huawei.com>
commit 6a1f513776b78c994045287073e55bae44ed9f8c upstream.
On a cancelled suspend the vcpu_info location does not change (it's
still in the per-cpu area registered by xen_vcpu_setup()). So do not
call xen_hvm_init_shared_info() which would make the kernel think its
back in the shared info. With the wrong vcpu_info, events cannot be
received and the domain will hang after a cancelled suspend.
Signed-off-by: Charles Ouyang <ouyangzhaowei@huawei.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/xen/suspend.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/x86/xen/suspend.c
+++ b/arch/x86/xen/suspend.c
@@ -30,7 +30,8 @@ void xen_arch_hvm_post_suspend(int suspe
{
#ifdef CONFIG_XEN_PVHVM
int cpu;
- xen_hvm_init_shared_info();
+ if (!suspend_cancelled)
+ xen_hvm_init_shared_info();
xen_callback_vector();
xen_unplug_emulated_devices();
if (xen_feature(XENFEAT_hvm_safe_pvclock)) {
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 05/53] KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (3 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 04/53] x86/xen: dont reset vcpu_info on a cancelled suspend Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 06/53] x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[] Greg Kroah-Hartman
` (49 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Paul Mackerras
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Mackerras <paulus@ozlabs.org>
commit c20875a3e638e4a03e099b343ec798edd1af5cc6 upstream.
Currently it is possible for userspace (e.g. QEMU) to set a value
for the MSR for a guest VCPU which has both of the TS bits set,
which is an illegal combination. The result of this is that when
we execute a hrfid (hypervisor return from interrupt doubleword)
instruction to enter the guest, the CPU will take a TM Bad Thing
type of program interrupt (vector 0x700).
Now, if PR KVM is configured in the kernel along with HV KVM, we
actually handle this without crashing the host or giving hypervisor
privilege to the guest; instead what happens is that we deliver a
program interrupt to the guest, with SRR0 reflecting the address
of the hrfid instruction and SRR1 containing the MSR value at that
point. If PR KVM is not configured in the kernel, then we try to
run the host's program interrupt handler with the MMU set to the
guest context, which almost certainly causes a host crash.
This closes the hole by making kvmppc_set_msr_hv() check for the
illegal combination and force the TS field to a safe value (00,
meaning non-transactional).
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/kvm/book3s_hv.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -160,6 +160,12 @@ void kvmppc_core_vcpu_put(struct kvm_vcp
void kvmppc_set_msr(struct kvm_vcpu *vcpu, u64 msr)
{
+ /*
+ * Check for illegal transactional state bit combination
+ * and if we find it, force the TS field to a safe state.
+ */
+ if ((msr & MSR_TS_MASK) == MSR_TS_MASK)
+ msr &= ~MSR_TS_MASK;
vcpu->arch.shregs.msr = msr;
kvmppc_end_cede(vcpu);
}
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 06/53] x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[]
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (4 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 05/53] KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 07/53] x86/boot: Double BOOT_HEAP_SIZE to 64KB Greg Kroah-Hartman
` (48 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Mario Kleiner, Andy Lutomirski,
Borislav Petkov, Brian Gerst, Dave Jones, Denys Vlasenko,
H. Peter Anvin, Linus Torvalds, Peter Zijlstra, Thomas Gleixner,
Ingo Molnar
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Kleiner <mario.kleiner.de@gmail.com>
commit 2f0c0b2d96b1205efb14347009748d786c2d9ba5 upstream.
Without the reboot=pci method, the iMac 10,1 simply
hangs after printing "Restarting system" at the point
when it should reboot. This fixes it.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1450466646-26663-1-git-send-email-mario.kleiner.de@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kernel/reboot.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -366,6 +366,14 @@ static struct dmi_system_id __initdata r
DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
},
},
+ { /* Handle problems with rebooting on the iMac10,1. */
+ .callback = set_pci_reboot,
+ .ident = "Apple iMac10,1",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "iMac10,1"),
+ },
+ },
{ /* Handle reboot issue on Acer Aspire one */
.callback = set_kbd_reboot,
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 07/53] x86/boot: Double BOOT_HEAP_SIZE to 64KB
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (5 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 06/53] x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[] Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 08/53] ipmi: move timer init to before irq is setup Greg Kroah-Hartman
` (47 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, H.J. Lu, H. Peter Anvin,
Andy Lutomirski, Borislav Petkov, Brian Gerst, Denys Vlasenko,
Linus Torvalds, Peter Zijlstra, Thomas Gleixner, Ingo Molnar
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "H.J. Lu" <hjl.tools@gmail.com>
commit 8c31902cffc4d716450be549c66a67a8a3dd479c upstream.
When decompressing kernel image during x86 bootup, malloc memory
for ELF program headers may run out of heap space, which leads
to system halt. This patch doubles BOOT_HEAP_SIZE to 64KB.
Tested with 32-bit kernel which failed to boot without this patch.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/include/asm/boot.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/include/asm/boot.h
+++ b/arch/x86/include/asm/boot.h
@@ -27,7 +27,7 @@
#define BOOT_HEAP_SIZE 0x400000
#else /* !CONFIG_KERNEL_BZIP2 */
-#define BOOT_HEAP_SIZE 0x8000
+#define BOOT_HEAP_SIZE 0x10000
#endif /* !CONFIG_KERNEL_BZIP2 */
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 08/53] ipmi: move timer init to before irq is setup
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (6 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 07/53] x86/boot: Double BOOT_HEAP_SIZE to 64KB Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 09/53] ALSA: hda - Add Intel Lewisburg device IDs Audio Greg Kroah-Hartman
` (46 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel, Openipmi-developer, Corey Minyard
Cc: Greg Kroah-Hartman, stable, Jan Stancek, Tony Camuso,
Corey Minyard
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Stancek <jstancek@redhat.com>
commit 27f972d3e00b50639deb4cc1392afaeb08d3cecc upstream.
We encountered a panic on boot in ipmi_si on a dell per320 due to an
uninitialized timer as follows.
static int smi_start_processing(void *send_info,
ipmi_smi_t intf)
{
/* Try to claim any interrupts. */
if (new_smi->irq_setup)
new_smi->irq_setup(new_smi);
--> IRQ arrives here and irq handler tries to modify uninitialized timer
which triggers BUG_ON(!timer->function) in __mod_timer().
Call Trace:
<IRQ>
[<ffffffffa0532617>] start_new_msg+0x47/0x80 [ipmi_si]
[<ffffffffa053269e>] start_check_enables+0x4e/0x60 [ipmi_si]
[<ffffffffa0532bd8>] smi_event_handler+0x1e8/0x640 [ipmi_si]
[<ffffffff810f5584>] ? __rcu_process_callbacks+0x54/0x350
[<ffffffffa053327c>] si_irq_handler+0x3c/0x60 [ipmi_si]
[<ffffffff810efaf0>] handle_IRQ_event+0x60/0x170
[<ffffffff810f245e>] handle_edge_irq+0xde/0x180
[<ffffffff8100fc59>] handle_irq+0x49/0xa0
[<ffffffff8154643c>] do_IRQ+0x6c/0xf0
[<ffffffff8100ba53>] ret_from_intr+0x0/0x11
/* Set up the timer that drives the interface. */
setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi);
The following patch fixes the problem.
To: Openipmi-developer@lists.sourceforge.net
To: Corey Minyard <minyard@acm.org>
CC: linux-kernel@vger.kernel.org
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Tony Camuso <tcamuso@redhat.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/char/ipmi/ipmi_si_intf.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -1144,14 +1144,14 @@ static int smi_start_processing(void
new_smi->intf = intf;
- /* Try to claim any interrupts. */
- if (new_smi->irq_setup)
- new_smi->irq_setup(new_smi);
-
/* Set up the timer that drives the interface. */
setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi);
smi_mod_timer(new_smi, jiffies + SI_TIMEOUT_JIFFIES);
+ /* Try to claim any interrupts. */
+ if (new_smi->irq_setup)
+ new_smi->irq_setup(new_smi);
+
/*
* Check if the user forcefully enabled the daemon.
*/
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 09/53] ALSA: hda - Add Intel Lewisburg device IDs Audio
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (7 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 08/53] ipmi: move timer init to before irq is setup Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 10/53] ALSA: hda - Apply pin fixup for HP ProBook 6550b Greg Kroah-Hartman
` (45 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alexandra Yates, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandra Yates <alexandra.yates@linux.intel.com>
commit 5cf92c8b3dc5da59e05dc81bdc069cedf6f38313 upstream.
Adding Intel codename Lewisburg platform device IDs for audio.
[rearranged the position by tiwai]
Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/hda_intel.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -3864,6 +3864,11 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids)
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
{ PCI_DEVICE(0x8086, 0x8d21),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
+ /* Lewisburg */
+ { PCI_DEVICE(0x8086, 0xa1f0),
+ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
+ { PCI_DEVICE(0x8086, 0xa270),
+ .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
/* Lynx Point-LP */
{ PCI_DEVICE(0x8086, 0x9c20),
.driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 10/53] ALSA: hda - Apply pin fixup for HP ProBook 6550b
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (8 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 09/53] ALSA: hda - Add Intel Lewisburg device IDs Audio Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 11/53] ALSA: rme96: Fix unexpected volume reset after rate changes Greg Kroah-Hartman
` (44 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit c932b98c1e47312822d911c1bb76e81ef50e389c upstream.
HP ProBook 6550b needs the same pin fixup applied to other HP B-series
laptops with docks for making its headphone and dock headphone jacks
working properly. We just need to add the codec SSID to the list.
Bugzilla: https://bugzilla.kernel.org/attachment.cgi?id=191971
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_sigmatel.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -703,6 +703,7 @@ static bool hp_bnb2011_with_dock(struct
static bool hp_blike_system(u32 subsystem_id)
{
switch (subsystem_id) {
+ case 0x103c1473: /* HP ProBook 6550b */
case 0x103c1520:
case 0x103c1521:
case 0x103c1523:
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 11/53] ALSA: rme96: Fix unexpected volume reset after rate changes
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (9 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 10/53] ALSA: hda - Apply pin fixup for HP ProBook 6550b Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 12/53] ALSA: hda - Add inverted dmic for Packard Bell DOTS Greg Kroah-Hartman
` (43 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit a74a821624c0c75388a193337babd17a8c02c740 upstream.
rme96 driver needs to reset DAC depending on the sample rate, and this
results in resetting to the max volume suddenly. It's because of the
missing call of snd_rme96_apply_dac_volume().
However, calling this function right after the DAC reset still may not
work, and we need some delay before this call. Since the DAC reset
and the procedure after that are performed in the spinlock, we delay
the DAC volume restore at the end after the spinlock.
Reported-and-tested-by: Sylvain LABOISNE <maeda1@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/rme96.c | 41 ++++++++++++++++++++++++++---------------
1 file changed, 26 insertions(+), 15 deletions(-)
--- a/sound/pci/rme96.c
+++ b/sound/pci/rme96.c
@@ -703,10 +703,11 @@ snd_rme96_playback_setrate(struct rme96
{
/* change to/from double-speed: reset the DAC (if available) */
snd_rme96_reset_dac(rme96);
+ return 1; /* need to restore volume */
} else {
writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER);
+ return 0;
}
- return 0;
}
static int
@@ -944,6 +945,7 @@ snd_rme96_playback_hw_params(struct snd_
struct rme96 *rme96 = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
int err, rate, dummy;
+ bool apply_dac_volume = false;
runtime->dma_area = (void __force *)(rme96->iobase +
RME96_IO_PLAY_BUFFER);
@@ -957,24 +959,26 @@ snd_rme96_playback_hw_params(struct snd_
{
/* slave clock */
if ((int)params_rate(params) != rate) {
- spin_unlock_irq(&rme96->lock);
- return -EIO;
- }
- } else if ((err = snd_rme96_playback_setrate(rme96, params_rate(params))) < 0) {
- spin_unlock_irq(&rme96->lock);
- return err;
- }
- if ((err = snd_rme96_playback_setformat(rme96, params_format(params))) < 0) {
- spin_unlock_irq(&rme96->lock);
- return err;
+ err = -EIO;
+ goto error;
+ }
+ } else {
+ err = snd_rme96_playback_setrate(rme96, params_rate(params));
+ if (err < 0)
+ goto error;
+ apply_dac_volume = err > 0; /* need to restore volume later? */
}
+
+ err = snd_rme96_playback_setformat(rme96, params_format(params));
+ if (err < 0)
+ goto error;
snd_rme96_setframelog(rme96, params_channels(params), 1);
if (rme96->capture_periodsize != 0) {
if (params_period_size(params) << rme96->playback_frlog !=
rme96->capture_periodsize)
{
- spin_unlock_irq(&rme96->lock);
- return -EBUSY;
+ err = -EBUSY;
+ goto error;
}
}
rme96->playback_periodsize =
@@ -985,9 +989,16 @@ snd_rme96_playback_hw_params(struct snd_
rme96->wcreg &= ~(RME96_WCR_PRO | RME96_WCR_DOLBY | RME96_WCR_EMP);
writel(rme96->wcreg |= rme96->wcreg_spdif_stream, rme96->iobase + RME96_IO_CONTROL_REGISTER);
}
+
+ err = 0;
+ error:
spin_unlock_irq(&rme96->lock);
-
- return 0;
+ if (apply_dac_volume) {
+ usleep_range(3000, 10000);
+ snd_rme96_apply_dac_volume(rme96);
+ }
+
+ return err;
}
static int
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 12/53] ALSA: hda - Add inverted dmic for Packard Bell DOTS
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (10 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 11/53] ALSA: rme96: Fix unexpected volume reset after rate changes Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 13/53] ALSA: hda - Set SKL+ hda controller power at freeze() and thaw() Greg Kroah-Hartman
` (42 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David Henningsson, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Henningsson <david.henningsson@canonical.com>
commit 02f6ff90400d055f08b0ba0b5f0707630b6faed7 upstream.
On the internal mic of the Packard Bell DOTS, one channel
has an inverted signal. Add a quirk to fix this up.
BugLink: https://bugs.launchpad.net/bugs/1523232
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4446,6 +4446,7 @@ static const struct hda_fixup alc662_fix
static const struct snd_pci_quirk alc662_fixup_tbl[] = {
SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2),
SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC),
+ SND_PCI_QUIRK(0x1025, 0x0241, "Packard Bell DOTS", ALC662_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE),
SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE),
SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC),
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 13/53] ALSA: hda - Set SKL+ hda controller power at freeze() and thaw()
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (11 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 12/53] ALSA: hda - Add inverted dmic for Packard Bell DOTS Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 14/53] ALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2) Greg Kroah-Hartman
` (41 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Xiong Zhang, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xiong Zhang <xiong.y.zhang@intel.com>
commit 3e6db33aaf1d42a30339f831ec4850570d6cc7a3 upstream.
It takes three minutes to enter into hibernation on some OEM SKL
machines and we see many codec spurious response after thaw() opertion.
This is because HDA is still in D0 state after freeze() call and
pci_pm_freeze/pci_pm_freeze_noirq() don't set D3 hot in pci_bus driver.
It seems bios still access HDA when system enter into freeze state,
HDA will receive codec response interrupt immediately after thaw() call.
Because of this unexpected interrupt, HDA enter into a abnormal
state and slow down the system enter into hibernation.
In this patch, we put HDA into D3 hot state in azx_freeze_noirq() and
put HDA into D0 state in azx_thaw_noirq().
V2: Only apply this fix to SKL+
Fix compile error when CONFIG_PM_SLEEP isn't defined
[Yet another fix for CONFIG_PM_SLEEP ifdef and the additional comment
by tiwai]
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/hda_intel.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1104,6 +1104,36 @@ static unsigned int azx_get_response(str
return azx_rirb_get_response(bus, addr);
}
+#ifdef CONFIG_PM_SLEEP
+/* put codec down to D3 at hibernation for Intel SKL+;
+ * otherwise BIOS may still access the codec and screw up the driver
+ */
+#define IS_SKL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa170)
+#define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70)
+#define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
+#define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci))
+
+static int azx_freeze_noirq(struct device *dev)
+{
+ struct pci_dev *pci = to_pci_dev(dev);
+
+ if (IS_SKL_PLUS(pci))
+ pci_set_power_state(pci, PCI_D3hot);
+
+ return 0;
+}
+
+static int azx_thaw_noirq(struct device *dev)
+{
+ struct pci_dev *pci = to_pci_dev(dev);
+
+ if (IS_SKL_PLUS(pci))
+ pci_set_power_state(pci, PCI_D0);
+
+ return 0;
+}
+#endif /* CONFIG_PM_SLEEP */
+
#ifdef CONFIG_PM
static void azx_power_notify(struct hda_bus *bus, bool power_up);
#endif
@@ -2974,6 +3004,10 @@ static int azx_runtime_idle(struct devic
#ifdef CONFIG_PM
static const struct dev_pm_ops azx_pm = {
SET_SYSTEM_SLEEP_PM_OPS(azx_suspend, azx_resume)
+#ifdef CONFIG_PM_SLEEP
+ .freeze_noirq = azx_freeze_noirq,
+ .thaw_noirq = azx_thaw_noirq,
+#endif
SET_RUNTIME_PM_OPS(azx_runtime_suspend, azx_runtime_resume, azx_runtime_idle)
};
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 14/53] ALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2)
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (12 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 13/53] ALSA: hda - Set SKL+ hda controller power at freeze() and thaw() Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 15/53] ALSA: seq: Fix missing NULL check at remove_events ioctl Greg Kroah-Hartman
` (40 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mario Kleiner, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mario Kleiner <mario.kleiner.de@gmail.com>
commit 9f660a1c43890c2cdd1f423fd73654e7ca08fe56 upstream.
Without this patch, internal speaker and line-out work,
but front headphone output jack stays silent on the
Mac Pro 4,1.
This code path also gets executed on the MacPro 5,1 due
to identical codec SSID, but i don't know if it has any
positive or adverse effects there or not.
(v2) Implement feedback from Takashi Iwai: Reuse
alc889_fixup_mbp_vref and just add a new nid
0x19 for the MacPro 4,1.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_realtek.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1768,6 +1768,7 @@ enum {
ALC889_FIXUP_MBA11_VREF,
ALC889_FIXUP_MBA21_VREF,
ALC889_FIXUP_MP11_VREF,
+ ALC889_FIXUP_MP41_VREF,
ALC882_FIXUP_INV_DMIC,
ALC882_FIXUP_NO_PRIMARY_HP,
ALC887_FIXUP_ASUS_BASS,
@@ -1854,7 +1855,7 @@ static void alc889_fixup_mbp_vref(struct
const struct hda_fixup *fix, int action)
{
struct alc_spec *spec = codec->spec;
- static hda_nid_t nids[2] = { 0x14, 0x15 };
+ static hda_nid_t nids[3] = { 0x14, 0x15, 0x19 };
int i;
if (action != HDA_FIXUP_ACT_INIT)
@@ -2128,6 +2129,12 @@ static const struct hda_fixup alc882_fix
.chained = true,
.chain_id = ALC885_FIXUP_MACPRO_GPIO,
},
+ [ALC889_FIXUP_MP41_VREF] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc889_fixup_mbp_vref,
+ .chained = true,
+ .chain_id = ALC885_FIXUP_MACPRO_GPIO,
+ },
[ALC882_FIXUP_INV_DMIC] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc_fixup_inv_dmic_0x12,
@@ -2200,7 +2207,7 @@ static const struct snd_pci_quirk alc882
SND_PCI_QUIRK(0x106b, 0x3f00, "Macbook 5,1", ALC889_FIXUP_IMAC91_VREF),
SND_PCI_QUIRK(0x106b, 0x4000, "MacbookPro 5,1", ALC889_FIXUP_IMAC91_VREF),
SND_PCI_QUIRK(0x106b, 0x4100, "Macmini 3,1", ALC889_FIXUP_IMAC91_VREF),
- SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 5,1", ALC885_FIXUP_MACPRO_GPIO),
+ SND_PCI_QUIRK(0x106b, 0x4200, "Mac Pro 4,1/5,1", ALC889_FIXUP_MP41_VREF),
SND_PCI_QUIRK(0x106b, 0x4300, "iMac 9,1", ALC889_FIXUP_IMAC91_VREF),
SND_PCI_QUIRK(0x106b, 0x4600, "MacbookPro 5,2", ALC889_FIXUP_IMAC91_VREF),
SND_PCI_QUIRK(0x106b, 0x4900, "iMac 9,1 Aluminum", ALC889_FIXUP_IMAC91_VREF),
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 15/53] ALSA: seq: Fix missing NULL check at remove_events ioctl
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (13 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 14/53] ALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2) Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 16/53] ALSA: seq: Fix race at timer setup and close Greg Kroah-Hartman
` (39 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dmitry Vyukov, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 030e2c78d3a91dd0d27fef37e91950dde333eba1 upstream.
snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear()
unconditionally even if there is no FIFO assigned, and this leads to
an Oops due to NULL dereference. The fix is just to add a proper NULL
check.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/seq/seq_clientmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -1950,7 +1950,7 @@ static int snd_seq_ioctl_remove_events(s
* No restrictions so for a user client we can clear
* the whole fifo
*/
- if (client->type == USER_CLIENT)
+ if (client->type == USER_CLIENT && client->data.user.fifo)
snd_seq_fifo_clear(client->data.user.fifo);
}
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 16/53] ALSA: seq: Fix race at timer setup and close
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (14 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 15/53] ALSA: seq: Fix missing NULL check at remove_events ioctl Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 17/53] ALSA: timer: Harden slave timer list handling Greg Kroah-Hartman
` (38 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dmitry Vyukov, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 3567eb6af614dac436c4b16a8d426f9faed639b3 upstream.
ALSA sequencer code has an open race between the timer setup ioctl and
the close of the client. This was triggered by syzkaller fuzzer, and
a use-after-free was caught there as a result.
This patch papers over it by adding a proper queue->timer_mutex lock
around the timer-related calls in the relevant code path.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/seq/seq_queue.c | 2 ++
1 file changed, 2 insertions(+)
--- a/sound/core/seq/seq_queue.c
+++ b/sound/core/seq/seq_queue.c
@@ -144,8 +144,10 @@ static struct snd_seq_queue *queue_new(i
static void queue_delete(struct snd_seq_queue *q)
{
/* stop and release the timer */
+ mutex_lock(&q->timer_mutex);
snd_seq_timer_stop(q->timer);
snd_seq_timer_close(q);
+ mutex_unlock(&q->timer_mutex);
/* wait until access free */
snd_use_lock_sync(&q->use_lock);
/* release resources... */
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 17/53] ALSA: timer: Harden slave timer list handling
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (15 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 16/53] ALSA: seq: Fix race at timer setup and close Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 18/53] ALSA: timer: Fix race among timer ioctls Greg Kroah-Hartman
` (37 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dmitry Vyukov, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit b5a663aa426f4884c71cd8580adae73f33570f0d upstream.
A slave timer instance might be still accessible in a racy way while
operating the master instance as it lacks of locking. Since the
master operation is mostly protected with timer->lock, we should cope
with it while changing the slave instance, too. Also, some linked
lists (active_list and ack_list) of slave instances aren't unlinked
immediately at stopping or closing, and this may lead to unexpected
accesses.
This patch tries to address these issues. It adds spin lock of
timer->lock (either from master or slave, which is equivalent) in a
few places. For avoiding a deadlock, we ensure that the global
slave_active_lock is always locked at first before each timer lock.
Also, ack and active_list of slave instances are properly unlinked at
snd_timer_stop() and snd_timer_close().
Last but not least, remove the superfluous call of _snd_timer_stop()
at removing slave links. This is a noop, and calling it may confuse
readers wrt locking. Further cleanup will follow in a later patch.
Actually we've got reports of use-after-free by syzkaller fuzzer, and
this hopefully fixes these issues.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/timer.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -215,11 +215,13 @@ static void snd_timer_check_master(struc
slave->slave_id == master->slave_id) {
list_move_tail(&slave->open_list, &master->slave_list_head);
spin_lock_irq(&slave_active_lock);
+ spin_lock(&master->timer->lock);
slave->master = master;
slave->timer = master->timer;
if (slave->flags & SNDRV_TIMER_IFLG_RUNNING)
list_add_tail(&slave->active_list,
&master->slave_active_head);
+ spin_unlock(&master->timer->lock);
spin_unlock_irq(&slave_active_lock);
}
}
@@ -345,15 +347,18 @@ int snd_timer_close(struct snd_timer_ins
timer->hw.close)
timer->hw.close(timer);
/* remove slave links */
+ spin_lock_irq(&slave_active_lock);
+ spin_lock(&timer->lock);
list_for_each_entry_safe(slave, tmp, &timeri->slave_list_head,
open_list) {
- spin_lock_irq(&slave_active_lock);
- _snd_timer_stop(slave, 1, SNDRV_TIMER_EVENT_RESOLUTION);
list_move_tail(&slave->open_list, &snd_timer_slave_list);
slave->master = NULL;
slave->timer = NULL;
- spin_unlock_irq(&slave_active_lock);
+ list_del_init(&slave->ack_list);
+ list_del_init(&slave->active_list);
}
+ spin_unlock(&timer->lock);
+ spin_unlock_irq(&slave_active_lock);
mutex_unlock(®ister_mutex);
}
out:
@@ -440,9 +445,12 @@ static int snd_timer_start_slave(struct
spin_lock_irqsave(&slave_active_lock, flags);
timeri->flags |= SNDRV_TIMER_IFLG_RUNNING;
- if (timeri->master)
+ if (timeri->master && timeri->timer) {
+ spin_lock(&timeri->timer->lock);
list_add_tail(&timeri->active_list,
&timeri->master->slave_active_head);
+ spin_unlock(&timeri->timer->lock);
+ }
spin_unlock_irqrestore(&slave_active_lock, flags);
return 1; /* delayed start */
}
@@ -488,6 +496,8 @@ static int _snd_timer_stop(struct snd_ti
if (!keep_flag) {
spin_lock_irqsave(&slave_active_lock, flags);
timeri->flags &= ~SNDRV_TIMER_IFLG_RUNNING;
+ list_del_init(&timeri->ack_list);
+ list_del_init(&timeri->active_list);
spin_unlock_irqrestore(&slave_active_lock, flags);
}
goto __end;
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 18/53] ALSA: timer: Fix race among timer ioctls
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (16 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 17/53] ALSA: timer: Harden slave timer list handling Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 19/53] ALSA: timer: Fix double unlink of active_list Greg Kroah-Hartman
` (36 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dmitry Vyukov, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit af368027a49a751d6ff4ee9e3f9961f35bb4fede upstream.
ALSA timer ioctls have an open race and this may lead to a
use-after-free of timer instance object. A simplistic fix is to make
each ioctl exclusive. We have already tread_sem for controlling the
tread, and extend this as a global mutex to be applied to each ioctl.
The downside is, of course, the worse concurrency. But these ioctls
aren't to be parallel accessible, in anyway, so it should be fine to
serialize there.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/timer.c | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -73,7 +73,7 @@ struct snd_timer_user {
struct timespec tstamp; /* trigger tstamp */
wait_queue_head_t qchange_sleep;
struct fasync_struct *fasync;
- struct mutex tread_sem;
+ struct mutex ioctl_lock;
};
/* list of timers */
@@ -1266,7 +1266,7 @@ static int snd_timer_user_open(struct in
return -ENOMEM;
spin_lock_init(&tu->qlock);
init_waitqueue_head(&tu->qchange_sleep);
- mutex_init(&tu->tread_sem);
+ mutex_init(&tu->ioctl_lock);
tu->ticks = 1;
tu->queue_size = 128;
tu->queue = kmalloc(tu->queue_size * sizeof(struct snd_timer_read),
@@ -1286,8 +1286,10 @@ static int snd_timer_user_release(struct
if (file->private_data) {
tu = file->private_data;
file->private_data = NULL;
+ mutex_lock(&tu->ioctl_lock);
if (tu->timeri)
snd_timer_close(tu->timeri);
+ mutex_unlock(&tu->ioctl_lock);
kfree(tu->queue);
kfree(tu->tqueue);
kfree(tu);
@@ -1525,7 +1527,6 @@ static int snd_timer_user_tselect(struct
int err = 0;
tu = file->private_data;
- mutex_lock(&tu->tread_sem);
if (tu->timeri) {
snd_timer_close(tu->timeri);
tu->timeri = NULL;
@@ -1569,7 +1570,6 @@ static int snd_timer_user_tselect(struct
}
__err:
- mutex_unlock(&tu->tread_sem);
return err;
}
@@ -1782,7 +1782,7 @@ enum {
SNDRV_TIMER_IOCTL_PAUSE_OLD = _IO('T', 0x23),
};
-static long snd_timer_user_ioctl(struct file *file, unsigned int cmd,
+static long __snd_timer_user_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct snd_timer_user *tu;
@@ -1799,17 +1799,11 @@ static long snd_timer_user_ioctl(struct
{
int xarg;
- mutex_lock(&tu->tread_sem);
- if (tu->timeri) { /* too late */
- mutex_unlock(&tu->tread_sem);
+ if (tu->timeri) /* too late */
return -EBUSY;
- }
- if (get_user(xarg, p)) {
- mutex_unlock(&tu->tread_sem);
+ if (get_user(xarg, p))
return -EFAULT;
- }
tu->tread = xarg ? 1 : 0;
- mutex_unlock(&tu->tread_sem);
return 0;
}
case SNDRV_TIMER_IOCTL_GINFO:
@@ -1842,6 +1836,18 @@ static long snd_timer_user_ioctl(struct
return -ENOTTY;
}
+static long snd_timer_user_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg)
+{
+ struct snd_timer_user *tu = file->private_data;
+ long ret;
+
+ mutex_lock(&tu->ioctl_lock);
+ ret = __snd_timer_user_ioctl(file, cmd, arg);
+ mutex_unlock(&tu->ioctl_lock);
+ return ret;
+}
+
static int snd_timer_user_fasync(int fd, struct file * file, int on)
{
struct snd_timer_user *tu;
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 19/53] ALSA: timer: Fix double unlink of active_list
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (17 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 18/53] ALSA: timer: Fix race among timer ioctls Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 20/53] ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode Greg Kroah-Hartman
` (35 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dmitry Vyukov, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit ee8413b01045c74340aa13ad5bdf905de32be736 upstream.
ALSA timer instance object has a couple of linked lists and they are
unlinked unconditionally at snd_timer_stop(). Meanwhile
snd_timer_interrupt() unlinks it, but it calls list_del() which leaves
the element list itself unchanged. This ends up with unlinking twice,
and it was caught by syzkaller fuzzer.
The fix is to use list_del_init() variant properly there, too.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -703,7 +703,7 @@ void snd_timer_interrupt(struct snd_time
} else {
ti->flags &= ~SNDRV_TIMER_IFLG_RUNNING;
if (--timer->running)
- list_del(&ti->active_list);
+ list_del_init(&ti->active_list);
}
if ((timer->hw.flags & SNDRV_TIMER_HW_TASKLET) ||
(ti->flags & SNDRV_TIMER_IFLG_FAST))
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 20/53] ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (18 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 19/53] ALSA: timer: Fix double unlink of active_list Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 21/53] ALSA: pcm: Fix snd_pcm_hw_params struct copy " Greg Kroah-Hartman
` (34 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Nicolas Boichat, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Boichat <drinkcat@chromium.org>
commit 9586495dc3011a80602329094e746dbce16cb1f1 upstream.
This reverts one hunk of
commit ef44a1ec6eee ("ALSA: sound/core: use memdup_user()"), which
replaced a number of kmalloc followed by memcpy with memdup calls.
In this case, we are copying from a struct snd_seq_port_info32 to a
struct snd_seq_port_info, but the latter is 4 bytes longer than the
32-bit version, so we need to separate kmalloc and copy calls.
Fixes: ef44a1ec6eee ('ALSA: sound/core: use memdup_user()')
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/seq/seq_compat.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/sound/core/seq/seq_compat.c
+++ b/sound/core/seq/seq_compat.c
@@ -49,11 +49,12 @@ static int snd_seq_call_port_info_ioctl(
struct snd_seq_port_info *data;
mm_segment_t fs;
- data = memdup_user(data32, sizeof(*data32));
- if (IS_ERR(data))
- return PTR_ERR(data);
+ data = kmalloc(sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
- if (get_user(data->flags, &data32->flags) ||
+ if (copy_from_user(data, data32, sizeof(*data32)) ||
+ get_user(data->flags, &data32->flags) ||
get_user(data->time_queue, &data32->time_queue))
goto error;
data->kernel = NULL;
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 21/53] ALSA: pcm: Fix snd_pcm_hw_params struct copy in compat mode
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (19 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 20/53] ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 22/53] ALSA: hrtimer: Fix stall by hrtimer_cancel() Greg Kroah-Hartman
` (33 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Nicolas Boichat, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Boichat <drinkcat@chromium.org>
commit 43c54b8c7cfe22f868a751ba8a59abf1724160b1 upstream.
This reverts one hunk of
commit ef44a1ec6eee ("ALSA: sound/core: use memdup_user()"), which
replaced a number of kmalloc followed by memcpy with memdup calls.
In this case, we are copying from a struct snd_pcm_hw_params32 to
a struct snd_pcm_hw_params, but the latter is 4 bytes longer than
the 32-bit version, so we need to separate kmalloc and copy calls.
This actually leads to an out-of-bounds memory access later on
in sound/soc/soc-pcm.c:soc_pcm_hw_params() (detected using KASan).
Fixes: ef44a1ec6eee ('ALSA: sound/core: use memdup_user()')
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/pcm_compat.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/sound/core/pcm_compat.c
+++ b/sound/core/pcm_compat.c
@@ -236,10 +236,15 @@ static int snd_pcm_ioctl_hw_params_compa
if (! (runtime = substream->runtime))
return -ENOTTY;
- /* only fifo_size is different, so just copy all */
- data = memdup_user(data32, sizeof(*data32));
- if (IS_ERR(data))
- return PTR_ERR(data);
+ data = kmalloc(sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ /* only fifo_size (RO from userspace) is different, so just copy all */
+ if (copy_from_user(data, data32, sizeof(*data32))) {
+ err = -EFAULT;
+ goto error;
+ }
if (refine)
err = snd_pcm_hw_refine(substream, data);
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 22/53] ALSA: hrtimer: Fix stall by hrtimer_cancel()
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (20 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 21/53] ALSA: pcm: Fix snd_pcm_hw_params struct copy " Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 23/53] ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0 Greg Kroah-Hartman
` (32 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 2ba1fe7a06d3624f9a7586d672b55f08f7c670f3 upstream.
hrtimer_cancel() waits for the completion from the callback, thus it
must not be called inside the callback itself. This was already a
problem in the past with ALSA hrtimer driver, and the early commit
[fcfdebe70759: ALSA: hrtimer - Fix lock-up] tried to address it.
However, the previous fix is still insufficient: it may still cause a
lockup when the ALSA timer instance reprograms itself in its callback.
Then it invokes the start function even in snd_timer_interrupt() that
is called in hrtimer callback itself, results in a CPU stall. This is
no hypothetical problem but actually triggered by syzkaller fuzzer.
This patch tries to fix the issue again. Now we call
hrtimer_try_to_cancel() at both start and stop functions so that it
won't fall into a deadlock, yet giving some chance to cancel the queue
if the functions have been called outside the callback. The proper
hrtimer_cancel() is called in anyway at closing, so this should be
enough.
Reported-and-tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/hrtimer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/sound/core/hrtimer.c
+++ b/sound/core/hrtimer.c
@@ -90,7 +90,7 @@ static int snd_hrtimer_start(struct snd_
struct snd_hrtimer *stime = t->private_data;
atomic_set(&stime->running, 0);
- hrtimer_cancel(&stime->hrt);
+ hrtimer_try_to_cancel(&stime->hrt);
hrtimer_start(&stime->hrt, ns_to_ktime(t->sticks * resolution),
HRTIMER_MODE_REL);
atomic_set(&stime->running, 1);
@@ -101,6 +101,7 @@ static int snd_hrtimer_stop(struct snd_t
{
struct snd_hrtimer *stime = t->private_data;
atomic_set(&stime->running, 0);
+ hrtimer_try_to_cancel(&stime->hrt);
return 0;
}
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 23/53] ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (21 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 22/53] ALSA: hrtimer: Fix stall by hrtimer_cancel() Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 24/53] ASoC: wm8962: correct addresses for HPF_C_0/1 Greg Kroah-Hartman
` (31 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dmitry Vyukov, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit c0bcdbdff3ff73a54161fca3cb8b6cdbd0bb8762 upstream.
When a TLV ioctl with numid zero is handled, the driver may spew a
kernel warning with a stack trace at each call. The check was
intended obviously only for a kernel driver, but not for a user
interaction. Let's fix it.
This was spotted by syzkaller fuzzer.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/control.c | 2 ++
1 file changed, 2 insertions(+)
--- a/sound/core/control.c
+++ b/sound/core/control.c
@@ -1325,6 +1325,8 @@ static int snd_ctl_tlv_ioctl(struct snd_
return -EFAULT;
if (tlv.length < sizeof(unsigned int) * 2)
return -EINVAL;
+ if (!tlv.numid)
+ return -EINVAL;
down_read(&card->controls_rwsem);
kctl = snd_ctl_find_numid(card, tlv.numid);
if (kctl == NULL) {
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 24/53] ASoC: wm8962: correct addresses for HPF_C_0/1
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (22 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 23/53] ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0 Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 25/53] ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz Greg Kroah-Hartman
` (30 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Sachin Pandhare, Charles Keepax,
Mark Brown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sachin Pandhare <sachinpandhare@gmail.com>
commit e9f96bc53c1b959859599cb30ce6fd4fbb4448c2 upstream.
>From datasheet:
R17408 (4400h) HPF_C_1
R17409 (4401h) HPF_C_0
17048 -> 17408 (0x4400)
17049 -> 17409 (0x4401)
Signed-off-by: Sachin Pandhare <sachinpandhare@gmail.com>
Acked-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/wm8962.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -363,8 +363,8 @@ static struct reg_default wm8962_reg[] =
{ 16924, 0x0059 }, /* R16924 - HDBASS_PG_1 */
{ 16925, 0x999A }, /* R16925 - HDBASS_PG_0 */
- { 17048, 0x0083 }, /* R17408 - HPF_C_1 */
- { 17049, 0x98AD }, /* R17409 - HPF_C_0 */
+ { 17408, 0x0083 }, /* R17408 - HPF_C_1 */
+ { 17409, 0x98AD }, /* R17409 - HPF_C_0 */
{ 17920, 0x007F }, /* R17920 - ADCL_RETUNE_C1_1 */
{ 17921, 0xFFFF }, /* R17921 - ADCL_RETUNE_C1_0 */
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 25/53] ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (23 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 24/53] ASoC: wm8962: correct addresses for HPF_C_0/1 Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 26/53] ASoC: compress: Fix compress device direction check Greg Kroah-Hartman
` (29 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Nikesh Oswal, Charles Keepax,
Mark Brown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikesh Oswal <Nikesh.Oswal@cirrus.com>
commit e73694d871867cae8471d2350ce89acb38bc2b63 upstream.
For a sample rate of 12kHz the bclk was taken from the 44.1kHz table as
we test for a multiple of 8kHz. This patch fixes this issue by testing
for multiples of 4kHz instead.
Signed-off-by: Nikesh Oswal <Nikesh.Oswal@cirrus.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/arizona.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1057,7 +1057,7 @@ static int arizona_hw_params(struct snd_
int chan_limit = arizona->pdata.max_channels_clocked[dai->id - 1];
int bclk, lrclk, wl, frame, bclk_target;
- if (params_rate(params) % 8000)
+ if (params_rate(params) % 4000)
rates = &arizona_44k1_bclk_rates[0];
else
rates = &arizona_48k_bclk_rates[0];
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 26/53] ASoC: compress: Fix compress device direction check
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (24 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 25/53] ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 27/53] usb: xhci: fix config fail of FS hub behind a HS hub with MTT Greg Kroah-Hartman
` (28 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Ashish Panwar, Vinod Koul, Mark Brown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vinod Koul <vinod.koul@intel.com>
commit a1068045883ed4a18363a4ebad0c3d55e473b716 upstream.
The detection of direction for compress was only taking into account codec
capabilities and not CPU ones. Fix this by checking the CPU side capabilities
as well
Tested-by: Ashish Panwar <ashish.panwar@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/soc-compress.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -384,17 +384,34 @@ int soc_new_compress(struct snd_soc_pcm_
struct snd_compr *compr;
char new_name[64];
int ret = 0, direction = 0;
+ int playback = 0, capture = 0;
/* check client and interface hw capabilities */
snprintf(new_name, sizeof(new_name), "%s %s-%d",
rtd->dai_link->stream_name, codec_dai->name, num);
if (codec_dai->driver->playback.channels_min)
+ playback = 1;
+ if (codec_dai->driver->capture.channels_min)
+ capture = 1;
+
+ capture = capture && cpu_dai->driver->capture.channels_min;
+ playback = playback && cpu_dai->driver->playback.channels_min;
+
+ /*
+ * Compress devices are unidirectional so only one of the directions
+ * should be set, check for that (xor)
+ */
+ if (playback + capture != 1) {
+ dev_err(rtd->card->dev, "Invalid direction for compress P %d, C %d\n",
+ playback, capture);
+ return -EINVAL;
+ }
+
+ if(playback)
direction = SND_COMPRESS_PLAYBACK;
- else if (codec_dai->driver->capture.channels_min)
- direction = SND_COMPRESS_CAPTURE;
else
- return -EINVAL;
+ direction = SND_COMPRESS_CAPTURE;
compr = kzalloc(sizeof(*compr), GFP_KERNEL);
if (compr == NULL) {
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 27/53] usb: xhci: fix config fail of FS hub behind a HS hub with MTT
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (25 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 26/53] ASoC: compress: Fix compress device direction check Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 28/53] USB: ipaq.c: fix a timeout loop Greg Kroah-Hartman
` (27 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Chunfeng Yun, Mathias Nyman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chunfeng Yun <chunfeng.yun@mediatek.com>
commit 096b110a3dd3c868e4610937c80d2e3f3357c1a9 upstream.
if a full speed hub connects to a high speed hub which
supports MTT, the MTT field of its slot context will be set
to 1 when xHCI driver setups an xHCI virtual device in
xhci_setup_addressable_virt_dev(); once usb core fetch its
hub descriptor, and need to update the xHC's internal data
structures for the device, the HUB field of its slot context
will be set to 1 too, meanwhile MTT is also set before,
this will cause configure endpoint command fail, so in the
case, we should clear MTT to 0 for full speed hub according
to section 6.2.2
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/host/xhci.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -4615,8 +4615,16 @@ int xhci_update_hub_device(struct usb_hc
ctrl_ctx->add_flags |= cpu_to_le32(SLOT_FLAG);
slot_ctx = xhci_get_slot_ctx(xhci, config_cmd->in_ctx);
slot_ctx->dev_info |= cpu_to_le32(DEV_HUB);
+ /*
+ * refer to section 6.2.2: MTT should be 0 for full speed hub,
+ * but it may be already set to 1 when setup an xHCI virtual
+ * device, so clear it anyway.
+ */
if (tt->multi)
slot_ctx->dev_info |= cpu_to_le32(DEV_MTT);
+ else if (hdev->speed == USB_SPEED_FULL)
+ slot_ctx->dev_info &= cpu_to_le32(~DEV_MTT);
+
if (xhci->hci_version > 0x95) {
xhci_dbg(xhci, "xHCI version %x needs hub "
"TT think time and number of ports\n",
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 28/53] USB: ipaq.c: fix a timeout loop
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (26 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 27/53] usb: xhci: fix config fail of FS hub behind a HS hub with MTT Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 29/53] USB: cp210x: add ID for ELV Marble Sound Board 1 Greg Kroah-Hartman
` (26 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dan Carpenter
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit abdc9a3b4bac97add99e1d77dc6d28623afe682b upstream.
The code expects the loop to end with "retries" set to zero but, because
it is a post-op, it will end set to -1. I have fixed this by moving the
decrement inside the loop.
Fixes: 014aa2a3c32e ('USB: ipaq: minor ipaq_open() cleanup.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/ipaq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -532,7 +532,8 @@ static int ipaq_open(struct tty_struct *
* through. Since this has a reasonably high failure rate, we retry
* several times.
*/
- while (retries--) {
+ while (retries) {
+ retries--;
result = usb_control_msg(serial->dev,
usb_sndctrlpipe(serial->dev, 0), 0x22, 0x21,
0x1, 0, NULL, 0, 100);
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 29/53] USB: cp210x: add ID for ELV Marble Sound Board 1
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (27 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 28/53] USB: ipaq.c: fix a timeout loop Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 30/53] xhci: refuse loading if nousb is used Greg Kroah-Hartman
` (25 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Oliver Freyermuth, Johan Hovold
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Freyermuth <o.freyermuth@googlemail.com>
commit f7d7f59ab124748156ea551edf789994f05da342 upstream.
Add the USB device ID for ELV Marble Sound Board 1.
Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.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
@@ -160,6 +160,7 @@ static const struct usb_device_id id_tab
{ USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
+ { USB_DEVICE(0x18EF, 0xE025) }, /* ELV Marble Sound Board 1 */
{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
{ USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
{ USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 30/53] xhci: refuse loading if nousb is used
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (28 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 29/53] USB: cp210x: add ID for ELV Marble Sound Board 1 Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 32/53] ipv6/addrlabel: fix ip6addrlbl_get() Greg Kroah-Hartman
` (24 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Oliver Neukum
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Neukum <oneukum@suse.com>
commit 1eaf35e4dd592c59041bc1ed3248c46326da1f5f upstream.
The module should fail to load.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/host/xhci.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -4815,6 +4815,10 @@ static int __init xhci_hcd_init(void)
BUILD_BUG_ON(sizeof(struct xhci_intr_reg) != 8*32/8);
/* xhci_run_regs has eight fields and embeds 128 xhci_intr_regs */
BUILD_BUG_ON(sizeof(struct xhci_run_regs) != (8+8*128)*32/8);
+
+ if (usb_disabled())
+ return -ENODEV;
+
return 0;
unreg_pci:
xhci_unregister_pci();
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 32/53] ipv6/addrlabel: fix ip6addrlbl_get()
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (29 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 30/53] xhci: refuse loading if nousb is used Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 33/53] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close Greg Kroah-Hartman
` (23 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Andrey Ryabinin, Cong Wang,
YOSHIFUJI Hideaki, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
[ Upstream commit e459dfeeb64008b2d23bdf600f03b3605dbb8152 ]
ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded,
ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed,
ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer.
Fix this by inverting ip6addrlbl_hold() check.
Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address selection policy table.")
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reviewed-by: Cong Wang <cwang@twopensource.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv6/addrlabel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -558,7 +558,7 @@ static int ip6addrlbl_get(struct sk_buff
rcu_read_lock();
p = __ipv6_addr_label(net, addr, ipv6_addr_type(addr), ifal->ifal_index);
- if (p && ip6addrlbl_hold(p))
+ if (p && !ip6addrlbl_hold(p))
p = NULL;
lseq = ip6addrlbl_table.seq;
rcu_read_unlock();
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 33/53] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (30 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 32/53] ipv6/addrlabel: fix ip6addrlbl_get() Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 34/53] connector: bump skb->users before callback invocation Greg Kroah-Hartman
` (22 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Xin Long, Marcelo Ricardo Leitner,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Xin Long <lucien.xin@gmail.com>
[ Upstream commit 068d8bd338e855286aea54e70d1c101569284b21 ]
In sctp_close, sctp_make_abort_user may return NULL because of memory
allocation failure. If this happens, it will bypass any state change
and never free the assoc. The assoc has no chance to be freed and it
will be kept in memory with the state it had even after the socket is
closed by sctp_close().
So if sctp_make_abort_user fails to allocate memory, we should abort
the asoc via sctp_primitive_ABORT as well. Just like the annotation in
sctp_sf_cookie_wait_prm_abort and sctp_sf_do_9_1_prm_abort said,
"Even if we can't send the ABORT due to low memory delete the TCB.
This is a departure from our typical NOMEM handling".
But then the chunk is NULL (low memory) and the SCTP_CMD_REPLY cmd would
dereference the chunk pointer, and system crash. So we should add
SCTP_CMD_REPLY cmd only when the chunk is not NULL, just like other
places where it adds SCTP_CMD_REPLY cmd.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/sctp/sm_statefuns.c | 6 ++++--
net/sctp/socket.c | 3 +--
2 files changed, 5 insertions(+), 4 deletions(-)
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -4835,7 +4835,8 @@ sctp_disposition_t sctp_sf_do_9_1_prm_ab
retval = SCTP_DISPOSITION_CONSUME;
- sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
+ if (abort)
+ sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
/* Even if we can't send the ABORT due to low memory delete the
* TCB. This is a departure from our typical NOMEM handling.
@@ -4972,7 +4973,8 @@ sctp_disposition_t sctp_sf_cookie_wait_p
SCTP_TO(SCTP_EVENT_TIMEOUT_T1_INIT));
retval = SCTP_DISPOSITION_CONSUME;
- sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
+ if (abort)
+ sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
SCTP_STATE(SCTP_STATE_CLOSED));
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1533,8 +1533,7 @@ SCTP_STATIC void sctp_close(struct sock
struct sctp_chunk *chunk;
chunk = sctp_make_abort_user(asoc, NULL, 0);
- if (chunk)
- sctp_primitive_ABORT(net, asoc, chunk);
+ sctp_primitive_ABORT(net, asoc, chunk);
} else
sctp_primitive_SHUTDOWN(net, asoc, NULL);
}
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 34/53] connector: bump skb->users before callback invocation
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (31 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 33/53] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 35/53] unix: properly account for FDs passed over unix sockets Greg Kroah-Hartman
` (21 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dmitry Vyukov, Florian Westphal,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <fw@strlen.de>
[ Upstream commit 55285bf09427c5abf43ee1d54e892f352092b1f1 ]
Dmitry reports memleak with syskaller program.
Problem is that connector bumps skb usecount but might not invoke callback.
So move skb_get to where we invoke the callback.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/connector/connector.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -154,26 +154,21 @@ static int cn_call_callback(struct sk_bu
*
* It checks skb, netlink header and msg sizes, and calls callback helper.
*/
-static void cn_rx_skb(struct sk_buff *__skb)
+static void cn_rx_skb(struct sk_buff *skb)
{
struct nlmsghdr *nlh;
- struct sk_buff *skb;
int len, err;
- skb = skb_get(__skb);
-
if (skb->len >= NLMSG_HDRLEN) {
nlh = nlmsg_hdr(skb);
len = nlmsg_len(nlh);
if (len < (int)sizeof(struct cn_msg) ||
skb->len < nlh->nlmsg_len ||
- len > CONNECTOR_MAX_MSG_SIZE) {
- kfree_skb(skb);
+ len > CONNECTOR_MAX_MSG_SIZE)
return;
- }
- err = cn_call_callback(skb);
+ err = cn_call_callback(skb_get(skb));
if (err < 0)
kfree_skb(skb);
}
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 35/53] unix: properly account for FDs passed over unix sockets
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (32 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 34/53] connector: bump skb->users before callback invocation Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 36/53] bridge: Only call /sbin/bridge-stp for the initial network namespace Greg Kroah-Hartman
` (20 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, socketpair, Tetsuo Handa,
Linus Torvalds, Hannes Frederic Sowa, Willy Tarreau,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: willy tarreau <w@1wt.eu>
[ Upstream commit 712f4aad406bb1ed67f3f98d04c044191f0ff593 ]
It is possible for a process to allocate and accumulate far more FDs than
the process' limit by sending them over a unix socket then closing them
to keep the process' fd count low.
This change addresses this problem by keeping track of the number of FDs
in flight per user and preventing non-privileged processes from having
more FDs in flight than their configured FD limit.
Reported-by: socketpair@gmail.com
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Mitigates: CVE-2013-4312 (Linux 2.0+)
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/sched.h | 1 +
net/unix/af_unix.c | 24 ++++++++++++++++++++----
net/unix/garbage.c | 16 ++++++++++++----
3 files changed, 33 insertions(+), 8 deletions(-)
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -670,6 +670,7 @@ struct user_struct {
unsigned long mq_bytes; /* How many bytes can be allocated to mqueue? */
#endif
unsigned long locked_shm; /* How many pages of mlocked shm ? */
+ unsigned long unix_inflight; /* How many files in flight in unix sockets */
#ifdef CONFIG_KEYS
struct key *uid_keyring; /* UID specific keyring */
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1483,6 +1483,21 @@ static void unix_destruct_scm(struct sk_
sock_wfree(skb);
}
+/*
+ * The "user->unix_inflight" variable is protected by the garbage
+ * collection lock, and we just read it locklessly here. If you go
+ * over the limit, there might be a tiny race in actually noticing
+ * it across threads. Tough.
+ */
+static inline bool too_many_unix_fds(struct task_struct *p)
+{
+ struct user_struct *user = current_user();
+
+ if (unlikely(user->unix_inflight > task_rlimit(p, RLIMIT_NOFILE)))
+ return !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN);
+ return false;
+}
+
#define MAX_RECURSION_LEVEL 4
static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
@@ -1491,6 +1506,9 @@ static int unix_attach_fds(struct scm_co
unsigned char max_level = 0;
int unix_sock_count = 0;
+ if (too_many_unix_fds(current))
+ return -ETOOMANYREFS;
+
for (i = scm->fp->count - 1; i >= 0; i--) {
struct sock *sk = unix_get_socket(scm->fp->fp[i]);
@@ -1512,10 +1530,8 @@ static int unix_attach_fds(struct scm_co
if (!UNIXCB(skb).fp)
return -ENOMEM;
- if (unix_sock_count) {
- for (i = scm->fp->count - 1; i >= 0; i--)
- unix_inflight(scm->fp->fp[i]);
- }
+ for (i = scm->fp->count - 1; i >= 0; i--)
+ unix_inflight(scm->fp->fp[i]);
return max_level;
}
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -125,9 +125,12 @@ struct sock *unix_get_socket(struct file
void unix_inflight(struct file *fp)
{
struct sock *s = unix_get_socket(fp);
+
+ spin_lock(&unix_gc_lock);
+
if (s) {
struct unix_sock *u = unix_sk(s);
- spin_lock(&unix_gc_lock);
+
if (atomic_long_inc_return(&u->inflight) == 1) {
BUG_ON(!list_empty(&u->link));
list_add_tail(&u->link, &gc_inflight_list);
@@ -135,22 +138,27 @@ void unix_inflight(struct file *fp)
BUG_ON(list_empty(&u->link));
}
unix_tot_inflight++;
- spin_unlock(&unix_gc_lock);
}
+ fp->f_cred->user->unix_inflight++;
+ spin_unlock(&unix_gc_lock);
}
void unix_notinflight(struct file *fp)
{
struct sock *s = unix_get_socket(fp);
+
+ spin_lock(&unix_gc_lock);
+
if (s) {
struct unix_sock *u = unix_sk(s);
- spin_lock(&unix_gc_lock);
+
BUG_ON(list_empty(&u->link));
if (atomic_long_dec_and_test(&u->inflight))
list_del_init(&u->link);
unix_tot_inflight--;
- spin_unlock(&unix_gc_lock);
}
+ fp->f_cred->user->unix_inflight--;
+ spin_unlock(&unix_gc_lock);
}
static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *),
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 36/53] bridge: Only call /sbin/bridge-stp for the initial network namespace
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (33 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 35/53] unix: properly account for FDs passed over unix sockets Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 37/53] net: possible use after free in dst_release Greg Kroah-Hartman
` (19 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Eric W. Biederman,
Hannes Frederic Sowa, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
[ Upstream commit ff62198553e43cdffa9d539f6165d3e83f8a42bc ]
[I stole this patch from Eric Biederman. He wrote:]
> There is no defined mechanism to pass network namespace information
> into /sbin/bridge-stp therefore don't even try to invoke it except
> for bridge devices in the initial network namespace.
>
> It is possible for unprivileged users to cause /sbin/bridge-stp to be
> invoked for any network device name which if /sbin/bridge-stp does not
> guard against unreasonable arguments or being invoked twice on the
> same network device could cause problems.
[Hannes: changed patch using netns_eq]
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/bridge/br_stp_if.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/net/bridge/br_stp_if.c
+++ b/net/bridge/br_stp_if.c
@@ -128,7 +128,10 @@ static void br_stp_start(struct net_brid
char *argv[] = { BR_STP_PROG, br->dev->name, "start", NULL };
char *envp[] = { NULL };
- r = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC);
+ if (net_eq(dev_net(br->dev), &init_net))
+ r = call_usermodehelper(BR_STP_PROG, argv, envp, UMH_WAIT_PROC);
+ else
+ r = -ENOENT;
spin_lock_bh(&br->lock);
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 37/53] net: possible use after free in dst_release
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (34 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 36/53] bridge: Only call /sbin/bridge-stp for the initial network namespace Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 38/53] tcp_yeah: dont set ssthresh below 2 Greg Kroah-Hartman
` (18 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Francesco Ruggeri, Eric Dumazet,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Francesco Ruggeri <fruggeri@aristanetworks.com>
[ Upstream commit 07a5d38453599052aff0877b16bb9c1585f08609 ]
dst_release should not access dst->flags after decrementing
__refcnt to 0. The dst_entry may be in dst_busy_list and
dst_gc_task may dst_destroy it before dst_release gets a chance
to access dst->flags.
Fixes: d69bbf88c8d0 ("net: fix a race in dst_release()")
Fixes: 27b75c95f10d ("net: avoid RCU for NOCACHE dst")
Signed-off-by: Francesco Ruggeri <fruggeri@arista.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/core/dst.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -280,10 +280,11 @@ void dst_release(struct dst_entry *dst)
{
if (dst) {
int newrefcnt;
+ unsigned short nocache = dst->flags & DST_NOCACHE;
newrefcnt = atomic_dec_return(&dst->__refcnt);
WARN_ON(newrefcnt < 0);
- if (!newrefcnt && unlikely(dst->flags & DST_NOCACHE))
+ if (!newrefcnt && unlikely(nocache))
call_rcu(&dst->rcu_head, dst_destroy_rcu);
}
}
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 38/53] tcp_yeah: dont set ssthresh below 2
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (35 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 37/53] net: possible use after free in dst_release Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 39/53] phonet: properly unshare skbs in phonet_rcv() Greg Kroah-Hartman
` (17 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Oleksandr Natalenko, Neal Cardwell,
Yuchung Cheng, Eric Dumazet, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neal Cardwell <ncardwell@google.com>
[ Upstream commit 83d15e70c4d8909d722c0d64747d8fb42e38a48f ]
For tcp_yeah, use an ssthresh floor of 2, the same floor used by Reno
and CUBIC, per RFC 5681 (equation 4).
tcp_yeah_ssthresh() was sometimes returning a 0 or negative ssthresh
value if the intended reduction is as big or bigger than the current
cwnd. Congestion control modules should never return a zero or
negative ssthresh. A zero ssthresh generally results in a zero cwnd,
causing the connection to stall. A negative ssthresh value will be
interpreted as a u32 and will set a target cwnd for PRR near 4
billion.
Oleksandr Natalenko reported that a system using tcp_yeah with ECN
could see a warning about a prior_cwnd of 0 in
tcp_cwnd_reduction(). Testing verified that this was due to
tcp_yeah_ssthresh() misbehaving in this way.
Reported-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/tcp_yeah.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv4/tcp_yeah.c
+++ b/net/ipv4/tcp_yeah.c
@@ -222,7 +222,7 @@ static u32 tcp_yeah_ssthresh(struct sock
yeah->fast_count = 0;
yeah->reno_count = max(yeah->reno_count>>1, 2U);
- return tp->snd_cwnd - reduction;
+ return max_t(int, tp->snd_cwnd - reduction, 2);
}
static struct tcp_congestion_ops tcp_yeah __read_mostly = {
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 39/53] phonet: properly unshare skbs in phonet_rcv()
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (36 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 38/53] tcp_yeah: dont set ssthresh below 2 Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 40/53] isdn_ppp: Add checks for allocation failure in isdn_ppp_open() Greg Kroah-Hartman
` (16 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Ivaylo Dimitrov, Eric Dumazet,
Remi Denis-Courmont, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 7aaed57c5c2890634cfadf725173c7c68ea4cb4f ]
Ivaylo Dimitrov reported a regression caused by commit 7866a621043f
("dev: add per net_device packet type chains").
skb->dev becomes NULL and we crash in __netif_receive_skb_core().
Before above commit, different kind of bugs or corruptions could happen
without major crash.
But the root cause is that phonet_rcv() can queue skb without checking
if skb is shared or not.
Many thanks to Ivaylo Dimitrov for his help, diagnosis and tests.
Reported-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Remi Denis-Courmont <courmisch@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/phonet/af_phonet.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/phonet/af_phonet.c
+++ b/net/phonet/af_phonet.c
@@ -377,6 +377,10 @@ static int phonet_rcv(struct sk_buff *sk
struct sockaddr_pn sa;
u16 len;
+ skb = skb_share_check(skb, GFP_ATOMIC);
+ if (!skb)
+ return NET_RX_DROP;
+
/* check we have at least a full Phonet header */
if (!pskb_pull(skb, sizeof(struct phonethdr)))
goto out;
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 40/53] isdn_ppp: Add checks for allocation failure in isdn_ppp_open()
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (37 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 39/53] phonet: properly unshare skbs in phonet_rcv() Greg Kroah-Hartman
@ 2016-01-27 18:15 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 42/53] team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid Greg Kroah-Hartman
` (15 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:15 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ben Hutchings, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ben Hutchings <ben@decadent.org.uk>
[ Upstream commit 0baa57d8dc32db78369d8b5176ef56c5e2e18ab3 ]
Compile-tested only.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/isdn/i4l/isdn_ppp.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -301,6 +301,8 @@ isdn_ppp_open(int min, struct file *file
is->compflags = 0;
is->reset = isdn_ppp_ccp_reset_alloc(is);
+ if (!is->reset)
+ return -ENOMEM;
is->lp = NULL;
is->mp_seqno = 0; /* MP sequence number */
@@ -320,6 +322,10 @@ isdn_ppp_open(int min, struct file *file
* VJ header compression init
*/
is->slcomp = slhc_init(16, 16); /* not necessary for 2. link in bundle */
+ if (!is->slcomp) {
+ isdn_ppp_ccp_reset_free(is);
+ return -ENOMEM;
+ }
#endif
#ifdef CONFIG_IPPP_FILTER
is->pass_filter = NULL;
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 42/53] team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (38 preceding siblings ...)
2016-01-27 18:15 ` [PATCH 3.10 40/53] isdn_ppp: Add checks for allocation failure in isdn_ppp_open() Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 43/53] powerpc/tm: Block signal return setting invalid MSR state Greg Kroah-Hartman
` (14 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Jiri Pirko, Ido Schimmel,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ido Schimmel <idosch@mellanox.com>
[ Upstream commit 60a6531bfe49555581ccd65f66a350cc5693fcde ]
We can't be within an RCU read-side critical section when deleting
VLANs, as underlying drivers might sleep during the hardware operation.
Therefore, replace the RCU critical section with a mutex. This is
consistent with team_vlan_rx_add_vid.
Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/team/team.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -1636,10 +1636,10 @@ static int team_vlan_rx_kill_vid(struct
struct team *team = netdev_priv(dev);
struct team_port *port;
- rcu_read_lock();
- list_for_each_entry_rcu(port, &team->port_list, list)
+ mutex_lock(&team->lock);
+ list_for_each_entry(port, &team->port_list, list)
vlan_vid_del(port->dev, proto, vid);
- rcu_read_unlock();
+ mutex_unlock(&team->lock);
return 0;
}
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 43/53] powerpc/tm: Block signal return setting invalid MSR state
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (39 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 42/53] team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 44/53] powerpc: Make value-returning atomics fully ordered Greg Kroah-Hartman
` (13 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Michael Neuling, Michael Ellerman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michael Neuling <mikey@neuling.org>
commit d2b9d2a5ad5ef04ff978c9923d19730cb05efd55 upstream.
Currently we allow both the MSR T and S bits to be set by userspace on
a signal return. Unfortunately this is a reserved configuration and
will cause a TM Bad Thing exception if attempted (via rfid).
This patch checks for this case in both the 32 and 64 bit signals
code. If both T and S are set, we mark the context as invalid.
Found using a syscall fuzzer.
Fixes: 2b0a576d15e0 ("powerpc: Add new transactional memory state to the signal context")
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/include/asm/reg.h | 1 +
arch/powerpc/kernel/signal_32.c | 14 +++++++++-----
arch/powerpc/kernel/signal_64.c | 4 ++++
3 files changed, 14 insertions(+), 5 deletions(-)
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -108,6 +108,7 @@
#define MSR_TS_T __MASK(MSR_TS_T_LG) /* Transaction Transactional */
#define MSR_TS_MASK (MSR_TS_T | MSR_TS_S) /* Transaction State bits */
#define MSR_TM_ACTIVE(x) (((x) & MSR_TS_MASK) != 0) /* Transaction active? */
+#define MSR_TM_RESV(x) (((x) & MSR_TS_MASK) == MSR_TS_MASK) /* Reserved */
#define MSR_TM_TRANSACTIONAL(x) (((x) & MSR_TS_MASK) == MSR_TS_T)
#define MSR_TM_SUSPENDED(x) (((x) & MSR_TS_MASK) == MSR_TS_S)
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -858,6 +858,15 @@ static long restore_tm_user_regs(struct
return 1;
#endif /* CONFIG_SPE */
+ /* Get the top half of the MSR from the user context */
+ if (__get_user(msr_hi, &tm_sr->mc_gregs[PT_MSR]))
+ return 1;
+ msr_hi <<= 32;
+ /* If TM bits are set to the reserved value, it's an invalid context */
+ if (MSR_TM_RESV(msr_hi))
+ return 1;
+ /* Pull in the MSR TM bits from the user context */
+ regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr_hi & MSR_TS_MASK);
/* Now, recheckpoint. This loads up all of the checkpointed (older)
* registers, including FP and V[S]Rs. After recheckpointing, the
* transactional versions should be loaded.
@@ -867,11 +876,6 @@ static long restore_tm_user_regs(struct
current->thread.tm_texasr |= TEXASR_FS;
/* This loads the checkpointed FP/VEC state, if used */
tm_recheckpoint(¤t->thread, msr);
- /* Get the top half of the MSR */
- if (__get_user(msr_hi, &tm_sr->mc_gregs[PT_MSR]))
- return 1;
- /* Pull in MSR TM from user context */
- regs->msr = (regs->msr & ~MSR_TS_MASK) | ((msr_hi<<32) & MSR_TS_MASK);
/* This loads the speculative FP/VEC state, if used */
if (msr & MSR_FP) {
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -416,6 +416,10 @@ static long restore_tm_sigcontexts(struc
/* get MSR separately, transfer the LE bit if doing signal return */
err |= __get_user(msr, &sc->gp_regs[PT_MSR]);
+ /* Don't allow reserved mode. */
+ if (MSR_TM_RESV(msr))
+ return -EINVAL;
+
/* pull in MSR TM from user context */
regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr & MSR_TS_MASK);
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 44/53] powerpc: Make value-returning atomics fully ordered
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (40 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 43/53] powerpc/tm: Block signal return setting invalid MSR state Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 45/53] powerpc: Make {cmp}xchg* and their atomic_ versions " Greg Kroah-Hartman
` (12 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Boqun Feng, Paul E. McKenney,
Peter Zijlstra (Intel), Michael Ellerman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boqun Feng <boqun.feng@gmail.com>
commit 49e9cf3f0c04bf76ffa59242254110309554861d upstream.
According to memory-barriers.txt:
> Any atomic operation that modifies some state in memory and returns
> information about the state (old or new) implies an SMP-conditional
> general memory barrier (smp_mb()) on each side of the actual
> operation ...
Which mean these operations should be fully ordered. However on PPC,
PPC_ATOMIC_ENTRY_BARRIER is the barrier before the actual operation,
which is currently "lwsync" if SMP=y. The leading "lwsync" can not
guarantee fully ordered atomics, according to Paul Mckenney:
https://lkml.org/lkml/2015/10/14/970
To fix this, we define PPC_ATOMIC_ENTRY_BARRIER as "sync" to guarantee
the fully-ordered semantics.
This also makes futex atomics fully ordered, which can avoid possible
memory ordering problems if userspace code relies on futex system call
for fully ordered semantics.
Fixes: b97021f85517 ("powerpc: Fix atomic_xxx_return barrier semantics")
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/include/asm/synch.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/powerpc/include/asm/synch.h
+++ b/arch/powerpc/include/asm/synch.h
@@ -44,7 +44,7 @@ static inline void isync(void)
MAKE_LWSYNC_SECTION_ENTRY(97, __lwsync_fixup);
#define PPC_ACQUIRE_BARRIER "\n" stringify_in_c(__PPC_ACQUIRE_BARRIER)
#define PPC_RELEASE_BARRIER stringify_in_c(LWSYNC) "\n"
-#define PPC_ATOMIC_ENTRY_BARRIER "\n" stringify_in_c(LWSYNC) "\n"
+#define PPC_ATOMIC_ENTRY_BARRIER "\n" stringify_in_c(sync) "\n"
#define PPC_ATOMIC_EXIT_BARRIER "\n" stringify_in_c(sync) "\n"
#else
#define PPC_ACQUIRE_BARRIER
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 45/53] powerpc: Make {cmp}xchg* and their atomic_ versions fully ordered
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (41 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 44/53] powerpc: Make value-returning atomics fully ordered Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 46/53] scripts/recordmcount.pl: support data in text section on powerpc Greg Kroah-Hartman
` (11 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Boqun Feng, Paul E. McKenney,
Peter Zijlstra (Intel), Michael Ellerman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Boqun Feng <boqun.feng@gmail.com>
commit 81d7a3294de7e9828310bbf986a67246b13fa01e upstream.
According to memory-barriers.txt, xchg*, cmpxchg* and their atomic_
versions all need to be fully ordered, however they are now just
RELEASE+ACQUIRE, which are not fully ordered.
So also replace PPC_RELEASE_BARRIER and PPC_ACQUIRE_BARRIER with
PPC_ATOMIC_ENTRY_BARRIER and PPC_ATOMIC_EXIT_BARRIER in
__{cmp,}xchg_{u32,u64} respectively to guarantee fully ordered semantics
of atomic{,64}_{cmp,}xchg() and {cmp,}xchg(), as a complement of commit
b97021f85517 ("powerpc: Fix atomic_xxx_return barrier semantics")
This patch depends on patch "powerpc: Make value-returning atomics fully
ordered" for PPC_ATOMIC_ENTRY_BARRIER definition.
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/include/asm/cmpxchg.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/arch/powerpc/include/asm/cmpxchg.h
+++ b/arch/powerpc/include/asm/cmpxchg.h
@@ -18,12 +18,12 @@ __xchg_u32(volatile void *p, unsigned lo
unsigned long prev;
__asm__ __volatile__(
- PPC_RELEASE_BARRIER
+ PPC_ATOMIC_ENTRY_BARRIER
"1: lwarx %0,0,%2 \n"
PPC405_ERR77(0,%2)
" stwcx. %3,0,%2 \n\
bne- 1b"
- PPC_ACQUIRE_BARRIER
+ PPC_ATOMIC_EXIT_BARRIER
: "=&r" (prev), "+m" (*(volatile unsigned int *)p)
: "r" (p), "r" (val)
: "cc", "memory");
@@ -61,12 +61,12 @@ __xchg_u64(volatile void *p, unsigned lo
unsigned long prev;
__asm__ __volatile__(
- PPC_RELEASE_BARRIER
+ PPC_ATOMIC_ENTRY_BARRIER
"1: ldarx %0,0,%2 \n"
PPC405_ERR77(0,%2)
" stdcx. %3,0,%2 \n\
bne- 1b"
- PPC_ACQUIRE_BARRIER
+ PPC_ATOMIC_EXIT_BARRIER
: "=&r" (prev), "+m" (*(volatile unsigned long *)p)
: "r" (p), "r" (val)
: "cc", "memory");
@@ -152,14 +152,14 @@ __cmpxchg_u32(volatile unsigned int *p,
unsigned int prev;
__asm__ __volatile__ (
- PPC_RELEASE_BARRIER
+ PPC_ATOMIC_ENTRY_BARRIER
"1: lwarx %0,0,%2 # __cmpxchg_u32\n\
cmpw 0,%0,%3\n\
bne- 2f\n"
PPC405_ERR77(0,%2)
" stwcx. %4,0,%2\n\
bne- 1b"
- PPC_ACQUIRE_BARRIER
+ PPC_ATOMIC_EXIT_BARRIER
"\n\
2:"
: "=&r" (prev), "+m" (*p)
@@ -198,13 +198,13 @@ __cmpxchg_u64(volatile unsigned long *p,
unsigned long prev;
__asm__ __volatile__ (
- PPC_RELEASE_BARRIER
+ PPC_ATOMIC_ENTRY_BARRIER
"1: ldarx %0,0,%2 # __cmpxchg_u64\n\
cmpd 0,%0,%3\n\
bne- 2f\n\
stdcx. %4,0,%2\n\
bne- 1b"
- PPC_ACQUIRE_BARRIER
+ PPC_ATOMIC_EXIT_BARRIER
"\n\
2:"
: "=&r" (prev), "+m" (*p)
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 46/53] scripts/recordmcount.pl: support data in text section on powerpc
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (42 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 45/53] powerpc: Make {cmp}xchg* and their atomic_ versions " Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 47/53] arm64: fix building without CONFIG_UID16 Greg Kroah-Hartman
` (10 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Steven Rostedt, Ulrich Weigand,
Michael Ellerman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ulrich Weigand <ulrich.weigand@de.ibm.com>
commit 2e50c4bef77511b42cc226865d6bc568fa7f8769 upstream.
If a text section starts out with a data blob before the first
function start label, disassembly parsing doing in recordmcount.pl
gets confused on powerpc, leading to creation of corrupted module
objects.
This was not a problem so far since the compiler would never create
such text sections. However, this has changed with a recent change
in GCC 6 to support distances of > 2GB between a function and its
assoicated TOC in the ELFv2 ABI, exposing this problem.
There is already code in recordmcount.pl to handle such data blobs
on the sparc64 platform. This patch uses the same method to handle
those on powerpc as well.
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
scripts/recordmcount.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -265,7 +265,8 @@ if ($arch eq "x86_64") {
} elsif ($arch eq "powerpc") {
$local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)";
- $function_regex = "^([0-9a-fA-F]+)\\s+<(\\.?.*?)>:";
+ # See comment in the sparc64 section for why we use '\w'.
+ $function_regex = "^([0-9a-fA-F]+)\\s+<(\\.?\\w*?)>:";
$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s\\.?_mcount\$";
if ($bits == 64) {
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 47/53] arm64: fix building without CONFIG_UID16
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (43 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 46/53] scripts/recordmcount.pl: support data in text section on powerpc Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 48/53] arm64: Clear out any singlestep state on a ptrace detach operation Greg Kroah-Hartman
` (9 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Will Deacon,
Catalin Marinas
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <arnd@arndb.de>
commit fbc416ff86183e2203cdf975e2881d7c164b0271 upstream.
As reported by Michal Simek, building an ARM64 kernel with CONFIG_UID16
disabled currently fails because the system call table still needs to
reference the individual function entry points that are provided by
kernel/sys_ni.c in this case, and the declarations are hidden inside
of #ifdef CONFIG_UID16:
arch/arm64/include/asm/unistd32.h:57:8: error: 'sys_lchown16' undeclared here (not in a function)
__SYSCALL(__NR_lchown, sys_lchown16)
I believe this problem only exists on ARM64, because older architectures
tend to not need declarations when their system call table is built
in assembly code, while newer architectures tend to not need UID16
support. ARM64 only uses these system calls for compatibility with
32-bit ARM binaries.
This changes the CONFIG_UID16 check into CONFIG_HAVE_UID16, which is
set unconditionally on ARM64 with CONFIG_COMPAT, so we see the
declarations whenever we need them, but otherwise the behavior is
unchanged.
Fixes: af1839eb4bd4 ("Kconfig: clean up the long arch list for the UID16 config option")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/syscalls.h | 2 +-
include/linux/types.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -498,7 +498,7 @@ asmlinkage long sys_chown(const char __u
asmlinkage long sys_lchown(const char __user *filename,
uid_t user, gid_t group);
asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group);
-#ifdef CONFIG_UID16
+#ifdef CONFIG_HAVE_UID16
asmlinkage long sys_chown16(const char __user *filename,
old_uid_t user, old_gid_t group);
asmlinkage long sys_lchown16(const char __user *filename,
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -35,7 +35,7 @@ typedef __kernel_gid16_t gid16_t;
typedef unsigned long uintptr_t;
-#ifdef CONFIG_UID16
+#ifdef CONFIG_HAVE_UID16
/* This is defined by include/asm-{arch}/posix_types.h */
typedef __kernel_old_uid_t old_uid_t;
typedef __kernel_old_gid_t old_gid_t;
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 48/53] arm64: Clear out any singlestep state on a ptrace detach operation
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (44 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 47/53] arm64: fix building without CONFIG_UID16 Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 49/53] arm64: mm: ensure that the zero page is visible to the page table walker Greg Kroah-Hartman
` (8 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, John Blackwood, Will Deacon
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: John Blackwood <john.blackwood@ccur.com>
commit 5db4fd8c52810bd9740c1240ebf89223b171aa70 upstream.
Make sure to clear out any ptrace singlestep state when a ptrace(2)
PTRACE_DETACH call is made on arm64 systems.
Otherwise, the previously ptraced task will die off with a SIGTRAP
signal if the debugger just previously singlestepped the ptraced task.
Signed-off-by: John Blackwood <john.blackwood@ccur.com>
[will: added comment to justify why this is in the arch code]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/kernel/ptrace.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -51,6 +51,12 @@
*/
void ptrace_disable(struct task_struct *child)
{
+ /*
+ * This would be better off in core code, but PTRACE_DETACH has
+ * grown its fair share of arch-specific worts and changing it
+ * is likely to cause regressions on obscure architectures.
+ */
+ user_disable_single_step(child);
}
/*
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 49/53] arm64: mm: ensure that the zero page is visible to the page table walker
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (45 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 48/53] arm64: Clear out any singlestep state on a ptrace detach operation Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 50/53] parisc iommu: fix panic due to trying to allocate too large region Greg Kroah-Hartman
` (7 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Will Deacon
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <will.deacon@arm.com>
commit 32d6397805d00573ce1fa55f408ce2bca15b0ad3 upstream.
In paging_init, we allocate the zero page, memset it to zero and then
point TTBR0 to it in order to avoid speculative fetches through the
identity mapping.
In order to guarantee that the freshly zeroed page is indeed visible to
the page table walker, we need to execute a dsb instruction prior to
writing the TTBR.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm64/mm/mmu.c | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -348,6 +348,9 @@ void __init paging_init(void)
empty_zero_page = virt_to_page(zero_page);
+ /* Ensure the zero page is visible to the page table walker */
+ dsb();
+
/*
* TTBR0 is only used for the identity mapping at this stage. Make it
* point to zero page to avoid speculatively fetching new entries.
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 50/53] parisc iommu: fix panic due to trying to allocate too large region
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (46 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 49/53] arm64: mm: ensure that the zero page is visible to the page table walker Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 51/53] HID: core: Avoid uninitialized buffer access Greg Kroah-Hartman
` (6 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mikulas Patocka, Helge Deller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikulas Patocka <mpatocka@redhat.com>
commit e46e31a3696ae2d66f32c207df3969613726e636 upstream.
When using the Promise TX2+ SATA controller on PA-RISC, the system often
crashes with kernel panic, for example just writing data with the dd
utility will make it crash.
Kernel panic - not syncing: drivers/parisc/sba_iommu.c: I/O MMU @ 000000000000a000 is out of mapping resources
CPU: 0 PID: 18442 Comm: mkspadfs Not tainted 4.4.0-rc2 #2
Backtrace:
[<000000004021497c>] show_stack+0x14/0x20
[<0000000040410bf0>] dump_stack+0x88/0x100
[<000000004023978c>] panic+0x124/0x360
[<0000000040452c18>] sba_alloc_range+0x698/0x6a0
[<0000000040453150>] sba_map_sg+0x260/0x5b8
[<000000000c18dbb4>] ata_qc_issue+0x264/0x4a8 [libata]
[<000000000c19535c>] ata_scsi_translate+0xe4/0x220 [libata]
[<000000000c19a93c>] ata_scsi_queuecmd+0xbc/0x320 [libata]
[<0000000040499bbc>] scsi_dispatch_cmd+0xfc/0x130
[<000000004049da34>] scsi_request_fn+0x6e4/0x970
[<00000000403e95a8>] __blk_run_queue+0x40/0x60
[<00000000403e9d8c>] blk_run_queue+0x3c/0x68
[<000000004049a534>] scsi_run_queue+0x2a4/0x360
[<000000004049be68>] scsi_end_request+0x1a8/0x238
[<000000004049de84>] scsi_io_completion+0xfc/0x688
[<0000000040493c74>] scsi_finish_command+0x17c/0x1d0
The cause of the crash is not exhaustion of the IOMMU space, there is
plenty of free pages. The function sba_alloc_range is called with size
0x11000, thus the pages_needed variable is 0x11. The function
sba_search_bitmap is called with bits_wanted 0x11 and boundary size is
0x10 (because dma_get_seg_boundary(dev) returns 0xffff).
The function sba_search_bitmap attempts to allocate 17 pages that must not
cross 16-page boundary - it can't satisfy this requirement
(iommu_is_span_boundary always returns true) and fails even if there are
many free entries in the IOMMU space.
How did it happen that we try to allocate 17 pages that don't cross
16-page boundary? The cause is in the function iommu_coalesce_chunks. This
function tries to coalesce adjacent entries in the scatterlist. The
function does several checks if it may coalesce one entry with the next,
one of those checks is this:
if (startsg->length + dma_len > max_seg_size)
break;
When it finishes coalescing adjacent entries, it allocates the mapping:
sg_dma_len(contig_sg) = dma_len;
dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE);
sg_dma_address(contig_sg) =
PIDE_FLAG
| (iommu_alloc_range(ioc, dev, dma_len) << IOVP_SHIFT)
| dma_offset;
It is possible that (startsg->length + dma_len > max_seg_size) is false
(we are just near the 0x10000 max_seg_size boundary), so the funcion
decides to coalesce this entry with the next entry. When the coalescing
succeeds, the function performs
dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE);
And now, because of non-zero dma_offset, dma_len is greater than 0x10000.
iommu_alloc_range (a pointer to sba_alloc_range) is called and it attempts
to allocate 17 pages for a device that must not cross 16-page boundary.
To fix the bug, we must make sure that dma_len after addition of
dma_offset and alignment doesn't cross the segment boundary. I.e. change
if (startsg->length + dma_len > max_seg_size)
break;
to
if (ALIGN(dma_len + dma_offset + startsg->length, IOVP_SIZE) > max_seg_size)
break;
This patch makes this change (it precalculates max_seg_boundary at the
beginning of the function iommu_coalesce_chunks). I also added a check
that the mapping length doesn't exceed dma_get_seg_boundary(dev) (it is
not needed for Promise TX2+ SATA, but it may be needed for other devices
that have dma_get_seg_boundary lower than dma_get_max_seg_size).
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/parisc/iommu-helpers.h | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
--- a/drivers/parisc/iommu-helpers.h
+++ b/drivers/parisc/iommu-helpers.h
@@ -104,7 +104,11 @@ iommu_coalesce_chunks(struct ioc *ioc, s
struct scatterlist *contig_sg; /* contig chunk head */
unsigned long dma_offset, dma_len; /* start/len of DMA stream */
unsigned int n_mappings = 0;
- unsigned int max_seg_size = dma_get_max_seg_size(dev);
+ unsigned int max_seg_size = min(dma_get_max_seg_size(dev),
+ (unsigned)DMA_CHUNK_SIZE);
+ unsigned int max_seg_boundary = dma_get_seg_boundary(dev) + 1;
+ if (max_seg_boundary) /* check if the addition above didn't overflow */
+ max_seg_size = min(max_seg_size, max_seg_boundary);
while (nents > 0) {
@@ -139,14 +143,11 @@ iommu_coalesce_chunks(struct ioc *ioc, s
/*
** First make sure current dma stream won't
- ** exceed DMA_CHUNK_SIZE if we coalesce the
+ ** exceed max_seg_size if we coalesce the
** next entry.
*/
- if(unlikely(ALIGN(dma_len + dma_offset + startsg->length,
- IOVP_SIZE) > DMA_CHUNK_SIZE))
- break;
-
- if (startsg->length + dma_len > max_seg_size)
+ if (unlikely(ALIGN(dma_len + dma_offset + startsg->length, IOVP_SIZE) >
+ max_seg_size))
break;
/*
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 51/53] HID: core: Avoid uninitialized buffer access
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (47 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 50/53] parisc iommu: fix panic due to trying to allocate too large region Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 52/53] openrisc: fix CONFIG_UID16 setting Greg Kroah-Hartman
` (5 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Richard Purdie, Jiri Kosina,
linux-input, Darren Hart, Jiri Kosina
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Purdie <richard.purdie@linuxfoundation.org>
commit 79b568b9d0c7c5d81932f4486d50b38efdd6da6d upstream.
hid_connect adds various strings to the buffer but they're all
conditional. You can find circumstances where nothing would be written
to it but the kernel will still print the supposedly empty buffer with
printk. This leads to corruption on the console/in the logs.
Ensure buf is initialized to an empty string.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
[dvhart: Initialize string to "" rather than assign buf[0] = NULL;]
Cc: Jiri Kosina <jikos@kernel.org>
Cc: linux-input@vger.kernel.org
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/hid-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1462,7 +1462,7 @@ int hid_connect(struct hid_device *hdev,
"Multi-Axis Controller"
};
const char *type, *bus;
- char buf[64];
+ char buf[64] = "";
unsigned int i;
int len;
int ret;
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 52/53] openrisc: fix CONFIG_UID16 setting
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (48 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 51/53] HID: core: Avoid uninitialized buffer access Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 53/53] mn10300: Select CONFIG_HAVE_UID16 to fix build failure Greg Kroah-Hartman
` (4 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Fengguang Wu, Iulia Manda,
Josh Triplett, Andrew Morton, Linus Torvalds
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Morton <akpm@linux-foundation.org>
commit 04ea1e91f85615318ea91ce8ab50cb6a01ee4005 upstream.
openrisc-allnoconfig:
kernel/uid16.c: In function 'SYSC_setgroups16':
kernel/uid16.c:184:2: error: implicit declaration of function 'groups_alloc'
kernel/uid16.c:184:13: warning: assignment makes pointer from integer without a cast
openrisc shouldn't be setting CONFIG_UID16 when CONFIG_MULTIUSER=n.
Fixes: 2813893f8b197a1 ("kernel: conditionally support non-root users, groups and capabilities")
Reported-by: Fengguang Wu <fengguang.wu@gmail.com>
Cc: Iulia Manda <iulia.manda21@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/openrisc/Kconfig | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -17,6 +17,7 @@ config OPENRISC
select GENERIC_IRQ_SHOW
select GENERIC_IOMAP
select GENERIC_CPU_DEVICES
+ select HAVE_UID16
select GENERIC_ATOMIC64
select GENERIC_CLOCKEVENTS
select GENERIC_STRNCPY_FROM_USER
@@ -29,9 +30,6 @@ config MMU
config HAVE_DMA_ATTRS
def_bool y
-config UID16
- def_bool y
-
config RWSEM_GENERIC_SPINLOCK
def_bool y
^ permalink raw reply [flat|nested] 60+ messages in thread
* [PATCH 3.10 53/53] mn10300: Select CONFIG_HAVE_UID16 to fix build failure
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (49 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 52/53] openrisc: fix CONFIG_UID16 setting Greg Kroah-Hartman
@ 2016-01-27 18:16 ` Greg Kroah-Hartman
2016-01-27 21:11 ` [PATCH 3.10 00/53] 3.10.96-stable review Willy Tarreau
` (3 subsequent siblings)
54 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 18:16 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Arnd Bergmann,
Acked-by: David Howells, Guenter Roeck
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <linux@roeck-us.net>
commit c86576ea114a9a881cf7328dc7181052070ca311 upstream.
mn10300 builds fail with
fs/stat.c: In function 'cp_old_stat':
fs/stat.c:163:2: error: 'old_uid_t' undeclared
ipc/util.c: In function 'ipc64_perm_to_ipc_perm':
ipc/util.c:540:2: error: 'old_uid_t' undeclared
Select CONFIG_HAVE_UID16 and remove local definition of CONFIG_UID16
to fix the problem.
Fixes: fbc416ff8618 ("arm64: fix building without CONFIG_UID16")
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mn10300/Kconfig | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -2,6 +2,7 @@ config MN10300
def_bool y
select HAVE_OPROFILE
select HAVE_GENERIC_HARDIRQS
+ select HAVE_UID16
select GENERIC_IRQ_SHOW
select ARCH_WANT_IPC_PARSE_VERSION
select HAVE_ARCH_TRACEHOOK
@@ -37,9 +38,6 @@ config HIGHMEM
config NUMA
def_bool n
-config UID16
- def_bool y
-
config RWSEM_GENERIC_SPINLOCK
def_bool y
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: [PATCH 3.10 00/53] 3.10.96-stable review
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (50 preceding siblings ...)
2016-01-27 18:16 ` [PATCH 3.10 53/53] mn10300: Select CONFIG_HAVE_UID16 to fix build failure Greg Kroah-Hartman
@ 2016-01-27 21:11 ` Willy Tarreau
2016-01-27 21:29 ` Greg Kroah-Hartman
2016-01-27 23:29 ` Shuah Khan
` (2 subsequent siblings)
54 siblings, 1 reply; 60+ messages in thread
From: Willy Tarreau @ 2016-01-27 21:11 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, info, stable
On Wed, Jan 27, 2016 at 10:15:19AM -0800, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.96 release.
> There are 53 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.
FWIW it's now running fine on my outdated netbook, including the
unix fd limiting fix that I didn't test on 3.x kernels previously.
Willy
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: [PATCH 3.10 00/53] 3.10.96-stable review
2016-01-27 21:11 ` [PATCH 3.10 00/53] 3.10.96-stable review Willy Tarreau
@ 2016-01-27 21:29 ` Greg Kroah-Hartman
0 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-27 21:29 UTC (permalink / raw)
To: Willy Tarreau; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, info, stable
On Wed, Jan 27, 2016 at 10:11:22PM +0100, Willy Tarreau wrote:
> On Wed, Jan 27, 2016 at 10:15:19AM -0800, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 3.10.96 release.
> > There are 53 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.
>
> FWIW it's now running fine on my outdated netbook, including the
> unix fd limiting fix that I didn't test on 3.x kernels previously.
Great, thanks for testing that and letting me know.
greg k-h
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: [PATCH 3.10 00/53] 3.10.96-stable review
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (51 preceding siblings ...)
2016-01-27 21:11 ` [PATCH 3.10 00/53] 3.10.96-stable review Willy Tarreau
@ 2016-01-27 23:29 ` Shuah Khan
2016-01-29 5:48 ` Greg Kroah-Hartman
2016-01-28 1:59 ` Guenter Roeck
[not found] ` <56a9f5b3.ccaa1c0a.752ef.ffffb8f7@mx.google.com>
54 siblings, 1 reply; 60+ messages in thread
From: Shuah Khan @ 2016-01-27 23:29 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Cc: torvalds, akpm, linux, shuah.kh, info, stable
On 01/27/2016 11:15 AM, Greg Kroah-Hartman wrote:
> -------------------------
> NOTE:
> There are still a lot of pending stable patches in the queue, well
> over 400 of them to be specific, so some of your favorite/pet patches
> might not be included in these releases. Please be patient as I dig
> out from this backlog over the next few weeks. If there are specific
> patches that you just _must_ have included in a stable release soon,
> please let me know.
> -------------------------
>
> This is the start of the stable review cycle for the 3.10.96 release.
> There are 53 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 Fri Jan 29 18:06:17 UTC 2016.
> 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.x/stable-review/patch-3.10.96-rc1.gz
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Compiled and booted on my test system. No dmesg regressions,
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: [PATCH 3.10 00/53] 3.10.96-stable review
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
` (52 preceding siblings ...)
2016-01-27 23:29 ` Shuah Khan
@ 2016-01-28 1:59 ` Guenter Roeck
2016-01-29 5:55 ` Greg Kroah-Hartman
[not found] ` <56a9f5b3.ccaa1c0a.752ef.ffffb8f7@mx.google.com>
54 siblings, 1 reply; 60+ messages in thread
From: Guenter Roeck @ 2016-01-28 1:59 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, shuah.kh, info, stable
On 01/27/2016 10:15 AM, Greg Kroah-Hartman wrote:
> -------------------------
> NOTE:
> There are still a lot of pending stable patches in the queue, well
> over 400 of them to be specific, so some of your favorite/pet patches
> might not be included in these releases. Please be patient as I dig
> out from this backlog over the next few weeks. If there are specific
> patches that you just _must_ have included in a stable release soon,
> please let me know.
> -------------------------
>
> This is the start of the stable review cycle for the 3.10.96 release.
> There are 53 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 Fri Jan 29 18:06:17 UTC 2016.
> Anything received after that time might be too late.
Build results:
total: 122 pass: 122 fail: 0
Qemu test results:
total: 72 pass: 72 fail: 0
Details are available at http://kerneltests.org/builders.
Guenter
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: [PATCH 3.10 00/53] 3.10.96-stable review
2016-01-27 23:29 ` Shuah Khan
@ 2016-01-29 5:48 ` Greg Kroah-Hartman
0 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-29 5:48 UTC (permalink / raw)
To: Shuah Khan; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, info, stable
On Wed, Jan 27, 2016 at 04:29:35PM -0700, Shuah Khan wrote:
> On 01/27/2016 11:15 AM, Greg Kroah-Hartman wrote:
> > -------------------------
> > NOTE:
> > There are still a lot of pending stable patches in the queue, well
> > over 400 of them to be specific, so some of your favorite/pet patches
> > might not be included in these releases. Please be patient as I dig
> > out from this backlog over the next few weeks. If there are specific
> > patches that you just _must_ have included in a stable release soon,
> > please let me know.
> > -------------------------
> >
> > This is the start of the stable review cycle for the 3.10.96 release.
> > There are 53 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 Fri Jan 29 18:06:17 UTC 2016.
> > 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.x/stable-review/patch-3.10.96-rc1.gz
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
> >
>
> Compiled and booted on my test system. No dmesg regressions,
Thanks for testing all of these and letting me know.
greg k-h
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: [PATCH 3.10 00/53] 3.10.96-stable review
2016-01-28 1:59 ` Guenter Roeck
@ 2016-01-29 5:55 ` Greg Kroah-Hartman
0 siblings, 0 replies; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-29 5:55 UTC (permalink / raw)
To: Guenter Roeck; +Cc: linux-kernel, torvalds, akpm, shuah.kh, info, stable
On Wed, Jan 27, 2016 at 05:59:47PM -0800, Guenter Roeck wrote:
> On 01/27/2016 10:15 AM, Greg Kroah-Hartman wrote:
> >-------------------------
> >NOTE:
> > There are still a lot of pending stable patches in the queue, well
> > over 400 of them to be specific, so some of your favorite/pet patches
> > might not be included in these releases. Please be patient as I dig
> > out from this backlog over the next few weeks. If there are specific
> > patches that you just _must_ have included in a stable release soon,
> > please let me know.
> >-------------------------
> >
> >This is the start of the stable review cycle for the 3.10.96 release.
> >There are 53 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 Fri Jan 29 18:06:17 UTC 2016.
> >Anything received after that time might be too late.
>
> Build results:
> total: 122 pass: 122 fail: 0
> Qemu test results:
> total: 72 pass: 72 fail: 0
>
> Details are available at http://kerneltests.org/builders.
Thanks for testing all of these and letting me know.
greg k-h
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: [PATCH 3.10 00/53] 3.10.96-stable review
[not found] ` <56a9f5b3.ccaa1c0a.752ef.ffffb8f7@mx.google.com>
@ 2016-01-29 5:56 ` Greg Kroah-Hartman
2016-01-29 22:47 ` Kevin Hilman
0 siblings, 1 reply; 60+ messages in thread
From: Greg Kroah-Hartman @ 2016-01-29 5:56 UTC (permalink / raw)
To: kernelci.org bot
Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, info, stable
On Thu, Jan 28, 2016 at 03:04:19AM -0800, kernelci.org bot wrote:
> stable-queue boot: 53 boots: 1 failed, 52 passed (v3.10.95-53-g3ebc76ed4936)
>
> Full Boot Summary: https://kernelci.org/boot/all/job/stable-queue/kernel/v3.10.95-53-g3ebc76ed4936/
> Full Build Summary: https://kernelci.org/build/stable-queue/kernel/v3.10.95-53-g3ebc76ed4936/
>
> Tree: stable-queue
> Branch: local/linux-3.10.y.queue
> Git Describe: v3.10.95-53-g3ebc76ed4936
> Git Commit: 3ebc76ed49369086e6593e41fb7de89f4de5773a
> Git URL: git://server.roeck-us.net/git/linux-stable.git
> Tested: 27 unique boards, 12 SoC families, 16 builds out of 142
>
> Boot Failure Detected: https://kernelci.org/boot/?v3.10.95-53-g3ebc76ed4936&fail
>
> arm:
>
> omap2plus_defconfig:
> omap4-panda: 1 failed lab
I'm guessing this failure is ok :)
thanks for testing all of these and letting me know.
greg k-h
^ permalink raw reply [flat|nested] 60+ messages in thread
* Re: [PATCH 3.10 00/53] 3.10.96-stable review
2016-01-29 5:56 ` Greg Kroah-Hartman
@ 2016-01-29 22:47 ` Kevin Hilman
0 siblings, 0 replies; 60+ messages in thread
From: Kevin Hilman @ 2016-01-29 22:47 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: kernelci.org bot, linux-kernel, torvalds, akpm, linux, shuah.kh,
info, stable
Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> On Thu, Jan 28, 2016 at 03:04:19AM -0800, kernelci.org bot wrote:
>> stable-queue boot: 53 boots: 1 failed, 52 passed (v3.10.95-53-g3ebc76ed4936)
>>
>> Full Boot Summary: https://kernelci.org/boot/all/job/stable-queue/kernel/v3.10.95-53-g3ebc76ed4936/
>> Full Build Summary: https://kernelci.org/build/stable-queue/kernel/v3.10.95-53-g3ebc76ed4936/
>>
>> Tree: stable-queue
>> Branch: local/linux-3.10.y.queue
>> Git Describe: v3.10.95-53-g3ebc76ed4936
>> Git Commit: 3ebc76ed49369086e6593e41fb7de89f4de5773a
>> Git URL: git://server.roeck-us.net/git/linux-stable.git
>> Tested: 27 unique boards, 12 SoC families, 16 builds out of 142
>>
>> Boot Failure Detected: https://kernelci.org/boot/?v3.10.95-53-g3ebc76ed4936&fail
>>
>> arm:
>>
>> omap2plus_defconfig:
>> omap4-panda: 1 failed lab
>
> I'm guessing this failure is ok :)
Well, I re-tested it and it's booting fine now, so since it's a Friday
afternoon, that's good enough for me to call it "fixed."
Kevin
^ permalink raw reply [flat|nested] 60+ messages in thread
end of thread, other threads:[~2016-01-29 22:47 UTC | newest]
Thread overview: 60+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 18:15 [PATCH 3.10 00/53] 3.10.96-stable review Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 01/53] af_unix: fix incorrect revert of lock_interruptible in stream receive code Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 02/53] x86/signal: Fix restart_syscall number for x32 tasks Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 03/53] xen/gntdev: Grant maps should not be subject to NUMA balancing Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 04/53] x86/xen: dont reset vcpu_info on a cancelled suspend Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 05/53] KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 06/53] x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[] Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 07/53] x86/boot: Double BOOT_HEAP_SIZE to 64KB Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 08/53] ipmi: move timer init to before irq is setup Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 09/53] ALSA: hda - Add Intel Lewisburg device IDs Audio Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 10/53] ALSA: hda - Apply pin fixup for HP ProBook 6550b Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 11/53] ALSA: rme96: Fix unexpected volume reset after rate changes Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 12/53] ALSA: hda - Add inverted dmic for Packard Bell DOTS Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 13/53] ALSA: hda - Set SKL+ hda controller power at freeze() and thaw() Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 14/53] ALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2) Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 15/53] ALSA: seq: Fix missing NULL check at remove_events ioctl Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 16/53] ALSA: seq: Fix race at timer setup and close Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 17/53] ALSA: timer: Harden slave timer list handling Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 18/53] ALSA: timer: Fix race among timer ioctls Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 19/53] ALSA: timer: Fix double unlink of active_list Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 20/53] ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 21/53] ALSA: pcm: Fix snd_pcm_hw_params struct copy " Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 22/53] ALSA: hrtimer: Fix stall by hrtimer_cancel() Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 23/53] ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0 Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 24/53] ASoC: wm8962: correct addresses for HPF_C_0/1 Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 25/53] ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 26/53] ASoC: compress: Fix compress device direction check Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 27/53] usb: xhci: fix config fail of FS hub behind a HS hub with MTT Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 28/53] USB: ipaq.c: fix a timeout loop Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 29/53] USB: cp210x: add ID for ELV Marble Sound Board 1 Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 30/53] xhci: refuse loading if nousb is used Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 32/53] ipv6/addrlabel: fix ip6addrlbl_get() Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 33/53] sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 34/53] connector: bump skb->users before callback invocation Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 35/53] unix: properly account for FDs passed over unix sockets Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 36/53] bridge: Only call /sbin/bridge-stp for the initial network namespace Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 37/53] net: possible use after free in dst_release Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 38/53] tcp_yeah: dont set ssthresh below 2 Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 39/53] phonet: properly unshare skbs in phonet_rcv() Greg Kroah-Hartman
2016-01-27 18:15 ` [PATCH 3.10 40/53] isdn_ppp: Add checks for allocation failure in isdn_ppp_open() Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 42/53] team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 43/53] powerpc/tm: Block signal return setting invalid MSR state Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 44/53] powerpc: Make value-returning atomics fully ordered Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 45/53] powerpc: Make {cmp}xchg* and their atomic_ versions " Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 46/53] scripts/recordmcount.pl: support data in text section on powerpc Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 47/53] arm64: fix building without CONFIG_UID16 Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 48/53] arm64: Clear out any singlestep state on a ptrace detach operation Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 49/53] arm64: mm: ensure that the zero page is visible to the page table walker Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 50/53] parisc iommu: fix panic due to trying to allocate too large region Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 51/53] HID: core: Avoid uninitialized buffer access Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 52/53] openrisc: fix CONFIG_UID16 setting Greg Kroah-Hartman
2016-01-27 18:16 ` [PATCH 3.10 53/53] mn10300: Select CONFIG_HAVE_UID16 to fix build failure Greg Kroah-Hartman
2016-01-27 21:11 ` [PATCH 3.10 00/53] 3.10.96-stable review Willy Tarreau
2016-01-27 21:29 ` Greg Kroah-Hartman
2016-01-27 23:29 ` Shuah Khan
2016-01-29 5:48 ` Greg Kroah-Hartman
2016-01-28 1:59 ` Guenter Roeck
2016-01-29 5:55 ` Greg Kroah-Hartman
[not found] ` <56a9f5b3.ccaa1c0a.752ef.ffffb8f7@mx.google.com>
2016-01-29 5:56 ` Greg Kroah-Hartman
2016-01-29 22:47 ` Kevin Hilman
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).