Linux 3.10.91
Greg KH
maintainerI'm announcing the release of the 3.10.91 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/Makefile | 8 ++ arch/arm64/mm/fault.c | 1 arch/m68k/include/asm/linkage.h | 30 ++++++++++ arch/mips/mm/dma-default.c | 2 arch/powerpc/platforms/powernv/pci.c | 5 + arch/powerpc/sysdev/fsl_msi.c | 5 + arch/powerpc/sysdev/mpic_pasemi_msi.c | 6 +- arch/powerpc/sysdev/mpic_u3msi.c | 5 + arch/powerpc/sysdev/ppc4xx_msi.c | 5 + arch/x86/include/asm/uaccess_64.h | 24 ++++++-- arch/x86/kernel/apic/apic.c | 7 ++ arch/x86/kernel/tsc.c | 17 +++--- arch/x86/kvm/svm.c | 2 arch/x86/mm/init_64.c | 2 arch/x86/xen/enlighten.c | 23 ++++++++ drivers/base/regmap/regmap-debugfs.c | 5 - drivers/gpu/drm/drm_lock.c | 6 ++ drivers/infiniband/hw/qib/qib.h | 27 +++------ drivers/infiniband/hw/qib/qib_keys.c | 4 + drivers/infiniband/hw/qib/qib_verbs.c | 14 +++-- drivers/infiniband/hw/qib/qib_verbs.h | 2 drivers/macintosh/windfarm_core.c | 2 drivers/md/dm-cache-policy-cleaner.c | 2 drivers/md/dm-raid.c | 3 - drivers/md/md.c | 2 drivers/md/persistent-data/dm-btree-internal.h | 6 ++ drivers/md/persistent-data/dm-btree-remove.c | 12 +--- drivers/md/persistent-data/dm-btree-spine.c | 37 +++++++++++++ drivers/md/persistent-data/dm-btree.c | 7 -- drivers/mtd/ubi/io.c | 5 + drivers/mtd/ubi/vtbl.c | 1 drivers/mtd/ubi/wl.c | 1 drivers/net/bonding/bond_main.c | 20 +++++++ drivers/scsi/3w-9xxx.c | 28 +++++++--- drivers/scsi/scsi_error.c | 11 +++ drivers/spi/spi-pxa2xx.c | 4 + drivers/spi/spi.c | 3 - drivers/staging/comedi/drivers/adl_pci7x3x.c | 15 ++++- drivers/staging/speakup/fakekey.c | 1 drivers/usb/core/config.c | 5 + drivers/usb/core/quirks.c | 13 ++++ drivers/usb/host/xhci-mem.c | 6 +- drivers/usb/host/xhci-ring.c | 70 +++++++++++++++++++------ drivers/usb/host/xhci.c | 8 ++ drivers/usb/serial/option.c | 24 ++++++++ drivers/usb/serial/whiteheat.c | 31 +++++++++++ fs/btrfs/inode.c | 3 - fs/cifs/smb2ops.c | 8 ++ fs/dcache.c | 10 +++ fs/namei.c | 29 +++++++++- fs/udf/inode.c | 10 +++ include/linux/security.h | 2 include/xen/interface/sched.h | 8 ++ ipc/msg.c | 14 ++--- ipc/shm.c | 12 ++-- ipc/util.c | 8 +- kernel/irq/proc.c | 19 ++++++ mm/hugetlb.c | 8 ++ net/core/fib_rules.c | 2 net/netfilter/ipvs/ip_vs_sync.c | 2 net/netfilter/ipvs/ip_vs_xmit.c | 1 net/netfilter/nf_conntrack_expect.c | 3 - sound/arm/Kconfig | 15 ++--- sound/soc/dwc/designware_i2s.c | 4 - sound/soc/pxa/Kconfig | 2 sound/synth/emux/emux_oss.c | 3 - tools/perf/util/header.c | 4 - 68 files changed, 540 insertions(+), 146 deletions(-)
Andi Kleen (1):
x86: Add 1/2/4/8 byte optimization to 64bit __copy_{from,to}_user_inatomicAndreas Schwab (1):
m68k: Define asmlinkage_protect
Ard Biesheuvel (1):
ARM: 8429/1: disable GCC SRA optimization
Arnaldo Carvalho de Melo (1):
perf header: Fixup reading of HEADER_NRCPUS feature
Ben Hutchings (1):
genirq: Fix race in register_irq_proc()
Christoph Hellwig (1):
3w-9xxx: don't unmap bounce buffered commands
Daniel Vetter (1):
drm: Reject DRI1 hw lock ioctl functions for kms drivers
David Woodhouse (1):
x86/platform: Fix Geode LX timekeeping in the generic x86 build
Dirk Müller (1):
Use WARN_ON_ONCE for missing X86_FEATURE_NRIPS
Eric W. Biederman (2):
dcache: Handle escaped paths in prepend_path
vfs: Test for and handle paths that are unreachable from their mnt_root
Greg Kroah-Hartman (1):
Linux 3.10.91
Guenter Roeck (1):
spi: Fix documentation of spi_alloc_master()
Ian Abbott (1):
staging: comedi: adl_pci7x3x: fix digital output on PCI-7230
James Hogan (1):
MIPS: dma-default: Fix 32-bit fall back to GFP_DMA
Jan Kara (1):
udf: Check length of extended attributes and allocation descriptors
Jann Horn (1):
security: fix typo in security_task_prctl
Jeff Mahoney (1):
btrfs: skip waiting on ordered range for special files
Joe Stringer (1):
netfilter: nf_conntrack: Support expectations in different zones
Joe Thornber (2):
dm btree: add ref counting ops for the leaves of top level btrees dm cache: fix NULL pointer when switching from cleaner policy
Johan Hovold (1):
USB: whiteheat: fix potential null-deref at probe
Julian Anastasov (2):
ipvs: do not use random local source address for tunnels
ipvs: fix crash with sync protocol v0 and FTP
Linus Torvalds (1):
Initialize msg/shm IPC objects before doing ipc_addid()
Liu.Zhao (1):
USB: option: add ZTE PIDs
Mark Brown (2):
regmap: debugfs: Ensure we don't underflow when printing access masks
regmap: debugfs: Don't bother actually printing when calculating max length
Mark Salyzyn (1):
arm64: readahead: fault retry breaks mmap file read random detection
Mathias Nyman (2):
xhci: change xhci 1.0 only restrictions to support xhci 1.1
usb: Use the USB_SS_MULT() macro to get the burst multiplier.
Mel Gorman (1):
mm: hugetlbfs: skip shared VMAs when unmapping private pages to satisfy a fault
Michal Hocko (1):
scsi: fix scsi_error_handler vs. scsi_host_dev_release race
Mike Marciniszyn (1):
IB/qib: Change lkey table allocation to support more MRs
Mikulas Patocka (1):
dm raid: fix round up of default region size
NeilBrown (1):
md: flush ->event_work before stopping array.
Paul Bolle (1):
windfarm: decrement client count when unregistering
Paul Mackerras (1):
powerpc/MSI: Fix race condition in tearing down MSI interrupts
Reyad Attiyat (1):
usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers
Richard Weinberger (1):
UBI: Validate data_size
Robert Jarzmik (1):
ASoC: fix broken pxa SoC support
Roger Quadros (1):
usb: xhci: Clear XHCI_STATE_DYING on start
Roland Dreier (1):
fib_rules: Fix dump_rules() not to exit early
Shaohua Li (1):
x86/apic: Serialize LVTT and TSC_DEADLINE writes
Stephen Smalley (1):
x86/mm: Set NX on gap between __ex_table and rodata
Steve French (1):
disabling oplocks/leases via module parm enable_oplocks broken for SMB3
Takashi Iwai (1):
ALSA: synth: Fix conflicting OSS device registration on AWE32
Tan, Jui Nee (1):
spi: spi-pxa2xx: Check status register to determine if SSSR_TINT is disabled
Vincent Palatin (1):
usb: Add device quirk for Logitech PTZ cameras
Vitaly Kuznetsov (1):
x86/xen: Support kexec/kdump in HVM guests by doing a soft reset
Yao-Wen Mao (1):
USB: Add reset-resume quirk for two Plantronics usb headphones.
Yitian Bu (1):
ASoC: dwc: correct irq clear method
[email protected] (1):
staging: speakup: fix speakup-r regression
dingtianhong (1):
bonding: correct the MAC address for "follow" fail_over_mac policy
shengyong (1):
UBI: return ENOSPC if no enough space available
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 90 +SUBLEVEL = 91 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm/Makefile +8 -0
@@ -55,6 +55,14 @@ endif comma = , +# +# The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and +# later may result in code being generated that handles signed short and signed +# char struct members incorrectly. So disable it. +# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932) +# +KBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra) + # This selects which instruction set is used. # Note that GCC does not numerically define an architecture version # macro, but instead defines a whole series of macros which makes
arch/arm64/mm/fault.c +1 -0
@@ -278,6 +278,7 @@ retry:* starvation. */ mm_flags &= ~FAULT_FLAG_ALLOW_RETRY ; + mm_flags |=FAULT_FLAG_TRIED ; goto retry; } }
arch/m68k/include/asm/linkage.h +30 -0
@@ -4,4 +4,34 @@#define __ALIGN .align 4#define __ALIGN_STR ".align 4" +/* +* Make sure the compiler doesn't do anything stupid with the +* arguments on the stack - they are owned by the *caller*, not +* the callee. This just fools gcc into not spilling into them, +* and keeps it from doing tailcall recursion and/or using the +* stack slots for temporaries, since they are live and "used" +* all the way to the end of the function. +*/ +#define asmlinkage_protect(n, ret, args...) \ + __asmlinkage_protect##n(ret, ##args) +#define __asmlinkage_protect_n(ret, args...) \ + __asm__ __volatile__ ("" : "=r" (ret) : "0" (ret), ##args) +#define __asmlinkage_protect0 (ret) \ + __asmlinkage_protect_n(ret) +#define __asmlinkage_protect1 (ret, arg1) \ + __asmlinkage_protect_n(ret, "m" (arg1)) +#define __asmlinkage_protect2 (ret, arg1, arg2) \ + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2)) +#define __asmlinkage_protect3 (ret, arg1, arg2, arg3) \ + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3)) +#define __asmlinkage_protect4 (ret, arg1, arg2, arg3, arg4) \ + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \ + "m" (arg4)) +#define __asmlinkage_protect5 (ret, arg1, arg2, arg3, arg4, arg5) \ + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \ + "m" (arg4), "m" (arg5)) +#define __asmlinkage_protect6 (ret, arg1, arg2, arg3, arg4, arg5, arg6) \ + __asmlinkage_protect_n(ret, "m" (arg1), "m" (arg2), "m" (arg3), \ + "m" (arg4), "m" (arg5), "m" (arg6)) +#endif
arch/mips/mm/dma-default.c +1 -1
@@ -91,7 +91,7 @@ static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) else#endif #if defined(CONFIG_ZONE_DMA ) && !defined(CONFIG_ZONE_DMA32 ) -if (dev->coherent_dma_mask <DMA_BIT_MASK (64 )) +if (dev->coherent_dma_mask <DMA_BIT_MASK (sizeof (phys_addr_t) *8 )) dma_flag = __GFP_DMA; else#endif
arch/powerpc/platforms/powernv/pci.c +3 -2
@@ -106,6 +106,7 @@ static void pnv_teardown_msi_irqs(struct pci_dev *pdev)struct pci_controller *hose =pci_bus_to_host (pdev->bus);struct pnv_phb *phb = hose->private_data;struct msi_desc *entry; +irq_hw_number_t hwirq;if (WARN_ON (!phb))return ;
@@ -113,10 +114,10 @@ static void pnv_teardown_msi_irqs(struct pci_dev *pdev)list_for_each_entry (entry, &pdev->msi_list, list) {if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -msi_bitmap_free_hwirqs (&phb->msi_bmp, -virq_to_hw (entry->irq) - phb->msi_base,1 );irq_dispose_mapping (entry->irq); +msi_bitmap_free_hwirqs (&phb->msi_bmp, hwirq - phb->msi_base,1 ); } }#endif /* CONFIG_PCI_MSI */
arch/powerpc/sysdev/fsl_msi.c +3 -2
@@ -108,15 +108,16 @@ static void fsl_teardown_msi_irqs(struct pci_dev *pdev) {struct msi_desc *entry;struct fsl_msi *msi_data; +irq_hw_number_t hwirq;list_for_each_entry (entry, &pdev->msi_list, list) {if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq); msi_data =irq_get_chip_data (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -msi_bitmap_free_hwirqs (&msi_data->bitmap, -virq_to_hw (entry->irq),1 );irq_dispose_mapping (entry->irq); +msi_bitmap_free_hwirqs (&msi_data->bitmap, hwirq,1 ); }return ;
arch/powerpc/sysdev/mpic_pasemi_msi.c +4 -2
@@ -74,6 +74,7 @@ static int pasemi_msi_check_device(struct pci_dev *pdev, int nvec, int type)static void pasemi_msi_teardown_msi_irqs (struct pci_dev *pdev) {struct msi_desc *entry; +irq_hw_number_t hwirq;pr_debug ("pasemi_msi_teardown_msi_irqs, pdev %p\n" , pdev);
@@ -81,10 +82,11 @@ static void pasemi_msi_teardown_msi_irqs(struct pci_dev *pdev)if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -msi_bitmap_free_hwirqs (&msi_mpic->msi_bitmap, -virq_to_hw (entry->irq),ALLOC_CHUNK );irq_dispose_mapping (entry->irq); +msi_bitmap_free_hwirqs (&msi_mpic->msi_bitmap, + hwirq,ALLOC_CHUNK ); }return ;
arch/powerpc/sysdev/mpic_u3msi.c +3 -2
@@ -124,15 +124,16 @@ static int u3msi_msi_check_device(struct pci_dev *pdev, int nvec, int type)static void u3msi_teardown_msi_irqs (struct pci_dev *pdev) {struct msi_desc *entry; +irq_hw_number_t hwirq;list_for_each_entry (entry, &pdev->msi_list, list) {if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -msi_bitmap_free_hwirqs (&msi_mpic->msi_bitmap, -virq_to_hw (entry->irq),1 );irq_dispose_mapping (entry->irq); +msi_bitmap_free_hwirqs (&msi_mpic->msi_bitmap, hwirq,1 ); }return ;
arch/powerpc/sysdev/ppc4xx_msi.c +3 -2
@@ -121,16 +121,17 @@ void ppc4xx_teardown_msi_irqs(struct pci_dev *dev) {struct msi_desc *entry;struct ppc4xx_msi *msi_data = &ppc4xx_msi; +irq_hw_number_t hwirq;dev_dbg (&dev->dev,"PCIE-MSI: tearing down msi irqs\n" );list_for_each_entry (entry, &dev->msi_list, list) {if (entry->irq ==NO_IRQ )continue ; + hwirq =virq_to_hw (entry->irq);irq_set_msi_desc (entry->irq,NULL ); -msi_bitmap_free_hwirqs (&msi_data->bitmap, -virq_to_hw (entry->irq),1 );irq_dispose_mapping (entry->irq); +msi_bitmap_free_hwirqs (&msi_data->bitmap, hwirq,1 ); } }
arch/x86/include/asm/uaccess_64.h +18 -6
@@ -77,11 +77,10 @@ int copy_to_user(void __user *dst, const void *src, unsigned size) }static __always_inline __must_check -int __copy_from_user(void *dst, const void __user *src, unsigned size) +int __copy_from_user_nocheck(void *dst, const void __user *src, unsigned size) {int ret =0 ; -might_fault ();if (!__builtin_constant_p (size))return copy_user_generic (dst, (__force void *)src, size);switch (size) {
@@ -121,11 +120,17 @@ int __copy_from_user(void *dst, const void __user *src, unsigned size) }static __always_inline __must_check -int __copy_to_user(void __user *dst, const void *src, unsigned size) +int __copy_from_user(void *dst, const void __user *src, unsigned size) +{ +might_fault (); +return __copy_from_user_nocheck (dst, src, size); +} + +static __always_inline __must_check +int __copy_to_user_nocheck(void __user *dst, const void *src, unsigned size) {int ret =0 ; -might_fault ();if (!__builtin_constant_p (size))return copy_user_generic ((__force void *)dst, src, size);switch (size) {
@@ -165,6 +170,13 @@ int __copy_to_user(void __user *dst, const void *src, unsigned size) }static __always_inline __must_check +int __copy_to_user(void __user *dst, const void *src, unsigned size) +{ +might_fault (); +return __copy_to_user_nocheck (dst, src, size); +} + +static __always_inline __must_check int __copy_in_user(void __user *dst, const void __user *src, unsigned size) {int ret =0 ;
@@ -220,13 +232,13 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size) static __must_check __always_inline int__copy_from_user_inatomic (void *dst,const void __user *src,unsigned size) { -return copy_user_generic (dst, (__force const void *)src, size); +return __copy_from_user_nocheck (dst, (__force const void *)src, size); } static __must_check __always_inline int__copy_to_user_inatomic (void __user *dst,const void *src,unsigned size) { -return copy_user_generic ((__force void *)dst, src, size); +return __copy_to_user_nocheck ((__force void *)dst, src, size); } extern long __copy_user_nocache(void *dst, const void __user *src,
arch/x86/kernel/apic/apic.c +7 -0
@@ -350,6 +350,13 @@ static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen)apic_write (APIC_LVTT , lvtt_value);if (lvtt_value &APIC_LVT_TIMER_TSCDEADLINE ) { +/* +* See Intel SDM: TSC-Deadline Mode chapter. In xAPIC mode, +* writing to the APIC LVTT and TSC_DEADLINE MSR isn't serialized. +* According to Intel, MFENCE can do the serialization here. +*/ + asmvolatile ("mfence" : : :"memory" ); +printk_once (KERN_DEBUG "TSC deadline timer enabled\n" );return ; }
arch/x86/kernel/tsc.c +10 -7
@@ -20,6 +20,7 @@#include <asm/hypervisor.h> #include <asm/nmi.h> #include <asm/x86_init.h> +#include <asm/geode.h> unsigned int __read_mostly cpu_khz;/* TSC clocks / usec, not used here */ EXPORT_SYMBOL (cpu_khz);
@@ -806,15 +807,17 @@ EXPORT_SYMBOL_GPL(mark_tsc_unstable);static void __init check_system_tsc_reliable (void ) { -#ifdef CONFIG_MGEODE_LX -/* RTSC counts during suspend */ +#if defined(CONFIG_MGEODEGX1 ) || defined(CONFIG_MGEODE_LX ) || defined(CONFIG_X86_GENERIC ) +if (is_geode_lx ()) { +/* RTSC counts during suspend */ #define RTSC_SUSP 0x100 -unsigned long res_low, res_high; +unsigned long res_low, res_high; -rdmsr_safe (MSR_GEODE_BUSCONT_CONF0 , &res_low, &res_high); -/* Geode_LX - the OLPC CPU has a very reliable TSC */ -if (res_low &RTSC_SUSP ) - tsc_clocksource_reliable =1 ; +rdmsr_safe (MSR_GEODE_BUSCONT_CONF0 , &res_low, &res_high); +/* Geode_LX - the OLPC CPU has a very reliable TSC */ +if (res_low &RTSC_SUSP ) + tsc_clocksource_reliable =1 ; + }#endif if (boot_cpu_has (X86_FEATURE_TSC_RELIABLE )) tsc_clocksource_reliable =1 ;
arch/x86/kvm/svm.c +1 -1
@@ -496,7 +496,7 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu)struct vcpu_svm *svm =to_svm (vcpu);if (svm->vmcb->control.next_rip !=0 ) { -WARN_ON (!static_cpu_has (X86_FEATURE_NRIPS )); +WARN_ON_ONCE (!static_cpu_has (X86_FEATURE_NRIPS )); svm->next_rip = svm->vmcb->control.next_rip; }
arch/x86/mm/init_64.c +1 -1
@@ -1163,7 +1163,7 @@ void mark_rodata_ro(void)* has been zapped already via cleanup_highmem(). */ all_end =roundup ((unsigned long )_brk_end,PMD_SIZE ); -set_memory_nx (rodata_start, (all_end - rodata_start) >>PAGE_SHIFT ); +set_memory_nx (text_end, (all_end - text_end) >>PAGE_SHIFT );rodata_test ();
arch/x86/xen/enlighten.c +23 -0
@@ -33,6 +33,10 @@#include <linux/memblock.h> #include <linux/edd.h> +#ifdef CONFIG_KEXEC_CORE +#include <linux/kexec.h> +#endif +#include <xen/xen.h> #include <xen/events.h> #include <xen/interface/xen.h>
@@ -1744,6 +1748,21 @@ static struct notifier_block xen_hvm_cpu_notifier __cpuinitdata = { .notifier_call = xen_hvm_cpu_notify, }; +#ifdef CONFIG_KEXEC_CORE +static void xen_hvm_shutdown (void ) +{ +native_machine_shutdown (); +if (kexec_in_progress) +xen_reboot (SHUTDOWN_soft_reset); +} + +static void xen_hvm_crash_shutdown (struct pt_regs *regs) +{ +native_machine_crash_shutdown (regs); +xen_reboot (SHUTDOWN_soft_reset); +} +#endif +static void __init xen_hvm_guest_init (void ) {init_hvm_pv_info ();
@@ -1758,6 +1777,10 @@ static void __init xen_hvm_guest_init(void) x86_init.irqs.intr_init = xen_init_IRQ;xen_hvm_init_time_ops ();xen_hvm_init_mmu_ops (); +#ifdef CONFIG_KEXEC_CORE + machine_ops.shutdown = xen_hvm_shutdown; + machine_ops.crash_shutdown = xen_hvm_crash_shutdown; +#endif }static bool __init xen_hvm_platform (void )
drivers/base/regmap/regmap-debugfs.c +2 -3
@@ -23,8 +23,7 @@ static struct dentry *regmap_debugfs_root;/* Calculate the length of a fixed format */ static size_t regmap_calc_reg_len (int max_val,char *buf,size_t buf_size) { -snprintf (buf, buf_size,"%x" , max_val); -return strlen (buf); +return snprintf (NULL ,0 ,"%x" , max_val); } static ssize_t regmap_name_read_file(struct file *file,
@@ -419,7 +418,7 @@ static ssize_t regmap_access_read_file(struct file *file,/* If we're in the region the user is trying to read */ if (p >= *ppos) {/* ...but not beyond it */ -if (buf_pos >= count -1 - tot_len) +if (buf_pos + tot_len +1 >= count)break ;/* Format the register */
drivers/gpu/drm/drm_lock.c +6 -0
@@ -58,6 +58,9 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)struct drm_master *master = file_priv->master;int ret =0 ; +if (drm_core_check_feature (dev,DRIVER_MODESET )) +return -EINVAL ; + ++file_priv->lock_count;if (lock->context ==DRM_KERNEL_CONTEXT ) {
@@ -151,6 +154,9 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)struct drm_lock *lock = data;struct drm_master *master = file_priv->master; +if (drm_core_check_feature (dev,DRIVER_MODESET )) +return -EINVAL ; +if (lock->context ==DRM_KERNEL_CONTEXT ) {DRM_ERROR ("Process %d using kernel context %d\n" ,task_pid_nr (current), lock->context);
drivers/infiniband/hw/qib/qib.h +11 -16
@@ -1467,27 +1467,22 @@ extern struct mutex qib_mutex;* first to avoid possible serial port delays from printk. */ #define qib_early_err (dev, fmt, ...) \ - do { \ - dev_err(dev, fmt, ##__VA_ARGS__); \ - } while (0) + dev_err(dev, fmt, ##__VA_ARGS__)#define qib_dev_err (dd, fmt, ...) \ - do { \ - dev_err(&(dd)->pcidev->dev, "%s: " fmt, \ - qib_get_unit_name((dd)->unit), ##__VA_ARGS__); \ - } while (0) + dev_err(&(dd)->pcidev->dev, "%s: " fmt, \ + qib_get_unit_name((dd)->unit), ##__VA_ARGS__) -#define qib_dev_porterr (dd, port, fmt, ...) \ - do { \ - dev_err(&(dd)->pcidev->dev, "%s: IB%u:%u " fmt, \ - qib_get_unit_name((dd)->unit), (dd)->unit, (port), \ - ##__VA_ARGS__); \ - } while (0) +#define qib_dev_warn (dd, fmt, ...) \ + dev_warn(&(dd)->pcidev->dev, "%s: " fmt, \ + qib_get_unit_name((dd)->unit), ##__VA_ARGS__) +#define qib_dev_porterr (dd, port, fmt, ...) \ + dev_err(&(dd)->pcidev->dev, "%s: IB%u:%u " fmt, \ + qib_get_unit_name((dd)->unit), (dd)->unit, (port), \ + ##__VA_ARGS__)#define qib_devinfo (pcidev, fmt, ...) \ - do { \ - dev_info(&(pcidev)->dev, fmt, ##__VA_ARGS__); \ - } while (0) + dev_info(&(pcidev)->dev, fmt, ##__VA_ARGS__)/* * this is used for formatting hw error messages...
drivers/infiniband/hw/qib/qib_keys.c +4 -0
@@ -86,6 +86,10 @@ int qib_alloc_lkey(struct qib_mregion *mr, int dma_region)* unrestricted LKEY. */ rkt->gen++; +/* +* bits are capped in qib_verbs.c to insure enough bits +* for generation number +*/ mr->lkey = (r << (32 - ib_qib_lkey_table_size)) | ((((1 << (24 - ib_qib_lkey_table_size)) -1 ) & rkt->gen) <<8 );
drivers/infiniband/hw/qib/qib_verbs.c +10 -4
@@ -40,6 +40,7 @@#include <linux/rculist.h> #include <linux/mm.h> #include <linux/random.h> +#include <linux/vmalloc.h> #include "qib.h" #include "qib_common.h"
@@ -2084,10 +2085,16 @@ int qib_register_ib_device(struct qib_devdata *dd)* the LKEY). The remaining bits act as a generation number or tag. */ spin_lock_init (&dev->lk_table.lock); +/* insure generation is at least 4 bits see keys.c */ +if (ib_qib_lkey_table_size >MAX_LKEY_TABLE_BITS ) { +qib_dev_warn (dd,"lkey bits %u too large, reduced to %u\n" , + ib_qib_lkey_table_size,MAX_LKEY_TABLE_BITS ); + ib_qib_lkey_table_size =MAX_LKEY_TABLE_BITS ; + } dev->lk_table.max =1 << ib_qib_lkey_table_size; lk_tab_size = dev->lk_table.max *sizeof (*dev->lk_table.table); dev->lk_table.table = (struct qib_mregion __rcu **) -__get_free_pages (GFP_KERNEL ,get_order (lk_tab_size)); +vmalloc (lk_tab_size);if (dev->lk_table.table ==NULL ) { ret = -ENOMEM ; goto err_lk;
@@ -2260,7 +2267,7 @@ err_tx:sizeof (struct qib_pio_header ), dev->pio_hdrs, dev->pio_hdrs_phys); err_hdrs: -free_pages ((unsigned long ) dev->lk_table.table,get_order (lk_tab_size)); +vfree (dev->lk_table.table); err_lk:kfree (dev->qp_table); err_qpt:
@@ -2314,8 +2321,7 @@ void qib_unregister_ib_device(struct qib_devdata *dd)sizeof (struct qib_pio_header ), dev->pio_hdrs, dev->pio_hdrs_phys); lk_tab_size = dev->lk_table.max *sizeof (*dev->lk_table.table); -free_pages ((unsigned long ) dev->lk_table.table, -get_order (lk_tab_size)); +vfree (dev->lk_table.table);kfree (dev->qp_table); }
drivers/infiniband/hw/qib/qib_verbs.h +2 -0
@@ -645,6 +645,8 @@ struct qib_qpn_table {struct qpn_map map[QPNMAP_ENTRIES ]; }; +#define MAX_LKEY_TABLE_BITS 23 +struct qib_lkey_table {spinlock_t lock;/* protect changes in this struct */ u32 next;/* next unused index (speeds search) */
drivers/macintosh/windfarm_core.c +1 -1
@@ -435,7 +435,7 @@ int wf_unregister_client(struct notifier_block *nb) {mutex_lock (&wf_lock);blocking_notifier_chain_unregister (&wf_client_list, nb); - wf_client_count++; + wf_client_count--;if (wf_client_count ==0 )wf_stop_thread ();mutex_unlock (&wf_lock);
drivers/md/dm-cache-policy-cleaner.c +1 -1
@@ -434,7 +434,7 @@ static struct dm_cache_policy *wb_create(dm_cblock_t cache_size,static struct dm_cache_policy_type wb_policy_type = { .name ="cleaner" , .version = {1 ,0 ,0 }, - .hint_size =0 , + .hint_size =4 , .owner =THIS_MODULE , .create = wb_create };
drivers/md/dm-raid.c +1 -2
@@ -325,8 +325,7 @@ static int validate_region_size(struct raid_set *rs, unsigned long region_size)*/ if (min_region_size > (1 <<13 )) {/* If not a power of 2, make it the next power of 2 */ -if (min_region_size & (min_region_size -1 )) - region_size =1 <<fls (region_size); + region_size =roundup_pow_of_two (min_region_size);DMINFO ("Choosing default region size of %lu sectors" , region_size); }else {
drivers/md/md.c +2 -0
@@ -5306,6 +5306,8 @@ EXPORT_SYMBOL_GPL(md_stop_writes);static void __md_stop (struct mddev *mddev) { mddev->ready =0 ; +/* Ensure ->event_work is done */ +flush_workqueue (md_misc_wq); mddev->pers->stop (mddev);if (mddev->pers->sync_request && mddev->to_remove ==NULL ) mddev->to_remove = &md_redundancy_group;
drivers/md/persistent-data/dm-btree-internal.h +6 -0
@@ -138,4 +138,10 @@ int lower_bound(struct btree_node *n, uint64_t key);extern struct dm_block_validator btree_node_validator; +/* +* Value type for upper levels of multi-level btrees. +*/ +extern void init_le64_type (struct dm_transaction_manager *tm, +struct dm_btree_value_type *vt); +#endif /* DM_BTREE_INTERNAL_H */
drivers/md/persistent-data/dm-btree-remove.c +3 -9
@@ -544,14 +544,6 @@ static int remove_raw(struct shadow_spine *s, struct dm_btree_info *info,return r; } -static struct dm_btree_value_type le64_type = { - .context =NULL , - .size =sizeof (__le64), - .inc =NULL , - .dec =NULL , - .equal =NULL -}; -int dm_btree_remove (struct dm_btree_info *info,dm_block_t root,uint64_t *keys,dm_block_t *new_root) {
@@ -559,12 +551,14 @@ int dm_btree_remove(struct dm_btree_info *info, dm_block_t root,int index =0 , r =0 ;struct shadow_spine spine;struct btree_node *n; +struct dm_btree_value_type le64_vt; +init_le64_type (info->tm, &le64_vt);init_shadow_spine (&spine, info);for (level =0 ; level < info->levels; level++) { r =remove_raw (&spine, info, (level == last_level ? - &info->value_type : &le64_type), + &info->value_type : &le64_vt), root, keys[level], (unsigned *)&index);if (r <0 )break ;
drivers/md/persistent-data/dm-btree-spine.c +37 -0
@@ -249,3 +249,40 @@ int shadow_root(struct shadow_spine *s) {return s->root; } + +static void le64_inc (void *context,const void *value_le) +{ +struct dm_transaction_manager *tm = context; +__le64 v_le; + +memcpy (&v_le, value_le,sizeof (v_le)); +dm_tm_inc (tm,le64_to_cpu (v_le)); +} + +static void le64_dec (void *context,const void *value_le) +{ +struct dm_transaction_manager *tm = context; +__le64 v_le; + +memcpy (&v_le, value_le,sizeof (v_le)); +dm_tm_dec (tm,le64_to_cpu (v_le)); +} + +static int le64_equal (void *context,const void *value1_le,const void *value2_le) +{ +__le64 v1_le, v2_le; + +memcpy (&v1_le, value1_le,sizeof (v1_le)); +memcpy (&v2_le, value2_le,sizeof (v2_le)); +return v1_le == v2_le; +} + +void init_le64_type (struct dm_transaction_manager *tm, +struct dm_btree_value_type *vt) +{ + vt->context = tm; + vt->size =sizeof (__le64); + vt->inc = le64_inc; + vt->dec = le64_dec; + vt->equal = le64_equal; +}
drivers/md/persistent-data/dm-btree.c +1 -6
@@ -651,12 +651,7 @@ static int insert(struct dm_btree_info *info, dm_block_t root,struct btree_node *n;struct dm_btree_value_type le64_type; - le64_type.context =NULL ; - le64_type.size =sizeof (__le64); - le64_type.inc =NULL ; - le64_type.dec =NULL ; - le64_type.equal =NULL ; - +init_le64_type (info->tm, &le64_type);init_shadow_spine (&spine, info);for (level =0 ; level < (info->levels -1 ); level++) {
drivers/mtd/ubi/io.c +5 -0
@@ -931,6 +931,11 @@ static int validate_vid_hdr(const struct ubi_device *ubi, goto bad; } +if (data_size > ubi->leb_size) { +ubi_err ("bad data_size" ); + goto bad; + } +if (vol_type ==UBI_VID_STATIC ) {/* * Although from high-level point of view static volumes may
drivers/mtd/ubi/vtbl.c +1 -0
@@ -651,6 +651,7 @@ static int init_volumes(struct ubi_device *ubi,if (ubi->corr_peb_count)ubi_err ("%d PEBs are corrupted and not used" , ubi->corr_peb_count); +return -ENOSPC ; } ubi->rsvd_pebs += reserved_pebs; ubi->avail_pebs -= reserved_pebs;
drivers/mtd/ubi/wl.c +1 -0
@@ -1978,6 +1978,7 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai)if (ubi->corr_peb_count)ubi_err ("%d PEBs are corrupted and not used" , ubi->corr_peb_count); + err = -ENOSPC ; goto out_free; } ubi->avail_pebs -= reserved_pebs;
drivers/net/bonding/bond_main.c +20 -0
@@ -876,6 +876,23 @@ static void bond_mc_swap(struct bonding *bond, struct slave *new_active, } } +static struct slave *bond_get_old_active (struct bonding *bond, +struct slave *new_active) +{ +struct slave *slave; +int i; + +bond_for_each_slave (bond, slave, i) { +if (slave == new_active) +continue ; + +if (ether_addr_equal (bond->dev->dev_addr, slave->dev->dev_addr)) +return slave; + } + +return NULL ; +} +/* * bond_do_fail_over_mac *
@@ -919,6 +936,9 @@ static void bond_do_fail_over_mac(struct bonding *bond,write_unlock_bh (&bond->curr_slave_lock);read_unlock (&bond->lock); +if (!old_active) + old_active =bond_get_old_active (bond, new_active); +if (old_active) {memcpy (tmp_mac, new_active->dev->dev_addr,ETH_ALEN ); memcpy(saddr.sa_data, old_active->dev->dev_addr,
drivers/scsi/3w-9xxx.c +21 -7
@@ -225,6 +225,17 @@ static const struct file_operations twa_fops = { .llseek = noop_llseek, }; +/* +* The controllers use an inline buffer instead of a mapped SGL for small, +* single entry buffers. Note that we treat a zero-length transfer like +* a mapped SGL. +*/ +static bool twa_command_mapped (struct scsi_cmnd *cmd) +{ +return scsi_sg_count (cmd) !=1 || +scsi_bufflen (cmd) >=TW_MIN_SGL_LENGTH ; +} +/* This function will complete an aen request from the isr */ static int twa_aen_complete (TW_Device_Extension *tw_dev,int request_id) {
@@ -1351,7 +1362,8 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance) }/* Now complete the io */ -scsi_dma_unmap (cmd); +if (twa_command_mapped (cmd)) +scsi_dma_unmap (cmd); cmd->scsi_done (cmd); tw_dev->state[request_id] =TW_S_COMPLETED ;twa_free_request_id (tw_dev, request_id);
@@ -1594,7 +1606,8 @@ static int twa_reset_device_extension(TW_Device_Extension *tw_dev)struct scsi_cmnd *cmd = tw_dev->srb[i]; cmd->result = (DID_RESET <<16 ); -scsi_dma_unmap (cmd); +if (twa_command_mapped (cmd)) +scsi_dma_unmap (cmd); cmd->scsi_done (cmd); } }
@@ -1777,12 +1790,14 @@ static int twa_scsi_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_ retval =twa_scsiop_execute_scsi (tw_dev, request_id,NULL ,0 ,NULL );switch (retval) {case SCSI_MLQUEUE_HOST_BUSY : -scsi_dma_unmap (SCpnt); +if (twa_command_mapped (SCpnt)) +scsi_dma_unmap (SCpnt);twa_free_request_id (tw_dev, request_id);break ;case 1 : SCpnt->result = (DID_ERROR <<16 ); -scsi_dma_unmap (SCpnt); +if (twa_command_mapped (SCpnt)) +scsi_dma_unmap (SCpnt);done (SCpnt); tw_dev->state[request_id] =TW_S_COMPLETED ;twa_free_request_id (tw_dev, request_id);
@@ -1843,8 +1858,7 @@ static int twa_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id,/* Map sglist from scsi layer to cmd packet */ if (scsi_sg_count (srb)) { -if ((scsi_sg_count (srb) ==1 ) && - (scsi_bufflen (srb) <TW_MIN_SGL_LENGTH )) { +if (!twa_command_mapped (srb)) {if (srb->sc_data_direction ==DMA_TO_DEVICE || srb->sc_data_direction ==DMA_BIDIRECTIONAL ) scsi_sg_copy_to_buffer(srb,
@@ -1917,7 +1931,7 @@ static void twa_scsiop_execute_scsi_complete(TW_Device_Extension *tw_dev, int re {struct scsi_cmnd *cmd = tw_dev->srb[request_id]; -if (scsi_bufflen (cmd) <TW_MIN_SGL_LENGTH && +if (!twa_command_mapped (cmd) && (cmd->sc_data_direction ==DMA_FROM_DEVICE || cmd->sc_data_direction ==DMA_BIDIRECTIONAL )) {if (scsi_sg_count (cmd) ==1 ) {
drivers/scsi/scsi_error.c +10 -1
@@ -1849,8 +1849,17 @@ int scsi_error_handler(void *data)* We never actually get interrupted because kthread_run * disables signal delivery for the created thread. */ -while (!kthread_should_stop ()) { +while (true) { +/* +* The sequence in kthread_stop() sets the stop flag first +* then wakes the process. To avoid missed wakeups, the task +* should always be in a non running state before the stop +* flag is checked +*/ set_current_state (TASK_INTERRUPTIBLE ); +if (kthread_should_stop ()) +break ; +if ((shost->host_failed ==0 && shost->host_eh_scheduled ==0 ) || shost->host_failed != shost->host_busy) { SCSI_LOG_ERROR_RECOVERY(1,
drivers/spi/spi-pxa2xx.c +4 -0
@@ -546,6 +546,10 @@ static irqreturn_t ssp_int(int irq, void *dev_id)if (!(sccr1_reg &SSCR1_TIE )) mask &= ~SSSR_TFS ; +/* Ignore RX timeout interrupt if it is disabled */ +if (!(sccr1_reg &SSCR1_TINTE )) + mask &= ~SSSR_TINT ; +if (!(status & mask))return IRQ_NONE ;
drivers/spi/spi.c +1 -2
@@ -1030,8 +1030,7 @@ static struct class spi_master_class = {* * The caller is responsible for assigning the bus number and initializing * the master's methods before calling spi_register_master(); and (after errors -* adding the device) calling spi_master_put() and kfree() to prevent a memory -* leak. +* adding the device) calling spi_master_put() to prevent a memory leak. */ struct spi_master *spi_alloc_master (struct device *dev,unsigned size) {
drivers/staging/comedi/drivers/adl_pci7x3x.c +13 -2
@@ -119,10 +119,21 @@ static int adl_pci7x3x_do_insn_bits(struct comedi_device *dev,unsigned int bits = data[1 ];if (mask) { +unsigned int val; + s->state &= ~mask; s->state |= (bits & mask); - -outl (s->state, dev->iobase + reg); + val = s->state; +if (s->n_chan ==16 ) { +/* +* It seems the PCI-7230 needs the 16-bit DO state +* to be shifted left by 16 bits before being written +* to the 32-bit register. Set the value in both +* halves of the register to be sure. +*/ + val |= val <<16 ; + } +outl (val, dev->iobase + reg); }/*
drivers/staging/speakup/fakekey.c +1 -0
@@ -81,6 +81,7 @@ void speakup_fake_down_arrow(void)__this_cpu_write (reporting_keystroke, true);input_report_key (virt_keyboard,KEY_DOWN ,PRESSED );input_report_key (virt_keyboard,KEY_DOWN ,RELEASED ); +input_sync (virt_keyboard);__this_cpu_write (reporting_keystroke, false);/* reenable preemption */
drivers/usb/core/config.c +3 -2
@@ -114,7 +114,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno, cfgno, inum, asnum, ep->desc.bEndpointAddress); ep->ss_ep_comp.bmAttributes =16 ; }else if (usb_endpoint_xfer_isoc (&ep->desc) && - desc->bmAttributes >2 ) { +USB_SS_MULT (desc->bmAttributes) >3 ) { dev_warn(ddev, "Isoc endpoint has Mult of %d in " "config %d interface %d altsetting %d ep %d: " "setting to 3\n", desc->bmAttributes + 1,
@@ -123,7 +123,8 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno, }if (usb_endpoint_xfer_isoc (&ep->desc)) - max_tx = (desc->bMaxBurst +1 ) * (desc->bmAttributes +1 ) * + max_tx = (desc->bMaxBurst +1 ) * + (USB_SS_MULT (desc->bmAttributes)) *usb_endpoint_maxp (&ep->desc);else if (usb_endpoint_xfer_int (&ep->desc)) max_tx = usb_endpoint_maxp(&ep->desc) *
drivers/usb/core/quirks.c +13 -0
@@ -53,6 +53,13 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x046d, 0x082d), .driver_info = USB_QUIRK_DELAY_INIT }, { USB_DEVICE(0x046d, 0x0843), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Logitech ConferenceCam CC3000e */ + { USB_DEVICE(0x046d, 0x0847), .driver_info = USB_QUIRK_DELAY_INIT }, + { USB_DEVICE(0x046d, 0x0848), .driver_info = USB_QUIRK_DELAY_INIT }, + + /* Logitech PTZ Pro Camera */ + { USB_DEVICE(0x046d, 0x0853), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Logitech Quickcam Fusion */ { USB_DEVICE(0x046d, 0x08c1), .driver_info = USB_QUIRK_RESET_RESUME },
@@ -77,6 +84,12 @@ static const struct usb_device_id usb_quirk_list[] = {/* Philips PSC805 audio device */ { USB_DEVICE(0x0471, 0x0155), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Plantronic Audio 655 DSP */ + { USB_DEVICE(0x047f, 0xc008), .driver_info = USB_QUIRK_RESET_RESUME }, + + /* Plantronic Audio 648 USB */ + { USB_DEVICE(0x047f, 0xc013), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Artisman Watchdog Dongle */ { USB_DEVICE(0x04b4, 0x0526), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS },
drivers/usb/host/xhci-mem.c +3 -3
@@ -1473,10 +1473,10 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,* use Event Data TRBs, and we don't chain in a link TRB on short * transfers, we're basically dividing by 1. * -* xHCI 1.0 specification indicates that the Average TRB Length should -* be set to 8 for control endpoints. +* xHCI 1.0 and 1.1 specification indicates that the Average TRB Length +* should be set to 8 for control endpoints. */ -if (usb_endpoint_xfer_control (&ep->desc) && xhci->hci_version ==0x100 ) +if (usb_endpoint_xfer_control (&ep->desc) && xhci->hci_version >=0x100 ) ep_ctx->tx_info |=cpu_to_le32 (AVG_TRB_LENGTH_FOR_EP (8 ));else ep_ctx->tx_info |=
drivers/usb/host/xhci-ring.c +54 -16
155 lines not on this page · raw message
drivers/usb/host/xhci.c +7 -1
@@ -139,7 +139,8 @@ static int xhci_start(struct xhci_hcd *xhci)"waited %u microseconds.\n" , XHCI_MAX_HALT_USEC);if (!ret) - xhci->xhc_state &= ~XHCI_STATE_HALTED ; + xhci->xhc_state &= ~(XHCI_STATE_HALTED |XHCI_STATE_DYING ); +return ret; }
@@ -1299,6 +1300,11 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)if (usb_endpoint_xfer_isoc (&urb->ep->desc)) size = urb->number_of_packets; +else if (usb_endpoint_is_bulk_out (&urb->ep->desc) && + urb->transfer_buffer_length >0 && + urb->transfer_flags &URB_ZERO_PACKET && + !(urb->transfer_buffer_length %usb_endpoint_maxp (&urb->ep->desc))) + size =2 ;else size =1 ;
drivers/usb/serial/option.c +24 -0
@@ -276,6 +276,10 @@ static void option_instat_callback(struct urb *urb);#define ZTE_PRODUCT_MF622 0x0001#define ZTE_PRODUCT_MF628 0x0015#define ZTE_PRODUCT_MF626 0x0031 +#define ZTE_PRODUCT_ZM8620_X 0x0396 +#define ZTE_PRODUCT_ME3620_MBIM 0x0426 +#define ZTE_PRODUCT_ME3620_X 0x1432 +#define ZTE_PRODUCT_ME3620_L 0x1433#define ZTE_PRODUCT_AC2726 0xfff1#define ZTE_PRODUCT_CDMA_TECH 0xfffe#define ZTE_PRODUCT_AC8710T 0xffff
@@ -549,6 +553,18 @@ static const struct option_blacklist_info zte_mc2716_z_blacklist = { .sendsetup = BIT(1) | BIT(2) | BIT(3), }; +static const struct option_blacklist_info zte_me3620_mbim_blacklist = { + .reserved =BIT (2 ) |BIT (3 ) |BIT (4 ), +}; + +static const struct option_blacklist_info zte_me3620_xl_blacklist = { + .reserved =BIT (3 ) |BIT (4 ) |BIT (5 ), +}; + +static const struct option_blacklist_info zte_zm8620_x_blacklist = { + .reserved =BIT (3 ) |BIT (4 ) |BIT (5 ), +}; +static const struct option_blacklist_info huawei_cdc12_blacklist = { .reserved =BIT (1 ) |BIT (2 ), };
@@ -1579,6 +1595,14 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&zte_ad3812_z_blacklist }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2716, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&zte_mc2716_z_blacklist }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_L), + .driver_info = (kernel_ulong_t)&zte_me3620_xl_blacklist }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_MBIM), + .driver_info = (kernel_ulong_t)&zte_me3620_mbim_blacklist }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ME3620_X), + .driver_info = (kernel_ulong_t)&zte_me3620_xl_blacklist }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_ZM8620_X), + .driver_info = (kernel_ulong_t)&zte_zm8620_x_blacklist }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x01) }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x02, 0x05) }, { USB_VENDOR_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff, 0x86, 0x10) },
drivers/usb/serial/whiteheat.c +31 -0
@@ -81,6 +81,8 @@ static int whiteheat_firmware_download(struct usb_serial *serial,static int whiteheat_firmware_attach (struct usb_serial *serial);/* function prototypes for the Connect Tech WhiteHEAT serial converter */ +static int whiteheat_probe (struct usb_serial *serial, +const struct usb_device_id *id);static int whiteheat_attach (struct usb_serial *serial);static void whiteheat_release (struct usb_serial *serial);static int whiteheat_port_probe (struct usb_serial_port *port);
@@ -117,6 +119,7 @@ static struct usb_serial_driver whiteheat_device = { .description = "Connect Tech - WhiteHEAT", .id_table = id_table_std, .num_ports = 4, + .probe = whiteheat_probe, .attach = whiteheat_attach, .release = whiteheat_release, .port_probe = whiteheat_port_probe,
@@ -218,6 +221,34 @@ static int whiteheat_firmware_attach(struct usb_serial *serial)/***************************************************************************** * Connect Tech's White Heat serial driver functions *****************************************************************************/ + +static int whiteheat_probe (struct usb_serial *serial, +const struct usb_device_id *id) +{ +struct usb_host_interface *iface_desc; +struct usb_endpoint_descriptor *endpoint; +size_t num_bulk_in =0 ; +size_t num_bulk_out =0 ; +size_t min_num_bulk; +unsigned int i; + + iface_desc = serial->interface->cur_altsetting; + +for (i =0 ; i < iface_desc->desc.bNumEndpoints; i++) { + endpoint = &iface_desc->endpoint[i].desc; +if (usb_endpoint_is_bulk_in (endpoint)) + ++num_bulk_in; +if (usb_endpoint_is_bulk_out (endpoint)) + ++num_bulk_out; + } + + min_num_bulk =COMMAND_PORT +1 ; +if (num_bulk_in < min_num_bulk || num_bulk_out < min_num_bulk) +return -ENODEV ; + +return 0 ; +} +static int whiteheat_attach (struct usb_serial *serial) {struct usb_serial_port *command_port;
fs/btrfs/inode.c +2 -1
@@ -4650,7 +4650,8 @@ void btrfs_evict_inode(struct inode *inode) goto no_delete; }/* do we really want it for ->i_nlink > 0 and zero btrfs_root_refs? */ -btrfs_wait_ordered_range (inode,0 , (u64)-1 ); +if (!special_file (inode->i_mode)) +btrfs_wait_ordered_range (inode,0 , (u64)-1 );if (root->fs_info->log_root_recovering) { BUG_ON(test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
fs/cifs/smb2ops.c +6 -2
@@ -48,9 +48,13 @@ change_conf(struct TCP_Server_Info *server)break ;default : server->echoes = true; - server->oplocks = true; +if (enable_oplocks) { + server->oplocks = true; + server->oplock_credits =1 ; + }else + server->oplocks = false; + server->echo_credits =1 ; - server->oplock_credits =1 ; } server->credits -= server->echo_credits + server->oplock_credits;return 0 ;
fs/dcache.c +10 -0
@@ -2534,6 +2534,8 @@ static int prepend_path(const struct path *path,struct dentry *dentry = path->dentry;struct vfsmount *vfsmnt = path->mnt;struct mount *mnt =real_mount (vfsmnt); +char *orig_buffer = *buffer; +int orig_len = *buflen;bool slash = false;int error =0 ;
@@ -2541,6 +2543,14 @@ static int prepend_path(const struct path *path,struct dentry * parent;if (dentry == vfsmnt->mnt_root ||IS_ROOT (dentry)) { +/* Escaped? */ +if (dentry != vfsmnt->mnt_root) { + *buffer = orig_buffer; + *buflen = orig_len; + slash = false; + error =3 ; + goto global_root; + }/* Global root? */ if (!mnt_has_parent (mnt)) goto global_root;
fs/namei.c +27 -2
@@ -473,6 +473,24 @@ void path_put(const struct path *path) }EXPORT_SYMBOL (path_put); +/** +* path_connected - Verify that a path->dentry is below path->mnt.mnt_root +* @path: nameidate to verify +* +* Rename can sometimes move a file or directory outside of a bind +* mount, path_connected allows those cases to be detected. +*/ +static bool path_connected (const struct path *path) +{ +struct vfsmount *mnt = path->mnt; + +/* Only bind mounts can have disconnected paths */ +if (mnt->mnt_root == mnt->mnt_sb->s_root) +return true; + +return is_subdir (path->dentry, mnt->mnt_root); +} +/* * Path walking has 2 modes, rcu-walk and ref-walk (see * Documentation/filesystems/path-lookup.txt). In situations when we can't
@@ -1148,6 +1166,8 @@ static int follow_dotdot_rcu(struct nameidata *nd) goto failed; nd->path.dentry = parent; nd->seq = seq; +if (unlikely (!path_connected (&nd->path))) + goto failed;break ; }if (!follow_up_rcu (&nd->path))
@@ -1231,7 +1251,7 @@ static void follow_mount(struct path *path) } } -static void follow_dotdot (struct nameidata *nd) +static int follow_dotdot (struct nameidata *nd) {set_root (nd);
@@ -1246,6 +1266,10 @@ static void follow_dotdot(struct nameidata *nd)/* rare case of legitimate dget_parent()... */ nd->path.dentry =dget_parent (nd->path.dentry);dput (old); +if (unlikely (!path_connected (&nd->path))) { +path_put (&nd->path); +return -ENOENT ; + }break ; }if (!follow_up (&nd->path))
@@ -1253,6 +1277,7 @@ static void follow_dotdot(struct nameidata *nd) }follow_mount (&nd->path); nd->inode = nd->path.dentry->d_inode; +return 0 ; }/*
@@ -1476,7 +1501,7 @@ static inline int handle_dots(struct nameidata *nd, int type)if (follow_dotdot_rcu (nd))return -ECHILD ; }else -follow_dotdot (nd); +return follow_dotdot (nd); }return 0 ; }
fs/udf/inode.c +10 -0
@@ -1495,6 +1495,16 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh) iinfo->i_checkpoint =le32_to_cpu (efe->checkpoint); } +/* +* Sanity check length of allocation descriptors and extended attrs to +* avoid integer overflows +*/ +if (iinfo->i_lenEAttr > inode->i_sb->s_blocksize || iinfo->i_lenAlloc > inode->i_sb->s_blocksize) +return ; +/* Now do exact checks */ +if (udf_file_entry_alloc_offset (inode) + iinfo->i_lenAlloc > inode->i_sb->s_blocksize) +return ; +switch (fe->icbTag.fileType) {case ICBTAG_FILE_TYPE_DIRECTORY : inode->i_op = &udf_dir_inode_operations;
include/linux/security.h +1 -1
@@ -2394,7 +2394,7 @@ static inline int security_task_prctl(int option, unsigned long arg2,unsigned long arg4, unsigned long arg5) { - return cap_task_prctl(option, arg2, arg3, arg3, arg5); + return cap_task_prctl(option, arg2, arg3, arg4, arg5); }static inline void security_task_to_inode (struct task_struct *p,struct inode *inode)
include/xen/interface/sched.h +8 -0
@@ -107,5 +107,13 @@ struct sched_watchdog {#define SHUTDOWN_suspend 2/* Clean up, save suspend info, kill. */ #define SHUTDOWN_crash 3/* Tell controller we've crashed. */ #define SHUTDOWN_watchdog 4/* Restart because watchdog time expired. */ +/* +* Domain asked to perform 'soft reset' for it. The expected behavior is to +* reset internal Xen state for the domain returning it to the point where it +* was created but leaving the domain's memory contents and vCPU contexts +* intact. This will allow the domain to start over and set up all Xen specific +* interfaces again. +*/ +#define SHUTDOWN_soft_reset 5#endif /* __XEN_PUBLIC_SCHED_H__ */
ipc/msg.c +7 -7
@@ -202,13 +202,6 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)return retval; } -/* ipc_addid() locks msq upon success. */ - id =ipc_addid (&msg_ids (ns), &msq->q_perm, ns->msg_ctlmni); -if (id <0 ) { -ipc_rcu_putref (msq, msg_rcu_free); -return id; - } - msq->q_stime = msq->q_rtime =0 ; msq->q_ctime =get_seconds (); msq->q_cbytes = msq->q_qnum =0 ;
@@ -218,6 +211,13 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)INIT_LIST_HEAD (&msq->q_receivers);INIT_LIST_HEAD (&msq->q_senders); +/* ipc_addid() locks msq upon success. */ + id =ipc_addid (&msg_ids (ns), &msq->q_perm, ns->msg_ctlmni); +if (id <0 ) { +ipc_rcu_putref (msq, msg_rcu_free); +return id; + } +ipc_unlock_object (&msq->q_perm);rcu_read_unlock ();
ipc/shm.c +6 -6
@@ -544,12 +544,6 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)if (IS_ERR (file)) goto no_file; - id =ipc_addid (&shm_ids (ns), &shp->shm_perm, ns->shm_ctlmni); -if (id <0 ) { - error = id; - goto no_id; - } - shp->shm_cprid =task_tgid_vnr (current); shp->shm_lprid =0 ; shp->shm_atim = shp->shm_dtim =0 ;
@@ -559,6 +553,12 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) shp->shm_file = file; shp->shm_creator = current; + id =ipc_addid (&shm_ids (ns), &shp->shm_perm, ns->shm_ctlmni); +if (id <0 ) { + error = id; + goto no_id; + } +/* * shmid gets reported as "inode#" in /proc/pid/maps. * proc-ps tools use this. Changing this will break them.
ipc/util.c +4 -4
@@ -292,6 +292,10 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size)rcu_read_lock ();spin_lock (&new->lock); +current_euid_egid (&euid, &egid); + new->cuid = new->uid = euid; + new->gid = new->cgid = egid; + id =idr_alloc (&ids->ipcs_idr, new, (next_id <0 ) ?0 :ipcid_to_idx (next_id),0 ,GFP_NOWAIT );
@@ -304,10 +308,6 @@ int ipc_addid(struct ipc_ids* ids, struct kern_ipc_perm* new, int size) ids->in_use++; -current_euid_egid (&euid, &egid); - new->cuid = new->uid = euid; - new->gid = new->cgid = egid; -if (next_id <0 ) { new->seq = ids->seq++;if (ids->seq > ids->seq_max)
kernel/irq/proc.c +17 -2
@@ -12,6 +12,7 @@#include <linux/seq_file.h> #include <linux/interrupt.h> #include <linux/kernel_stat.h> +#include <linux/mutex.h> #include "internals.h"
@@ -309,18 +310,29 @@ void register_handler_proc(unsigned int irq, struct irqaction *action)void register_irq_proc (unsigned int irq,struct irq_desc *desc) { +static DEFINE_MUTEX (register_lock);char name [MAX_NAMELEN ]; -if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip) || desc->dir) +if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip))return ; +/* +* irq directories are registered only when a handler is +* added, not when the descriptor is created, so multiple +* tasks might try to register at the same time. +*/ +mutex_lock (®ister_lock); + +if (desc->dir) + goto out_unlock; +memset (name,0 ,MAX_NAMELEN );sprintf (name,"%d" , irq);/* create /proc/irq/1234 */ desc->dir =proc_mkdir (name, root_irq_dir);if (!desc->dir) -return ; + goto out_unlock;#ifdef CONFIG_SMP /* create /proc/irq/<irq>/smp_affinity */
@@ -341,6 +353,9 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc)proc_create_data ("spurious" ,0444 , desc->dir, &irq_spurious_proc_fops, (void *)(long )irq); + +out_unlock: +mutex_unlock (®ister_lock); }void unregister_irq_proc (unsigned int irq,struct irq_desc *desc)
mm/hugetlb.c +8 -0
@@ -2573,6 +2573,14 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,continue ;/* +* Shared VMAs have their own reserves and do not affect +* MAP_PRIVATE accounting but it is possible that a shared +* VMA is using the same page so check and skip such VMAs. +*/ +if (iter_vma->vm_flags &VM_MAYSHARE ) +continue ; + +/* * Unmap the page from other VMAs without their own reserves. * They get marked to be SIGKILLed if they fault in these * areas. This is because a future no-page fault on this VMA
net/core/fib_rules.c +1 -1
@@ -606,7 +606,7 @@ static int dump_rules(struct sk_buff *skb, struct netlink_callback *cb, err =fib_nl_fill_rule (skb, rule,NETLINK_CB (cb->skb).portid, cb->nlh->nlmsg_seq,RTM_NEWRULE ,NLM_F_MULTI , ops); -if (err) +if (err <0 )break ; skip: idx++;
net/netfilter/ipvs/ip_vs_sync.c +1 -1
@@ -599,7 +599,7 @@ static void ip_vs_sync_conn_v0(struct net *net, struct ip_vs_conn *cp, pkts =atomic_add_return (1 , &cp->in_pkts); else pkts =sysctl_sync_threshold (ipvs); -ip_vs_sync_conn (net, cp->control, pkts); +ip_vs_sync_conn (net, cp, pkts); } }
net/netfilter/ipvs/ip_vs_xmit.c +0 -1
@@ -129,7 +129,6 @@ static struct rtable *do_output_route4(struct net *net, __be32 daddr,memset (&fl4,0 ,sizeof (fl4)); fl4.daddr = daddr; - fl4.saddr = (rt_mode &IP_VS_RT_MODE_CONNECT ) ? *saddr :0 ; fl4.flowi4_flags = (rt_mode &IP_VS_RT_MODE_KNOWN_NH ) ?FLOWI_FLAG_KNOWN_NH :0 ;
net/netfilter/nf_conntrack_expect.c +2 -1
@@ -202,7 +202,8 @@ static inline int expect_clash(const struct nf_conntrack_expect *a, a->mask.src.u3.all[count] & b->mask.src.u3.all[count]; } -return nf_ct_tuple_mask_cmp (&a->tuple, &b->tuple, &intersect_mask); +return nf_ct_tuple_mask_cmp (&a->tuple, &b->tuple, &intersect_mask) && +nf_ct_zone (a->master) ==nf_ct_zone (b->master); } static inline int expect_matches(const struct nf_conntrack_expect *a,
sound/arm/Kconfig +8 -7
@@ -9,6 +9,14 @@ menuconfig SND_ARM Drivers that are implemented on ASoC can be found in "ALSA for SoC audio support" section. +config SND_PXA2XX_LIB + tristate + select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97 + select SND_DMAENGINE_PCM + +config SND_PXA2XX_LIB_AC97 + bool + if SND_ARM config SND_ARMAACI
@@ -21,13 +29,6 @@ config SND_PXA2XX_PCM tristate select SND_PCM -config SND_PXA2XX_LIB - tristate - select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97 - -config SND_PXA2XX_LIB_AC97 - bool - config SND_PXA2XX_AC97 tristate "AC97 driver for the Intel PXA2xx chip" depends on ARCH_PXA
sound/soc/dwc/designware_i2s.c +2 -2
@@ -100,10 +100,10 @@ static inline void i2s_clear_irqs(struct dw_i2s_dev *dev, u32 stream)if (stream ==SNDRV_PCM_STREAM_PLAYBACK ) {for (i =0 ; i <4 ; i++) -i2s_write_reg (dev->i2s_base,TOR (i),0 ); +i2s_read_reg (dev->i2s_base,TOR (i)); }else {for (i =0 ; i <4 ; i++) -i2s_write_reg (dev->i2s_base,ROR (i),0 ); +i2s_read_reg (dev->i2s_base,ROR (i)); } }
sound/soc/pxa/Kconfig +0 -2
@@ -1,7 +1,6 @@ config SND_PXA2XX_SOC tristate "SoC Audio for the Intel PXA2xx chip" depends on ARCH_PXA - select SND_ARM select SND_PXA2XX_LIB help Say Y or M if you want to add support for codecs attached to
@@ -24,7 +23,6 @@ config SND_PXA2XX_AC97 config SND_PXA2XX_SOC_AC97 tristate select AC97_BUS - select SND_ARM select SND_PXA2XX_LIB_AC97 select SND_SOC_AC97_BUS
sound/synth/emux/emux_oss.c +2 -1
@@ -69,7 +69,8 @@ snd_emux_init_seq_oss(struct snd_emux *emu)struct snd_seq_oss_reg *arg;struct snd_seq_device *dev; -if (snd_seq_device_new (emu->card,0 ,SNDRV_SEQ_DEV_ID_OSS , +/* using device#1 here for avoiding conflicts with OPL3 */ +if (snd_seq_device_new (emu->card,1 ,SNDRV_SEQ_DEV_ID_OSS ,sizeof (struct snd_seq_oss_reg ), &dev) <0 )return ;
tools/perf/util/header.c +2 -2
@@ -1729,7 +1729,7 @@ static int process_nrcpus(struct perf_file_section *section __maybe_unused,if (ph->needs_swap) nr =bswap_32 (nr); - ph->env.nr_cpus_online = nr; + ph->env.nr_cpus_avail = nr; ret =readn (fd, &nr,sizeof (nr));if (ret !=sizeof (nr))
@@ -1738,7 +1738,7 @@ static int process_nrcpus(struct perf_file_section *section __maybe_unused,if (ph->needs_swap) nr =bswap_32 (nr); - ph->env.nr_cpus_avail = nr; + ph->env.nr_cpus_online = nr;return 0 ; }