Linux 4.4.141
Greg KH
maintainerI'm announcing the release of the 4.4.141 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.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
------------
Documentation/kernel-parameters.txt | 2 Makefile | 2 arch/mips/mm/ioremap.c | 37 +- arch/x86/Kconfig | 11 arch/x86/Kconfig.debug | 10 arch/x86/boot/cpuflags.h | 2 arch/x86/boot/mkcpustr.c | 2 arch/x86/crypto/crc32-pclmul_glue.c | 2 arch/x86/crypto/crc32c-intel_glue.c | 2 arch/x86/crypto/crct10dif-pclmul_glue.c | 2 arch/x86/entry/common.c | 1 arch/x86/entry/entry_32.S | 2 arch/x86/entry/vdso/vdso32-setup.c | 1 arch/x86/entry/vdso/vdso32/system_call.S | 2 arch/x86/entry/vdso/vma.c | 3 arch/x86/include/asm/alternative.h | 6 arch/x86/include/asm/apic.h | 1 arch/x86/include/asm/arch_hweight.h | 2 arch/x86/include/asm/atomic.h | 1 arch/x86/include/asm/atomic64_32.h | 1 arch/x86/include/asm/cmpxchg.h | 1 arch/x86/include/asm/cpufeature.h | 546 +++++-------------------------- arch/x86/include/asm/cpufeatures.h | 306 +++++++++++++++++ arch/x86/include/asm/disabled-features.h | 17 arch/x86/include/asm/fpu/internal.h | 182 ++++------ arch/x86/include/asm/irq_work.h | 2 arch/x86/include/asm/mwait.h | 2 arch/x86/include/asm/nospec-branch.h | 2 arch/x86/include/asm/processor.h | 3 arch/x86/include/asm/required-features.h | 9 arch/x86/include/asm/smap.h | 2 arch/x86/include/asm/smp.h | 1 arch/x86/include/asm/thread_info.h | 2 arch/x86/include/asm/tlbflush.h | 1 arch/x86/include/asm/uaccess_64.h | 2 arch/x86/kernel/apic/apic_numachip.c | 4 arch/x86/kernel/cpu/Makefile | 2 arch/x86/kernel/cpu/centaur.c | 4 arch/x86/kernel/cpu/common.c | 71 +--- arch/x86/kernel/cpu/cyrix.c | 1 arch/x86/kernel/cpu/intel.c | 2 arch/x86/kernel/cpu/intel_cacheinfo.c | 2 arch/x86/kernel/cpu/match.c | 2 arch/x86/kernel/cpu/mkcapflags.sh | 6 arch/x86/kernel/cpu/mtrr/main.c | 2 arch/x86/kernel/cpu/scattered.c | 20 - arch/x86/kernel/cpu/transmeta.c | 6 arch/x86/kernel/e820.c | 1 arch/x86/kernel/head_32.S | 2 arch/x86/kernel/head_64.S | 4 arch/x86/kernel/hpet.c | 1 arch/x86/kernel/msr.c | 2 arch/x86/kernel/uprobes.c | 2 arch/x86/kernel/verify_cpu.S | 2 arch/x86/kernel/vm86_32.c | 2 arch/x86/kernel/vmlinux.lds.S | 11 arch/x86/lib/clear_page_64.S | 2 arch/x86/lib/copy_page_64.S | 2 arch/x86/lib/copy_user_64.S | 2 arch/x86/lib/memcpy_64.S | 2 arch/x86/lib/memmove_64.S | 2 arch/x86/lib/memset_64.S | 2 arch/x86/lib/retpoline.S | 2 arch/x86/mm/setup_nx.c | 1 arch/x86/oprofile/op_model_amd.c | 1 arch/x86/um/asm/barrier.h | 2 drivers/ata/ahci.c | 59 +++ drivers/ata/libata-core.c | 3 drivers/block/loop.c | 79 ++-- drivers/block/loop.h | 1 drivers/hid/hid-ids.h | 3 drivers/hid/usbhid/hid-quirks.c | 1 drivers/infiniband/Kconfig | 12 drivers/infiniband/core/Makefile | 4 drivers/infiniband/hw/cxgb4/mem.c | 2 drivers/misc/ibmasm/ibmasmfs.c | 27 - drivers/misc/vmw_balloon.c | 4 drivers/usb/core/quirks.c | 4 drivers/usb/host/xhci-mem.c | 2 drivers/usb/misc/yurex.c | 23 - drivers/usb/serial/ch341.c | 2 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/keyspan_pda.c | 4 drivers/usb/serial/mos7840.c | 3 fs/btrfs/disk-io.c | 2 fs/inode.c | 6 include/linux/libata.h | 1 kernel/power/user.c | 5 lib/atomic64_test.c | 4 net/bridge/netfilter/ebtables.c | 2 net/ipv4/netfilter/ip_tables.c | 1 net/ipv6/netfilter/ip6_tables.c | 1 net/netfilter/nfnetlink_queue.c | 3 tools/build/Build.include | 4 94 files changed, 830 insertions(+), 770 deletions(-)
Alexander Kuleshov (1):
x86/boot: Simplify kernel load address alignment check
Andi Kleen (1):
x86/headers: Don't include asm/processor.h in asm/atomic.h
Borislav Petkov (11):
x86/cpufeature: Move some of the scattered feature bits to x86_capability x86/cpufeature: Cleanup get_cpu_cap()
x86/cpu: Provide a config option to disable static_cpu_has x86/fpu: Add an XSTATE_OP() macro
x86/fpu: Get rid of xstate_fault()
x86/cpufeature: Carve out X86_FEATURE_*
x86/cpufeature: Replace the old static_cpu_has() with safe variant x86/cpufeature: Get rid of the non-asm goto variant x86/alternatives: Add an auxilary section
x86/vdso: Use static_cpu_has()
x86/cpufeature: Speed up cpu_feature_enabled()
Brian Gerst (1):
x86/alternatives: Discard dynamic check after init
Dan Carpenter (2):
USB: serial: ch341: fix type promotion bug in ch341_control_in()
xhci: xhci-mem: off by one in xhci_stream_id_to_ring()
Dave Hansen (6):
x86/cpufeature, x86/mm/pkeys: Add protection keys related CPUID definitions x86/mm/pkeys: Fix mismerge of protection keys CPUID bits x86/cpufeature, x86/mm/pkeys: Fix broken compile-time disabling of pkeys x86/cpufeature: Update cpufeaure macros
x86/cpufeature: Make sure DISABLED/REQUIRED macros are updated x86/cpufeature: Add helper macro for mask check macros
Eric Dumazet (1):
netfilter: nf_queue: augment nfqa_cfg_policy
Florian Westphal (1):
netfilter: x_tables: initialise match/target check parameter struct
Greg Kroah-Hartman (1):
Linux 4.4.141
Hans de Goede (1):
ahci: Disable LPM on Lenovo 50 series laptops with a too old BIOS
Jann Horn (2):
ibmasm: don't write out of bounds in read handler
USB: yurex: fix out-of-bounds uaccess in read handler
Johan Hovold (2):
USB: serial: keyspan_pda: fix modem-status error handling
USB: serial: mos7840: fix status-register error handling
Leon Romanovsky (1):
RDMA/ucm: Mark UCM interface as BROKEN
Linus Torvalds (1):
Fix up non-directory creation in SGID directories
Nadav Amit (1):
vmw_balloon: fix inflation with batching
Nico Sneck (1):
usb: quirks: add delay quirks for Corsair Strafe
Oleg Nesterov (1):
uprobes/x86: Remove incorrect WARN_ON() in uprobe_init_insn()
Olli Salonen (1):
USB: serial: cp210x: add another USB ID for Qivicon ZigBee stick
Paul Burton (1):
MIPS: Fix ioremap() RAM check
Paul Menzel (1):
tools build: fix # escaping in .cmd files for future Make
Steve Wise (1):
iw_cxgb4: correctly enforce the max reg_mr depth
Tetsuo Handa (2):
PM / hibernate: Fix oops at snapshot_write()
loop: remember whether sysfs_create_group() was done
Theodore Ts'o (1):
loop: add recursion validation to LOOP_CHANGE_FD
Tomasz Kramkowski (1):
HID: usbhid: add quirk for innomedia INNEX GENESIS/ATARI adapter
Yazen Ghannam (1):
x86/cpu: Add detection of AMD RAS Capabilities
Greg KH
maintainerDocumentation/kernel-parameters.txt +1 -1
@@ -652,7 +652,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. clearcpuid=BITNUM [X86] Disable CPUID feature X for the kernel. See - arch/x86/include/asm/cpufeature.h for the valid bit + arch/x86/include/asm/cpufeatures.h for the valid bit numbers. Note the Linux specific bits are not necessarily stable over kernel options, but the vendor specific ones should be.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 140 +SUBLEVEL = 141 EXTRAVERSION = NAME = Blurry Fish Butt
arch/mips/mm/ioremap.c +25 -12
@@ -9,6 +9,7 @@#include <linux/module.h> #include <asm/addrspace.h> #include <asm/byteorder.h> +#include <linux/ioport.h> #include <linux/sched.h> #include <linux/slab.h> #include <linux/vmalloc.h>
@@ -97,6 +98,20 @@ static int remap_area_pages(unsigned long address, phys_addr_t phys_addr,return error; } +static int __ioremap_check_ram (unsigned long start_pfn,unsigned long nr_pages, +void *arg) +{ +unsigned long i; + +for (i =0 ; i < nr_pages; i++) { +if (pfn_valid (start_pfn + i) && + !PageReserved (pfn_to_page (start_pfn + i))) +return 1 ; + } + +return 0 ; +} +/* * Generic mapping function (not visible outside): */
@@ -115,8 +130,8 @@ static int remap_area_pages(unsigned long address, phys_addr_t phys_addr,void __iomem *__ioremap (phys_addr_t phys_addr,phys_addr_t size,unsigned long flags) { +unsigned long offset, pfn, last_pfn;struct vm_struct * area; -unsigned long offset;phys_addr_t last_addr;void * addr;
@@ -136,18 +151,16 @@ void __iomem * __ioremap(phys_addr_t phys_addr, phys_addr_t size, unsigned longreturn (void __iomem *)CKSEG1ADDR (phys_addr);/* -* Don't allow anybody to remap normal RAM that we're using.. +* Don't allow anybody to remap RAM that may be allocated by the page +* allocator, since that could lead to races & data clobbering. */ -if (phys_addr <virt_to_phys (high_memory)) { -char *t_addr, *t_end; -struct page *page; - - t_addr =__va (phys_addr); - t_end = t_addr + (size -1 ); - -for (page =virt_to_page (t_addr); page <=virt_to_page (t_end); page++) -if (!PageReserved (page)) -return NULL ; + pfn =PFN_DOWN (phys_addr); + last_pfn =PFN_DOWN (last_addr); +if (walk_system_ram_range (pfn, last_pfn - pfn +1 ,NULL , + __ioremap_check_ram) ==1 ) { +WARN_ONCE (1 ,"ioremap on RAM at %pa - %pa\n" , + &phys_addr, &last_addr); +return NULL ; }/*
arch/x86/Kconfig +11 -0
@@ -346,6 +346,17 @@ config X86_FEATURE_NAMES If in doubt, say Y. +config X86_FAST_FEATURE_TESTS + bool "Fast CPU feature tests" if EMBEDDED + default y + ---help--- + Some fast-paths in the kernel depend on the capabilities of the CPU. + Say Y here for the kernel to patch in the appropriate code at runtime + based on the capabilities of the CPU. The infrastructure for patching + code at runtime takes up some additional space; space-constrained + embedded systems may wish to say N here to produce smaller, slightly + slower code. + config X86_X2APIC bool "Support x2apic" depends on X86_LOCAL_APIC && X86_64 && (IRQ_REMAP || HYPERVISOR_GUEST)
arch/x86/Kconfig.debug +0 -10
@@ -367,16 +367,6 @@ config DEBUG_IMR_SELFTEST If unsure say N here. -config X86_DEBUG_STATIC_CPU_HAS - bool "Debug alternatives" - depends on DEBUG_KERNEL - ---help--- - This option causes additional code to be generated which - fails if static_cpu_has() is used before alternatives have - run. - - If unsure, say N. - config X86_DEBUG_FPU bool "Debug the x86 FPU code" depends on DEBUG_KERNEL
arch/x86/boot/cpuflags.h +1 -1
@@ -1,7 +1,7 @@#ifndef BOOT_CPUFLAGS_H #define BOOT_CPUFLAGS_H -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/processor-flags.h> struct cpu_features {
arch/x86/boot/mkcpustr.c +1 -1
@@ -17,7 +17,7 @@#include "../include/asm/required-features.h" #include "../include/asm/disabled-features.h" -#include "../include/asm/cpufeature.h" +#include "../include/asm/cpufeatures.h" #include "../kernel/cpu/capflags.c" int main (void )
arch/x86/crypto/crc32-pclmul_glue.c +1 -1
@@ -33,7 +33,7 @@#include <linux/crc32.h> #include <crypto/internal/hash.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/cpu_device_id.h> #include <asm/fpu/api.h>
arch/x86/crypto/crc32c-intel_glue.c +1 -1
@@ -30,7 +30,7 @@#include <linux/kernel.h> #include <crypto/internal/hash.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/cpu_device_id.h> #include <asm/fpu/internal.h>
arch/x86/crypto/crct10dif-pclmul_glue.c +1 -1
@@ -30,7 +30,7 @@#include <linux/string.h> #include <linux/kernel.h> #include <asm/fpu/api.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/cpu_device_id.h> asmlinkage __u16 crc_t10dif_pcl(__u16 crc, const unsigned char *buf,
arch/x86/entry/common.c +1 -0
@@ -27,6 +27,7 @@#include <asm/traps.h> #include <asm/vdso.h> #include <asm/uaccess.h> +#include <asm/cpufeature.h> #define CREATE_TRACE_POINTS #include <trace/events/syscalls.h>
arch/x86/entry/entry_32.S +1 -1
@@ -40,7 +40,7 @@ #include <asm/processor-flags.h> #include <asm/ftrace.h> #include <asm/irq_vectors.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/smap.h>
arch/x86/entry/vdso/vdso32-setup.c +0 -1
@@ -11,7 +11,6 @@#include <linux/kernel.h> #include <linux/mm_types.h> -#include <asm/cpufeature.h> #include <asm/processor.h> #include <asm/vdso.h>
arch/x86/entry/vdso/vdso32/system_call.S +1 -1
@@ -3,7 +3,7 @@ */ #include <asm/dwarf2.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/alternative-asm.h> /*
arch/x86/entry/vdso/vma.c +2 -1
@@ -20,6 +20,7 @@#include <asm/page.h> #include <asm/hpet.h> #include <asm/desc.h> +#include <asm/cpufeature.h> #if defined(CONFIG_X86_64 )unsigned int __read_mostly vdso64_enabled =1 ;
@@ -254,7 +255,7 @@ static void vgetcpu_cpu_init(void *arg)#ifdef CONFIG_NUMA node =cpu_to_node (cpu);#endif -if (cpu_has (&cpu_data (cpu),X86_FEATURE_RDTSCP )) +if (static_cpu_has (X86_FEATURE_RDTSCP ))write_rdtscp_aux ((node <<12 ) | cpu);/*
arch/x86/include/asm/alternative.h +0 -6
@@ -153,12 +153,6 @@ static inline int alternatives_text_reserved(void *start, void *end) ALTINSTR_REPLACEMENT(newinstr2, feature2, 2) \".popsection\n" -/* -* This must be included *after* the definition of ALTERNATIVE due to -* <asm/arch_hweight.h> - */ -#include <asm/cpufeature.h> -/* * Alternative instructions for different CPU types or capabilities. *
arch/x86/include/asm/apic.h +0 -1
@@ -6,7 +6,6 @@#include <asm/alternative.h> #include <asm/cpufeature.h> -#include <asm/processor.h> #include <asm/apicdef.h> #include <linux/atomic.h> #include <asm/fixmap.h>
arch/x86/include/asm/arch_hweight.h +2 -0
@@ -1,6 +1,8 @@#ifndef _ASM_X86_HWEIGHT_H#define _ASM_X86_HWEIGHT_H +#include <asm/cpufeatures.h> +#ifdef CONFIG_64BIT /* popcnt %edi, %eax */ #define POPCNT32 ".byte 0xf3,0x0f,0xb8,0xc7"
arch/x86/include/asm/atomic.h +0 -1
@@ -3,7 +3,6 @@#include <linux/compiler.h> #include <linux/types.h> -#include <asm/processor.h> #include <asm/alternative.h> #include <asm/cmpxchg.h> #include <asm/rmwcc.h>
arch/x86/include/asm/atomic64_32.h +0 -1
@@ -3,7 +3,6 @@#include <linux/compiler.h> #include <linux/types.h> -#include <asm/processor.h> //#include <asm/cmpxchg.h> /* An 64bit atomic type */
arch/x86/include/asm/cmpxchg.h +1 -0
@@ -2,6 +2,7 @@#define ASM_X86_CMPXCHG_H #include <linux/compiler.h> +#include <asm/cpufeatures.h> #include <asm/alternative.h> /* Provides LOCK_PREFIX */ /*
arch/x86/include/asm/cpufeature.h +98 -448
608 lines not on this page · raw message
arch/x86/include/asm/cpufeatures.h new file +306 -0
306 lines not on this page · raw message
arch/x86/include/asm/disabled-features.h +17 -0
@@ -30,6 +30,14 @@# define DISABLE_PCID (1<<(X86_FEATURE_PCID & 31))#endif /* CONFIG_X86_64 */ +#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS +# define DISABLE_PKU 0 +# define DISABLE_OSPKE 0 +#else +# define DISABLE_PKU (1<<(X86_FEATURE_PKU & 31)) +# define DISABLE_OSPKE (1<<(X86_FEATURE_OSPKE & 31)) +#endif /* CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS */ +/* * Make sure to add features to the correct mask */
@@ -43,5 +51,14 @@#define DISABLED_MASK7 0#define DISABLED_MASK8 0#define DISABLED_MASK9 (DISABLE_MPX) +#define DISABLED_MASK10 0 +#define DISABLED_MASK11 0 +#define DISABLED_MASK12 0 +#define DISABLED_MASK13 0 +#define DISABLED_MASK14 0 +#define DISABLED_MASK15 0 +#define DISABLED_MASK16 (DISABLE_PKU|DISABLE_OSPKE) +#define DISABLED_MASK17 0 +#define DISABLED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 18)#endif /* _ASM_X86_DISABLED_FEATURES_H */
arch/x86/include/asm/fpu/internal.h +88 -94
262 lines not on this page · raw message
arch/x86/include/asm/irq_work.h +1 -1
@@ -1,7 +1,7 @@#ifndef _ASM_IRQ_WORK_H#define _ASM_IRQ_WORK_H -#include <asm/processor.h> +#include <asm/cpufeature.h> static inline bool arch_irq_work_has_interrupt (void ) {
arch/x86/include/asm/mwait.h +2 -0
@@ -3,6 +3,8 @@#include <linux/sched.h> +#include <asm/cpufeature.h> +#define MWAIT_SUBSTATE_MASK 0xf#define MWAIT_CSTATE_MASK 0xf#define MWAIT_SUBSTATE_SIZE 4
arch/x86/include/asm/nospec-branch.h +1 -1
@@ -5,7 +5,7 @@#include <asm/alternative.h> #include <asm/alternative-asm.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> /* * Fill the CPU return stack buffer.
arch/x86/include/asm/processor.h +1 -2
@@ -13,7 +13,7 @@ struct vm86;#include <asm/types.h> #include <uapi/asm/sigcontext.h> #include <asm/current.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/page.h> #include <asm/pgtable_types.h> #include <asm/percpu.h>
@@ -24,7 +24,6 @@ struct vm86;#include <asm/fpu/types.h> #include <linux/personality.h> -#include <linux/cpumask.h> #include <linux/cache.h> #include <linux/threads.h> #include <linux/math64.h>
arch/x86/include/asm/required-features.h +9 -0
@@ -92,5 +92,14 @@#define REQUIRED_MASK7 0#define REQUIRED_MASK8 0#define REQUIRED_MASK9 0 +#define REQUIRED_MASK10 0 +#define REQUIRED_MASK11 0 +#define REQUIRED_MASK12 0 +#define REQUIRED_MASK13 0 +#define REQUIRED_MASK14 0 +#define REQUIRED_MASK15 0 +#define REQUIRED_MASK16 0 +#define REQUIRED_MASK17 0 +#define REQUIRED_MASK_CHECK BUILD_BUG_ON_ZERO(NCAPINTS != 18)#endif /* _ASM_X86_REQUIRED_FEATURES_H */
arch/x86/include/asm/smap.h +1 -1
@@ -15,7 +15,7 @@#include <linux/stringify.h> #include <asm/nops.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> /* "Raw" instruction opcodes */ #define __ASM_CLAC .byte 0x0f,0x01,0xca
arch/x86/include/asm/smp.h +0 -1
@@ -16,7 +16,6 @@#endif #include <asm/thread_info.h> #include <asm/cpumask.h> -#include <asm/cpufeature.h> extern int smp_num_siblings;extern unsigned int num_processors;
arch/x86/include/asm/thread_info.h +1 -1
@@ -49,7 +49,7 @@*/ #ifndef __ASSEMBLY__struct task_struct ; -#include <asm/processor.h> +#include <asm/cpufeature.h> #include <linux/atomic.h> struct thread_info {
arch/x86/include/asm/tlbflush.h +1 -0
@@ -5,6 +5,7 @@#include <linux/sched.h> #include <asm/processor.h> +#include <asm/cpufeature.h> #include <asm/special_insns.h> #include <asm/smp.h>
arch/x86/include/asm/uaccess_64.h +1 -1
@@ -8,7 +8,7 @@#include <linux/errno.h> #include <linux/lockdep.h> #include <asm/alternative.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/page.h> /*
arch/x86/kernel/apic/apic_numachip.c +2 -2
@@ -30,7 +30,7 @@ static unsigned int numachip1_get_apic_id(unsigned long x)unsigned long value;unsigned int id = (x >>24 ) &0xff ; -if (static_cpu_has_safe (X86_FEATURE_NODEID_MSR )) { +if (static_cpu_has (X86_FEATURE_NODEID_MSR )) {rdmsrl (MSR_FAM10H_NODE_ID , value); id |= (value <<2 ) &0xff00 ; }
@@ -178,7 +178,7 @@ static void fixup_cpu_id(struct cpuinfo_x86 *c, int node)this_cpu_write (cpu_llc_id, node);/* Account for nodes per socket in multi-core-module processors */ -if (static_cpu_has_safe (X86_FEATURE_NODEID_MSR )) { +if (static_cpu_has (X86_FEATURE_NODEID_MSR )) {rdmsrl (MSR_FAM10H_NODE_ID , val); nodes = ((val >>3 ) &7 ) +1 ; }
arch/x86/kernel/cpu/Makefile +1 -1
@@ -62,7 +62,7 @@ ifdef CONFIG_X86_FEATURE_NAMES quiet_cmd_mkcapflags = MKCAP $@ cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@ -cpufeature = $(src)/../../include/asm/cpufeature.h +cpufeature = $(src)/../../include/asm/cpufeatures.h targets += capflags.c $(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE
arch/x86/kernel/cpu/centaur.c +2 -2
@@ -1,7 +1,7 @@#include <linux/bitops.h> #include <linux/kernel.h> -#include <asm/processor.h> +#include <asm/cpufeature.h> #include <asm/e820.h> #include <asm/mtrr.h> #include <asm/msr.h>
@@ -43,7 +43,7 @@ static void init_c3(struct cpuinfo_x86 *c)/* store Centaur Extended Feature Flags as * word 5 of the CPU capability bit array */ - c->x86_capability[5 ] =cpuid_edx (0xC0000001 ); + c->x86_capability[CPUID_C000_0001_EDX ] =cpuid_edx (0xC0000001 ); }#ifdef CONFIG_X86_32 /* Cyrix III family needs CX8 & PGE explicitly enabled. */
arch/x86/kernel/cpu/common.c +32 -39
132 lines not on this page · raw message
arch/x86/kernel/cpu/cyrix.c +1 -0
@@ -8,6 +8,7 @@#include <linux/timer.h> #include <asm/pci-direct.h> #include <asm/tsc.h> +#include <asm/cpufeature.h> #include "cpu.h"
arch/x86/kernel/cpu/intel.c +1 -1
@@ -8,7 +8,7 @@#include <linux/module.h> #include <linux/uaccess.h> -#include <asm/processor.h> +#include <asm/cpufeature.h> #include <asm/pgtable.h> #include <asm/msr.h> #include <asm/bugs.h>
arch/x86/kernel/cpu/intel_cacheinfo.c +1 -1
@@ -14,7 +14,7 @@#include <linux/sysfs.h> #include <linux/pci.h> -#include <asm/processor.h> +#include <asm/cpufeature.h> #include <asm/amd_nb.h> #include <asm/smp.h>
arch/x86/kernel/cpu/match.c +1 -1
@@ -1,5 +1,5 @@#include <asm/cpu_device_id.h> -#include <asm/processor.h> +#include <asm/cpufeature.h> #include <linux/cpu.h> #include <linux/module.h> #include <linux/slab.h>
arch/x86/kernel/cpu/mkcapflags.sh +3 -3
@@ -1,6 +1,6 @@ #!/bin/sh # -# Generate the x86_cap/bug_flags[] arrays from include/asm/cpufeature.h +# Generate the x86_cap/bug_flags[] arrays from include/asm/cpufeatures.h # IN=$1
@@ -49,8 +49,8 @@ dump_array() trap 'rm "$OUT"' EXIT ( - echo "#ifndef _ASM_X86_CPUFEATURE_H" - echo "#include <asm/cpufeature.h>" + echo "#ifndef _ASM_X86_CPUFEATURES_H" + echo "#include <asm/cpufeatures.h>" echo "#endif" echo ""
arch/x86/kernel/cpu/mtrr/main.c +1 -1
@@ -47,7 +47,7 @@#include <linux/smp.h> #include <linux/syscore_ops.h> -#include <asm/processor.h> +#include <asm/cpufeature.h> #include <asm/e820.h> #include <asm/mtrr.h> #include <asm/msr.h>
arch/x86/kernel/cpu/scattered.c +0 -20
@@ -31,32 +31,12 @@ void init_scattered_cpuid_features(struct cpuinfo_x86 *c)const struct cpuid_bit *cb;static const struct cpuid_bit cpuid_bits[] = { - {X86_FEATURE_DTHERM ,CR_EAX ,0 ,0x00000006 ,0 }, - {X86_FEATURE_IDA ,CR_EAX ,1 ,0x00000006 ,0 }, - {X86_FEATURE_ARAT ,CR_EAX ,2 ,0x00000006 ,0 }, - {X86_FEATURE_PLN ,CR_EAX ,4 ,0x00000006 ,0 }, - {X86_FEATURE_PTS ,CR_EAX ,6 ,0x00000006 ,0 }, - {X86_FEATURE_HWP ,CR_EAX ,7 ,0x00000006 ,0 }, - {X86_FEATURE_HWP_NOTIFY ,CR_EAX ,8 ,0x00000006 ,0 }, - {X86_FEATURE_HWP_ACT_WINDOW ,CR_EAX ,9 ,0x00000006 ,0 }, - {X86_FEATURE_HWP_EPP ,CR_EAX ,10 ,0x00000006 ,0 }, - {X86_FEATURE_HWP_PKG_REQ ,CR_EAX ,11 ,0x00000006 ,0 }, {X86_FEATURE_INTEL_PT ,CR_EBX ,25 ,0x00000007 ,0 }, {X86_FEATURE_APERFMPERF ,CR_ECX ,0 ,0x00000006 ,0 }, {X86_FEATURE_EPB ,CR_ECX ,3 ,0x00000006 ,0 }, {X86_FEATURE_HW_PSTATE ,CR_EDX ,7 ,0x80000007 ,0 }, {X86_FEATURE_CPB ,CR_EDX ,9 ,0x80000007 ,0 }, {X86_FEATURE_PROC_FEEDBACK ,CR_EDX ,11 ,0x80000007 ,0 }, - {X86_FEATURE_NPT ,CR_EDX ,0 ,0x8000000a ,0 }, - {X86_FEATURE_LBRV ,CR_EDX ,1 ,0x8000000a ,0 }, - {X86_FEATURE_SVML ,CR_EDX ,2 ,0x8000000a ,0 }, - {X86_FEATURE_NRIPS ,CR_EDX ,3 ,0x8000000a ,0 }, - {X86_FEATURE_TSCRATEMSR ,CR_EDX ,4 ,0x8000000a ,0 }, - {X86_FEATURE_VMCBCLEAN ,CR_EDX ,5 ,0x8000000a ,0 }, - {X86_FEATURE_FLUSHBYASID ,CR_EDX ,6 ,0x8000000a ,0 }, - {X86_FEATURE_DECODEASSISTS ,CR_EDX ,7 ,0x8000000a ,0 }, - {X86_FEATURE_PAUSEFILTER ,CR_EDX ,10 ,0x8000000a ,0 }, - {X86_FEATURE_PFTHRESHOLD ,CR_EDX ,12 ,0x8000000a ,0 }, {0 ,0 ,0 ,0 ,0 } };
arch/x86/kernel/cpu/transmeta.c +3 -3
@@ -1,6 +1,6 @@#include <linux/kernel.h> #include <linux/mm.h> -#include <asm/processor.h> +#include <asm/cpufeature.h> #include <asm/msr.h> #include "cpu.h"
@@ -12,7 +12,7 @@ static void early_init_transmeta(struct cpuinfo_x86 *c) xlvl =cpuid_eax (0x80860000 );if ((xlvl &0xffff0000 ) ==0x80860000 ) {if (xlvl >=0x80860001 ) - c->x86_capability[2 ] =cpuid_edx (0x80860001 ); + c->x86_capability[CPUID_8086_0001_EDX ] =cpuid_edx (0x80860001 ); } }
@@ -82,7 +82,7 @@ static void init_transmeta(struct cpuinfo_x86 *c)/* Unhide possibly hidden capability flags */ rdmsr (0x80860004 , cap_mask, uk);wrmsr (0x80860004 , ~0 , uk); - c->x86_capability[0 ] =cpuid_edx (0x00000001 ); + c->x86_capability[CPUID_1_EDX ] =cpuid_edx (0x00000001 );wrmsr (0x80860004 , cap_mask, uk);/* All Transmeta CPUs have a constant TSC */
arch/x86/kernel/e820.c +1 -0
@@ -24,6 +24,7 @@#include <asm/e820.h> #include <asm/proto.h> #include <asm/setup.h> +#include <asm/cpufeature.h> /* * The e820 map is the map that gets modified e.g. with command line parameters
arch/x86/kernel/head_32.S +1 -1
@@ -19,7 +19,7 @@ #include <asm/setup.h> #include <asm/processor-flags.h> #include <asm/msr-index.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/percpu.h> #include <asm/nops.h> #include <asm/bootparam.h>
arch/x86/kernel/head_64.S +1 -3
@@ -76,9 +76,7 @@ startup_64: subq $_text - __START_KERNEL_map, %rbp /* Is the address not 2M aligned? */ - movq %rbp, %rax - andl $~PMD_PAGE_MASK, %eax - testl %eax, %eax + testl $~PMD_PAGE_MASK, %ebp jnz bad_address /*
arch/x86/kernel/hpet.c +1 -0
@@ -12,6 +12,7 @@#include <linux/pm.h> #include <linux/io.h> +#include <asm/cpufeature.h> #include <asm/irqdomain.h> #include <asm/fixmap.h> #include <asm/hpet.h>
arch/x86/kernel/msr.c +1 -1
@@ -40,7 +40,7 @@#include <linux/uaccess.h> #include <linux/gfp.h> -#include <asm/processor.h> +#include <asm/cpufeature.h> #include <asm/msr.h> static struct class *msr_class;
arch/x86/kernel/uprobes.c +1 -1
@@ -290,7 +290,7 @@ static int uprobe_init_insn(struct arch_uprobe *auprobe, struct insn *insn, boolinsn_init (insn, auprobe->insn,sizeof (auprobe->insn), x86_64);/* has the side-effect of processing the entire instruction */ insn_get_length (insn); -if (WARN_ON_ONCE (!insn_complete (insn))) +if (!insn_complete (insn))return -ENOEXEC ;if (is_prefix_bad (insn))
arch/x86/kernel/verify_cpu.S +1 -1
@@ -30,7 +30,7 @@ * appropriately. Either display a message or halt. */ -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/msr-index.h> verify_cpu:
arch/x86/kernel/vm86_32.c +1 -1
@@ -358,7 +358,7 @@ static long do_sys_vm86(struct vm86plus_struct __user *user_vm86, bool plus)/* make room for real-mode segments */ tsk->thread.sp0 +=16 ; -if (static_cpu_has_safe (X86_FEATURE_SEP )) +if (static_cpu_has (X86_FEATURE_SEP )) tsk->thread.sysenter_cs =0 ;load_sp0 (tss, &tsk->thread);
arch/x86/kernel/vmlinux.lds.S +11 -0
@@ -202,6 +202,17 @@ SECTIONS :init #endif + /* + * Section for code used exclusively before alternatives are run. All + * references to such code must be patched out by alternatives, normally + * by using X86_FEATURE_ALWAYS CPU feature bit. + * + * See static_cpu_has() for an example. + */ + .altinstr_aux : AT(ADDR(.altinstr_aux) - LOAD_OFFSET) { + *(.altinstr_aux) + } + INIT_DATA_SECTION(16) .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
arch/x86/lib/clear_page_64.S +1 -1
@@ -1,5 +1,5 @@ #include <linux/linkage.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/alternative-asm.h> /*
arch/x86/lib/copy_page_64.S +1 -1
@@ -1,7 +1,7 @@ /* Written 2003 by Andi Kleen, based on a kernel by Evandro Menezes */ #include <linux/linkage.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/alternative-asm.h> /*
arch/x86/lib/copy_user_64.S +1 -1
@@ -10,7 +10,7 @@ #include <asm/current.h> #include <asm/asm-offsets.h> #include <asm/thread_info.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/alternative-asm.h> #include <asm/asm.h> #include <asm/smap.h>
arch/x86/lib/memcpy_64.S +1 -1
@@ -1,7 +1,7 @@ /* Copyright 2002 Andi Kleen */ #include <linux/linkage.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/alternative-asm.h> /*
arch/x86/lib/memmove_64.S +1 -1
@@ -6,7 +6,7 @@ * - Copyright 2011 Fenghua Yu <[email protected]> */ #include <linux/linkage.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/alternative-asm.h> #undef memmove
arch/x86/lib/memset_64.S +1 -1
@@ -1,7 +1,7 @@ /* Copyright 2002 Andi Kleen, SuSE Labs */ #include <linux/linkage.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/alternative-asm.h> .weak memset
arch/x86/lib/retpoline.S +1 -1
@@ -3,7 +3,7 @@ #include <linux/stringify.h> #include <linux/linkage.h> #include <asm/dwarf2.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/alternative-asm.h> #include <asm-generic/export.h> #include <asm/nospec-branch.h>
arch/x86/mm/setup_nx.c +1 -0
@@ -4,6 +4,7 @@#include <asm/pgtable.h> #include <asm/proto.h> +#include <asm/cpufeature.h> static int disable_nx;
arch/x86/oprofile/op_model_amd.c +0 -1
@@ -24,7 +24,6 @@#include <asm/nmi.h> #include <asm/apic.h> #include <asm/processor.h> -#include <asm/cpufeature.h> #include "op_x86_model.h" #include "op_counter.h"
arch/x86/um/asm/barrier.h +1 -1
@@ -3,7 +3,7 @@#include <asm/asm.h> #include <asm/segment.h> -#include <asm/cpufeature.h> +#include <asm/cpufeatures.h> #include <asm/cmpxchg.h> #include <asm/nops.h>
drivers/ata/ahci.c +59 -0
71 lines not on this page · raw message
drivers/ata/libata-core.c +3 -0
@@ -2209,6 +2209,9 @@ int ata_dev_configure(struct ata_device *dev) (id[ATA_ID_SATA_CAPABILITY] & 0xe) == 0x2) dev->horkage |= ATA_HORKAGE_NOLPM; +if (ap->flags &ATA_FLAG_NO_LPM ) + dev->horkage |=ATA_HORKAGE_NOLPM ; +if (dev->horkage &ATA_HORKAGE_NOLPM ) {ata_dev_warn (dev,"LPM support broken, forcing max_power\n" ); dev->link->ap->target_lpm_policy =ATA_LPM_MAX_POWER ;
drivers/block/loop.c +44 -35
129 lines not on this page · raw message
drivers/block/loop.h +1 -0
@@ -59,6 +59,7 @@ struct loop_device {struct kthread_worker worker;struct task_struct *worker_task;bool use_dio; +bool sysfs_inited;struct request_queue *lo_queue;struct blk_mq_tag_set tag_set;
drivers/hid/hid-ids.h +3 -0
@@ -512,6 +512,9 @@#define USB_VENDOR_ID_IRTOUCHSYSTEMS 0x6615#define USB_DEVICE_ID_IRTOUCH_INFRARED_USB 0x0070 +#define USB_VENDOR_ID_INNOMEDIA 0x1292 +#define USB_DEVICE_ID_INNEX_GENESIS_ATARI 0x4745 +#define USB_VENDOR_ID_ITE 0x048d#define USB_DEVICE_ID_ITE_LENOVO_YOGA 0x8386#define USB_DEVICE_ID_ITE_LENOVO_YOGA2 0x8350
drivers/hid/usbhid/hid-quirks.c +1 -0
@@ -152,6 +152,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_MULTIPLE_1781, USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_2NES2SNES, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI, HID_QUIRK_MULTI_INPUT }, { 0, 0 } };
drivers/infiniband/Kconfig +12 -0
@@ -33,6 +33,18 @@ config INFINIBAND_USER_ACCESS libibverbs, libibcm and a hardware driver library from <http://www.openfabrics.org/git/>. +config INFINIBAND_USER_ACCESS_UCM + bool "Userspace CM (UCM, DEPRECATED)" + depends on BROKEN + depends on INFINIBAND_USER_ACCESS + help + The UCM module has known security flaws, which no one is + interested to fix. The user-space part of this code was + dropped from the upstream a long time ago. + + This option is DEPRECATED and planned to be removed. + + config INFINIBAND_USER_MEM bool depends on INFINIBAND_USER_ACCESS != n
drivers/infiniband/core/Makefile +2 -2
@@ -5,8 +5,8 @@ obj-$(CONFIG_INFINIBAND) += ib_core.o ib_mad.o ib_sa.o \ ib_cm.o iw_cm.o ib_addr.o \ $(infiniband-y) obj-$(CONFIG_INFINIBAND_USER_MAD) += ib_umad.o -obj-$(CONFIG_INFINIBAND_USER_ACCESS) += ib_uverbs.o ib_ucm.o \ - $(user_access-y) +obj-$(CONFIG_INFINIBAND_USER_ACCESS) += ib_uverbs.o $(user_access-y) +obj-$(CONFIG_INFINIBAND_USER_ACCESS_UCM) += ib_ucm.o $(user_access-y) ib_core-y := packer.o ud_header.o verbs.o sysfs.o \ device.o fmr_pool.o cache.o netlink.o \
drivers/infiniband/hw/cxgb4/mem.c +1 -1
@@ -926,7 +926,7 @@ static int c4iw_set_page(struct ib_mr *ibmr, u64 addr) {struct c4iw_mr *mhp =to_c4iw_mr (ibmr); -if (unlikely (mhp->mpl_len == mhp->max_mpl_len)) +if (unlikely (mhp->mpl_len == mhp->attr.pbl_size))return -ENOMEM ; mhp->mpl[mhp->mpl_len++] = addr;
drivers/misc/ibmasm/ibmasmfs.c +3 -24
@@ -507,35 +507,14 @@ static int remote_settings_file_close(struct inode *inode, struct file *file)static ssize_t remote_settings_file_read (struct file *file,char __user *buf,size_t count,loff_t *offset) {void __iomem *address = (void __iomem *)file->private_data; -unsigned char *page; -int retval;int len =0 ;unsigned int value; - -if (*offset <0 ) -return -EINVAL ; -if (count ==0 || count >1024 ) -return 0 ; -if (*offset !=0 ) -return 0 ; - - page = (unsigned char *)__get_free_page (GFP_KERNEL ); -if (!page) -return -ENOMEM ; +char lbuf[20 ]; value =readl (address); - len =sprintf (page,"%d\n" , value); - -if (copy_to_user (buf, page, len)) { - retval = -EFAULT ; - goto exit; - } - *offset += len; - retval = len; + len =snprintf (lbuf,sizeof (lbuf),"%d\n" , value); -exit: -free_page ((unsigned long )page); -return retval; +return simple_read_from_buffer (buf, count, offset, lbuf, len); }static ssize_t remote_settings_file_write (struct file *file,const char __user *ubuff,size_t count,loff_t *offset)
drivers/misc/vmw_balloon.c +2 -2
@@ -467,7 +467,7 @@ static int vmballoon_send_batched_lock(struct vmballoon *b, unsigned int num_pages, bool is_2m_pages, unsigned int *target) { unsigned long status; -unsigned long pfn =page_to_pfn (b->page); +unsigned long pfn =PHYS_PFN (virt_to_phys (b->batch_page));STATS_INC (b->stats.lock[is_2m_pages]);
@@ -515,7 +515,7 @@ static bool vmballoon_send_batched_unlock(struct vmballoon *b, unsigned int num_pages, bool is_2m_pages, unsigned int *target) { unsigned long status; -unsigned long pfn =page_to_pfn (b->page); +unsigned long pfn =PHYS_PFN (virt_to_phys (b->batch_page));STATS_INC (b->stats.unlock[is_2m_pages]);
drivers/usb/core/quirks.c +4 -0
@@ -231,6 +231,10 @@ static const struct usb_device_id usb_quirk_list[] = {/* Corsair K70 RGB */ { USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT }, + /* Corsair Strafe */ + { USB_DEVICE(0x1b1c, 0x1b15), .driver_info = USB_QUIRK_DELAY_INIT | + USB_QUIRK_DELAY_CTRL_MSG }, + /* Corsair Strafe RGB */ { USB_DEVICE(0x1b1c, 0x1b20), .driver_info = USB_QUIRK_DELAY_INIT | USB_QUIRK_DELAY_CTRL_MSG },
drivers/usb/host/xhci-mem.c +1 -1
@@ -638,7 +638,7 @@ struct xhci_ring *xhci_stream_id_to_ring(if (!ep->stream_info)return NULL ; -if (stream_id > ep->stream_info->num_streams) +if (stream_id >= ep->stream_info->num_streams)return NULL ;return ep->stream_info->stream_rings[stream_id]; }
drivers/usb/misc/yurex.c +6 -17
@@ -414,8 +414,7 @@ static ssize_t yurex_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) {struct usb_yurex *dev; -int retval =0 ; -int bytes_read =0 ; +int len =0 ;char in_buffer[20 ];unsigned long flags;
@@ -423,26 +422,16 @@ static ssize_t yurex_read(struct file *file, char __user *buffer, size_t count,mutex_lock (&dev->io_mutex);if (!dev->interface) {/* already disconnected */ - retval = -ENODEV ; - goto exit; +mutex_unlock (&dev->io_mutex); +return -ENODEV ; }spin_lock_irqsave (&dev->lock, flags); - bytes_read =snprintf (in_buffer,20 ,"%lld\n" , dev->bbu); + len =snprintf (in_buffer,20 ,"%lld\n" , dev->bbu);spin_unlock_irqrestore (&dev->lock, flags); - -if (*ppos < bytes_read) { -if (copy_to_user (buffer, in_buffer + *ppos, bytes_read - *ppos)) - retval = -EFAULT ; -else { - retval = bytes_read - *ppos; - *ppos += bytes_read; - } - } - -exit:mutex_unlock (&dev->io_mutex); -return retval; + +return simple_read_from_buffer (buffer, count, ppos, in_buffer, len); } static ssize_t yurex_write(struct file *file, const char __user *user_buffer,
drivers/usb/serial/ch341.c +1 -1
@@ -118,7 +118,7 @@ static int ch341_control_in(struct usb_device *dev, r =usb_control_msg (dev,usb_rcvctrlpipe (dev,0 ), request,USB_TYPE_VENDOR |USB_RECIP_DEVICE |USB_DIR_IN , value, index, buf, bufsize,DEFAULT_TIMEOUT ); -if (r < bufsize) { +if (r < (int )bufsize) {if (r >=0 ) { dev_err(&dev->dev, "short control message received (%d < %u)\n",
drivers/usb/serial/cp210x.c +1 -0
@@ -145,6 +145,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x8977) }, /* CEL MeshWorks DevKit Device */ { USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */ { USB_DEVICE(0x10C4, 0x89A4) }, /* CESINEL FTBC Flexible Thyristor Bridge Controller */ + { USB_DEVICE(0x10C4, 0x89FB) }, /* Qivicon ZigBee USB Radio Stick */ { USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */ { USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */ { USB_DEVICE(0x10C4, 0x8B34) }, /* Qivicon ZigBee USB Radio Stick */
drivers/usb/serial/keyspan_pda.c +3 -1
@@ -373,8 +373,10 @@ static int keyspan_pda_get_modem_info(struct usb_serial *serial,3 ,/* get pins */ USB_TYPE_VENDOR |USB_RECIP_INTERFACE |USB_DIR_IN , 0, 0, data, 1, 2000); -if (rc >=0 ) +if (rc ==1 ) *value = *data; +else if (rc >=0 ) + rc = -EIO ;kfree (data);return rc;
drivers/usb/serial/mos7840.c +3 -0
@@ -482,6 +482,9 @@ static void mos7840_control_callback(struct urb *urb) }dev_dbg (dev,"%s urb buffer size is %d\n" , __func__, urb->actual_length); +if (urb->actual_length <1 ) + goto out; +dev_dbg (dev,"%s mos7840_port->MsrLsr is %d port %d\n" , __func__, mos7840_port->MsrLsr, mos7840_port->port_num); data = urb->transfer_buffer;
fs/btrfs/disk-io.c +1 -1
@@ -923,7 +923,7 @@ static int check_async_write(struct inode *inode, unsigned long bio_flags)if (bio_flags &EXTENT_BIO_TREE_LOG )return 0 ;#ifdef CONFIG_X86 -if (static_cpu_has_safe (X86_FEATURE_XMM4_2 )) +if (static_cpu_has (X86_FEATURE_XMM4_2 ))return 0 ;#endif return 1 ;
fs/inode.c +6 -0
@@ -1937,8 +1937,14 @@ void inode_init_owner(struct inode *inode, const struct inode *dir, inode->i_uid =current_fsuid ();if (dir && dir->i_mode &S_ISGID ) { inode->i_gid = dir->i_gid; + +/* Directories are special, and always inherit S_ISGID */ if (S_ISDIR (mode)) mode |=S_ISGID ; +else if ((mode & (S_ISGID |S_IXGRP )) == (S_ISGID |S_IXGRP ) && + !in_group_p (inode->i_gid) && + !capable_wrt_inode_uidgid (dir,CAP_FSETID )) + mode &= ~S_ISGID ; }else inode->i_gid =current_fsgid (); inode->i_mode = mode;
include/linux/libata.h +1 -0
@@ -210,6 +210,7 @@ enum {ATA_FLAG_SLAVE_POSS = (1 <<0 ),/* host supports slave dev */ /* (doesn't imply presence) */ ATA_FLAG_SATA = (1 <<1 ), +ATA_FLAG_NO_LPM = (1 <<2 ),/* host not happy with LPM */ ATA_FLAG_NO_LOG_PAGE = (1 <<5 ),/* do not issue log page read */ ATA_FLAG_NO_ATAPI = (1 <<6 ),/* No ATAPI support */ ATA_FLAG_PIO_DMA = (1 << 7), /* PIO cmds via DMA */
kernel/power/user.c +5 -0
@@ -184,6 +184,11 @@ static ssize_t snapshot_write(struct file *filp, const char __user *buf, res =PAGE_SIZE - pg_offp; } +if (!data_of (data->handle)) { + res = -EINVAL ; + goto unlock; + } + res =simple_write_to_buffer (data_of (data->handle), res, &pg_offp, buf, count);if (res >0 )
lib/atomic64_test.c +4 -0
@@ -16,6 +16,10 @@#include <linux/kernel.h> #include <linux/atomic.h> +#ifdef CONFIG_X86 +#include <asm/cpufeature.h> /* for boot_cpu_has below */ +#endif +#define TEST (bit, op, c_op, val) \ do { \ atomic##bit##_set(&v, v0); \
net/bridge/netfilter/ebtables.c +2 -0
@@ -701,6 +701,8 @@ ebt_check_entry(struct ebt_entry *e, struct net *net, } i =0 ; +memset (&mtpar,0 ,sizeof (mtpar)); +memset (&tgpar,0 ,sizeof (tgpar)); mtpar.net = tgpar.net = net; mtpar.table = tgpar.table = name; mtpar.entryinfo = tgpar.entryinfo = e;
net/ipv4/netfilter/ip_tables.c +1 -0
@@ -663,6 +663,7 @@ find_check_entry(struct ipt_entry *e, struct net *net, const char *name,return -ENOMEM ; j =0 ; +memset (&mtpar,0 ,sizeof (mtpar)); mtpar.net = net; mtpar.table = name; mtpar.entryinfo = &e->ip;
net/ipv6/netfilter/ip6_tables.c +1 -0
@@ -676,6 +676,7 @@ find_check_entry(struct ip6t_entry *e, struct net *net, const char *name,return -ENOMEM ; j =0 ; +memset (&mtpar,0 ,sizeof (mtpar)); mtpar.net = net; mtpar.table = name; mtpar.entryinfo = &e->ipv6;
net/netfilter/nfnetlink_queue.c +3 -0
@@ -1106,6 +1106,9 @@ nfqnl_recv_unsupp(struct sock *ctnl, struct sk_buff *skb,static const struct nla_policy nfqa_cfg_policy[NFQA_CFG_MAX +1 ] = { [NFQA_CFG_CMD ] = { .len =sizeof (struct nfqnl_msg_config_cmd ) }, [NFQA_CFG_PARAMS ] = { .len =sizeof (struct nfqnl_msg_config_params ) }, + [NFQA_CFG_QUEUE_MAXLEN ] = { .type =NLA_U32 }, + [NFQA_CFG_MASK ] = { .type =NLA_U32 }, + [NFQA_CFG_FLAGS ] = { .type =NLA_U32 }, };static const struct nf_queue_handler nfqh = {
tools/build/Build.include +2 -2
@@ -62,8 +62,8 @@ dep-cmd = $(if $(wildcard $(fixdep)), $(fixdep) $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp; \ rm -f $(depfile); \ mv -f $(dot-target).tmp $(dot-target).cmd, \ - printf '\# cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \ - printf '\# using basic dep data\n\n' >> $(dot-target).cmd; \ + printf '$(pound) cannot find fixdep (%s)\n' $(fixdep) > $(dot-target).cmd; \ + printf '$(pound) using basic dep data\n\n' >> $(dot-target).cmd; \ cat $(depfile) >> $(dot-target).cmd; \ printf '%s\n' 'cmd_$@ := $(make-cmd)' >> $(dot-target).cmd)