Linux 3.3.6
Greg KH
maintainerI'm announcing the release of the 3.3.6 kernel.
All users of the 3.3 kernel series must upgrade.
The updated 3.3.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.3.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/networking/ip-sysctl.txt | 4 Makefile | 2 arch/arm/kernel/ptrace.c | 24 - arch/arm/kernel/smp.c | 4 arch/arm/kernel/sys_arm.c | 2 arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h | 8 arch/arm/mach-orion5x/mpp.h | 4 arch/arm/mm/cache-l2x0.c | 25 +- arch/ia64/kvm/kvm-ia64.c | 5 arch/s390/kvm/intercept.c | 20 - arch/s390/kvm/kvm-s390.c | 2 arch/x86/boot/compressed/relocs.c | 2 arch/x86/kernel/setup_percpu.c | 14 + arch/x86/kvm/pmu.c | 2 arch/x86/kvm/vmx.c | 10 arch/x86/kvm/x86.c | 19 + arch/x86/xen/enlighten.c | 7 arch/x86/xen/mmu.c | 7 drivers/block/mtip32xx/Kconfig | 2 drivers/block/mtip32xx/mtip32xx.c | 34 +- drivers/gpu/drm/i915/intel_hdmi.c | 2 drivers/gpu/drm/i915/intel_ringbuffer.c | 9 drivers/gpu/drm/i915/intel_sdvo.c | 6 drivers/net/ethernet/broadcom/tg3.c | 18 + drivers/net/ethernet/intel/e1000/e1000_main.c | 35 +- drivers/net/ethernet/marvell/sky2.c | 31 +- drivers/net/ethernet/marvell/sky2.h | 1 drivers/net/ethernet/sun/sungem.c | 2 drivers/net/usb/asix.c | 4 drivers/net/usb/smsc95xx.c | 2 drivers/platform/x86/sony-laptop.c | 2 drivers/regulator/max8997.c | 2 drivers/usb/gadget/udc-core.c | 4 fs/cifs/cifssmb.c | 6 fs/hugetlbfs/inode.c | 54 +--- fs/nfsd/nfs4proc.c | 8 fs/nfsd/vfs.c | 2 include/asm-generic/statfs.h | 2 include/linux/hugetlb.h | 14 - include/linux/kvm_host.h | 7 include/linux/netdevice.h | 50 ++-- include/linux/seqlock.h | 2 mm/hugetlb.c | 135 ++++++++--- net/core/dev.c | 20 + net/ipv4/tcp.c | 9 net/ipv4/tcp_input.c | 11 net/l2tp/l2tp_ip.c | 3 net/sched/sch_netem.c | 6 sound/soc/codecs/tlv320aic23.c | 4 sound/soc/soc-core.c | 6 virt/kvm/iommu.c | 23 + virt/kvm/kvm_main.c | 23 + 52 files changed, 461 insertions(+), 239 deletions(-)
Alan Stern (1):
usb: gadget: udc-core: fix incompatibility with dummy-hcd
Alex Williamson (1):
KVM: lock slots_lock around device assignment
Alexander Duyck (2):
net: Add memory barriers to prevent possible race in byte queue limits
net: Fix issue with netdev_tx_reset_queue not resetting queue from XOFF state
Archit Taneja (1):
ARM: OMAP: Revert "ARM: OMAP: ctrl: Fix CONTROL_DSIPHY register fields"
Asai Thambi S P (1):
mtip32xx: fix incorrect value set for drv_cleanup_done, and re-initialize and start port in mtip_restart_port()
Avi Kivity (3):
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
KVM: VMX: Fix delayed load of shared MSRs
KVM: VMX: Fix kvm_set_shared_msr() called in preemptible context
Axel Lin (1):
regulator: Fix the logic to ensure new voltage setting in valid range
Ben Hutchings (1):
ARM: orion5x: Fix GPIO enable bits for MPP9
Christian Borntraeger (1):
KVM: s390: Sanitize fpc registers for KVM_SET_FPU
Colin Cross (1):
ARM: 7414/1: SMP: prevent use of the console when using idmap_pgd
Daniel Vetter (2):
drm/i915: disable sdvo hotplug on i945g/gm drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+
David Gibson (1):
hugepages: fix use after free bug in "quota" handling
David Vrabel (1):
xen/pci: don't use PCI BIOS service for configuration space accesses
Eric Bénard (1):
ASoC: tlv312aic23: unbreak resume
Eric Dumazet (2):
netem: fix possible skb leak
tcp: change tcp_adv_win_scale and tcp_rmem[2]
Eric W. Biederman (1):
net: In unregister_netdevice_notifier unregister the netdevices.
Felipe Balbi (1):
usb: gadget: udc-core: fix wrong call order
Gerard Lledo (1):
sungem: Fix WakeOnLan
Gleb Natapov (1):
KVM: x86 emulator: correctly mask pmc index bits in RDPMC instruction emulation
Greg Kroah-Hartman (2):
block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy Linux 3.3.6
H. Peter Anvin (1):
asm-generic: Use __BITS_PER_LONG in statfs.h
Ingo van Lil (1):
asix: Fix tx transfer padding for full-speed USB
J. Bruce Fields (1):
nfsd: don't fail unchecked creates of non-special files
Jens Freimann (1):
KVM: s390: do store status after handling STOP_ON_STOP bit
Jiri Pirko (1):
e1000: fix vlan processing regression
Josh Boyer (1):
sony-laptop: Enable keyboard backlight by default
Konrad Rzeszutek Wilk (1):
xen/pte: Fix crashes when trying to see non-existent PGD/PMD/PUD/PTEs
Kusanagi Kouichi (1):
x86, relocs: Remove an unused variable
Linus Torvalds (1):
Fix __read_seqcount_begin() to use ACCESS_ONCE for sequence value read
Marcelo Tosatti (1):
KVM: VMX: vmx_set_cr0 expects kvm->srcu locked
Matt Carlson (1):
tg3: Avoid panic from reserved statblk field access
Nadav Har'El (1):
KVM: nVMX: Fix erroneous exception bitmap check
Paolo Pisati (1):
smsc95xx: mark link down on startup and let PHY interrupt deal with carrier changes
Paulo Zanoni (1):
drm/i915: enable dip before writing data on gen4
Richard Zhao (1):
ASoC: core: check of_property_count_strings failure
Ryosuke Saito (1):
mtip32xx: fix error handling in mtip_init()
Sasha Levin (1):
net: l2tp: unlock socket lock before returning from l2tp_ip_sendmsg
Stefan Metzmacher (1):
fs/cifs: fix parsing of dfs referrals
Takuya Yoshikawa (2):
KVM: Fix write protection race during dirty logging
KVM: mmu_notifier: Flush TLBs before releasing mmu_lock
Tejun Heo (1):
percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit
Tim Bird (1):
ARM: 7410/1: Add extra clobber registers for assembly in kernel_execve
Will Deacon (4):
ARM: 7411/1: audit: fix treatment of saved ip register during syscall tracing
ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness
ARM: 7397/1: l2x0: only apply workaround for erratum #753970 on PL310
ARM: 7398/1: l2x0: only write to debug registers on PL310
Yuchung Cheng (1):
tcp: fix infinite cwnd in tcp_complete_cwr()
stephen hemminger (2):
sky2: propogate rx hash when packet is copied
sky2: fix receive length error in mixed non-VLAN/VLAN traffic
Greg KH
maintainerDocumentation/networking/ip-sysctl.txt +2 -2
@@ -147,7 +147,7 @@ tcp_adv_win_scale - INTEGER (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), if it is <= 0. Possible values are [-31, 31], inclusive. - Default: 2 + Default: 1 tcp_allowed_congestion_control - STRING Show/set the congestion control choices available to non-privileged
@@ -410,7 +410,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables automatic tuning of that socket's receive buffer size, in which case this value is ignored. - Default: between 87380B and 4MB, depending on RAM size. + Default: between 87380B and 6MB, depending on RAM size. tcp_sack - BOOLEAN Enable select acknowledgments (SACKS).
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 3 -SUBLEVEL = 5 +SUBLEVEL = 6 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/kernel/ptrace.c +9 -15
@@ -905,27 +905,14 @@ long arch_ptrace(struct task_struct *child, long request,return ret; } -#ifdef __ARMEB__ -#define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB -#else -#define AUDIT_ARCH_NR AUDIT_ARCH_ARM -#endif - asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) {unsigned long ip; -/* -* Save IP. IP is used to denote syscall entry/exit: -* IP = 0 -> entry, = 1 -> exit -*/ - ip = regs->ARM_ip; - regs->ARM_ip = why; - -if (!ip) +if (why)audit_syscall_exit (regs);else -audit_syscall_entry (AUDIT_ARCH_NR , scno, regs->ARM_r0, +audit_syscall_entry (AUDIT_ARCH_ARM , scno, regs->ARM_r0, regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);if (!test_thread_flag (TIF_SYSCALL_TRACE ))
@@ -935,6 +922,13 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)current_thread_info ()->syscall = scno; +/* +* IP is used to denote syscall entry/exit: +* IP = 0 -> entry, =1 -> exit +*/ + ip = regs->ARM_ip; + regs->ARM_ip = why; +/* the 0x80 provides a way for the tracing parent to distinguish between a syscall stop and SIGTRAP delivery */ ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
arch/arm/kernel/smp.c +2 -2
@@ -255,8 +255,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)struct mm_struct *mm = &init_mm;unsigned int cpu =smp_processor_id (); -printk ("CPU%u: Booted secondary processor\n" , cpu); -/* * All kernel threads share the same mm context; grab a * reference and switch to it.
@@ -268,6 +266,8 @@ asmlinkage void __cpuinit secondary_start_kernel(void)enter_lazy_tlb (mm, current);local_flush_tlb_all (); +printk ("CPU%u: Booted secondary processor\n" , cpu); +cpu_init ();preempt_disable ();trace_hardirqs_off ();
arch/arm/kernel/sys_arm.c +1 -1
@@ -115,7 +115,7 @@ int kernel_execve(const char *filename, "Ir" (THREAD_START_SP - sizeof(regs)), "r" (®s), "Ir" (sizeof(regs)) - : "r0", "r1", "r2", "r3", "ip", "lr", "memory"); + : "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory"); out:return ret;
arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h +4 -4
@@ -941,10 +941,10 @@#define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29)#define OMAP4_DSI1_LANEENABLE_SHIFT 24#define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) -#define OMAP4_DSI2_PIPD_SHIFT 19 -#define OMAP4_DSI2_PIPD_MASK (0x1f << 19) -#define OMAP4_DSI1_PIPD_SHIFT 14 -#define OMAP4_DSI1_PIPD_MASK (0x1f << 14) +#define OMAP4_DSI1_PIPD_SHIFT 19 +#define OMAP4_DSI1_PIPD_MASK (0x1f << 19) +#define OMAP4_DSI2_PIPD_SHIFT 14 +#define OMAP4_DSI2_PIPD_MASK (0x1f << 14)/* CONTROL_MCBSPLP */ #define OMAP4_ALBCTRLRX_FSX_SHIFT 31
arch/arm/mach-orion5x/mpp.h +2 -2
@@ -65,8 +65,8 @@#define MPP8_GIGE MPP(8, 0x1, 0, 0, 1, 1, 1)#define MPP9_UNUSED MPP(9, 0x0, 0, 0, 1, 1, 1) -#define MPP9_GPIO MPP(9, 0x0, 0, 0, 1, 1, 1) -#define MPP9_GIGE MPP(9, 0x1, 1, 1, 1, 1, 1) +#define MPP9_GPIO MPP(9, 0x0, 1, 1, 1, 1, 1) +#define MPP9_GIGE MPP(9, 0x1, 0, 0, 1, 1, 1)#define MPP10_UNUSED MPP(10, 0x0, 0, 0, 1, 1, 1)#define MPP10_GPIO MPP(10, 0x0, 1, 1, 1, 1, 1)
arch/arm/mm/cache-l2x0.c +14 -11
@@ -32,6 +32,7 @@ static void __iomem *l2x0_base;static DEFINE_RAW_SPINLOCK (l2x0_lock);static uint32_t l2x0_way_mask;/* Bitmask of active ways */ static uint32_t l2x0_size; +static unsigned long sync_reg_offset =L2X0_CACHE_SYNC ;struct l2x0_regs l2x0_saved_regs;
@@ -61,12 +62,7 @@ static inline void cache_sync(void) {void __iomem *base = l2x0_base; -#ifdef CONFIG_PL310_ERRATA_753970 -/* write to an unmmapped register */ -writel_relaxed (0 , base +L2X0_DUMMY_REG ); -#else -writel_relaxed (0 , base +L2X0_CACHE_SYNC ); -#endif +writel_relaxed (0 , base + sync_reg_offset);cache_wait (base +L2X0_CACHE_SYNC ,1 ); }
@@ -85,10 +81,13 @@ static inline void l2x0_inv_line(unsigned long addr) }#if defined(CONFIG_PL310_ERRATA_588369 ) || defined(CONFIG_PL310_ERRATA_727915 ) +static inline void debug_writel (unsigned long val) +{ +if (outer_cache.set_debug) + outer_cache.set_debug (val); +} -#define debug_writel (val) outer_cache.set_debug(val) - -static void l2x0_set_debug (unsigned long val) +static void pl310_set_debug (unsigned long val) {writel_relaxed (val, l2x0_base +L2X0_DEBUG_CTRL ); }
@@ -98,7 +97,7 @@ static inline void debug_writel(unsigned long val) { } -#define l2x0_set_debug NULL +#define pl310_set_debug NULL#endif #ifdef CONFIG_PL310_ERRATA_588369
@@ -331,6 +330,11 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)else ways =8 ; type ="L310" ; +#ifdef CONFIG_PL310_ERRATA_753970 +/* Unmapped register. */ + sync_reg_offset =L2X0_DUMMY_REG ; +#endif + outer_cache.set_debug = pl310_set_debug;break ;case L2X0_CACHE_ID_PART_L210 : ways = (aux >>13 ) &0xf ;
@@ -379,7 +383,6 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) outer_cache.flush_all = l2x0_flush_all; outer_cache.inv_all = l2x0_inv_all; outer_cache.disable = l2x0_disable; - outer_cache.set_debug = l2x0_set_debug;printk (KERN_INFO "%s cache controller enabled\n" , type); printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n",
arch/ia64/kvm/kvm-ia64.c +5 -0
@@ -1169,6 +1169,11 @@ out:#define PALE_RESET_ENTRY 0x80000000ffffffb0UL +bool kvm_vcpu_compatible (struct kvm_vcpu *vcpu) +{ +return irqchip_in_kernel (vcpu->kcm) == (vcpu->arch.apic !=NULL ); +} +int kvm_arch_vcpu_init (struct kvm_vcpu *vcpu) {struct kvm_vcpu *v;
arch/s390/kvm/intercept.c +12 -8
@@ -133,13 +133,6 @@ static int handle_stop(struct kvm_vcpu *vcpu) vcpu->stat.exit_stop_request++;spin_lock_bh (&vcpu->arch.local_int.lock); -if (vcpu->arch.local_int.action_bits &ACTION_STORE_ON_STOP ) { - vcpu->arch.local_int.action_bits &= ~ACTION_STORE_ON_STOP ; - rc =kvm_s390_vcpu_store_status (vcpu, -KVM_S390_STORE_STATUS_NOADDR ); -if (rc >=0 ) - rc = -EOPNOTSUPP ; - }if (vcpu->arch.local_int.action_bits &ACTION_RELOADVCPU_ON_STOP ) { vcpu->arch.local_int.action_bits &= ~ACTION_RELOADVCPU_ON_STOP ;
@@ -155,7 +148,18 @@ static int handle_stop(struct kvm_vcpu *vcpu) rc = -EOPNOTSUPP ; } -spin_unlock_bh (&vcpu->arch.local_int.lock); +if (vcpu->arch.local_int.action_bits &ACTION_STORE_ON_STOP ) { + vcpu->arch.local_int.action_bits &= ~ACTION_STORE_ON_STOP ; +/* store status must be called unlocked. Since local_int.lock +* only protects local_int.* and not guest memory we can give +* up the lock here */ +spin_unlock_bh (&vcpu->arch.local_int.lock); + rc =kvm_s390_vcpu_store_status (vcpu, +KVM_S390_STORE_STATUS_NOADDR ); +if (rc >=0 ) + rc = -EOPNOTSUPP ; + }else +spin_unlock_bh (&vcpu->arch.local_int.lock);return rc; }
arch/s390/kvm/kvm-s390.c +1 -1
@@ -418,7 +418,7 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,int kvm_arch_vcpu_ioctl_set_fpu (struct kvm_vcpu *vcpu,struct kvm_fpu *fpu) {memcpy (&vcpu->arch.guest_fpregs.fprs, &fpu->fprs,sizeof (fpu->fprs)); - vcpu->arch.guest_fpregs.fpc = fpu->fpc; + vcpu->arch.guest_fpregs.fpc = fpu->fpc &FPC_VALID_MASK ;restore_fp_regs (&vcpu->arch.guest_fpregs);return 0 ; }
arch/x86/boot/compressed/relocs.c +0 -2
@@ -402,13 +402,11 @@ static void print_absolute_symbols(void)for (i =0 ; i < ehdr.e_shnum; i++) {struct section *sec = &secs[i];char *sym_strtab; -Elf32_Sym *sh_symtab;int j;if (sec->shdr.sh_type !=SHT_SYMTAB ) {continue ; } - sh_symtab = sec->symtab; sym_strtab = sec->link->strtab;for (j =0 ; j < sec->shdr.sh_size/sizeof (Elf32_Sym); j++) {Elf32_Sym *sym;
arch/x86/kernel/setup_percpu.c +13 -1
@@ -185,10 +185,22 @@ void __init setup_per_cpu_areas(void)#endif rc = -EINVAL ;if (pcpu_chosen_fc !=PCPU_FC_PAGE ) { -const size_t atom_size = cpu_has_pse ?PMD_SIZE :PAGE_SIZE ;const size_t dyn_size =PERCPU_MODULE_RESERVE +PERCPU_DYNAMIC_RESERVE -PERCPU_FIRST_CHUNK_RESERVE ; +size_t atom_size; +/* +* On 64bit, use PMD_SIZE for atom_size so that embedded +* percpu areas are aligned to PMD. This, in the future, +* can also allow using PMD mappings in vmalloc area. Use +* PAGE_SIZE on 32bit as vmalloc space is highly contended +* and large vmalloc area allocs can easily fail. +*/ +#ifdef CONFIG_X86_64 + atom_size =PMD_SIZE ; +#else + atom_size =PAGE_SIZE ; +#endif rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE, dyn_size, atom_size, pcpu_cpu_distance,
arch/x86/kvm/pmu.c +1 -1
@@ -413,7 +413,7 @@ int kvm_pmu_read_pmc(struct kvm_vcpu *vcpu, unsigned pmc, u64 *data)struct kvm_pmc *counters;u64 ctr; - pmc &= (3u <<30 ) -1 ; + pmc &= ~(3u <<30 );if (!fixed && pmc >= pmu->nr_arch_gp_counters)return 1 ;if (fixed && pmc >= pmu->nr_arch_fixed_counters)
arch/x86/kvm/vmx.c +9 -1
@@ -1678,7 +1678,7 @@ static int nested_pf_handled(struct kvm_vcpu *vcpu)struct vmcs12 *vmcs12 =get_vmcs12 (vcpu);/* TODO: also check PFEC_MATCH/MASK, not just EB.PF. */ -if (!(vmcs12->exception_bitmap &PF_VECTOR )) +if (!(vmcs12->exception_bitmap & (1u <<PF_VECTOR )))return 0 ;nested_vmx_vmexit (vcpu);
@@ -2219,6 +2219,12 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data) msr =find_msr_entry (vmx, msr_index);if (msr) { msr->data = data; +if (msr - vmx->guest_msrs < vmx->save_nmsrs) { +preempt_disable (); +kvm_set_shared_msr (msr->index, msr->data, + msr->mask); +preempt_enable (); + }break ; } ret =kvm_set_msr_common (vcpu, msr_index, data);
@@ -3915,7 +3921,9 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu)vmcs_write16 (VIRTUAL_PROCESSOR_ID , vmx->vpid); vmx->vcpu.arch.cr0 =X86_CR0_NW |X86_CR0_CD |X86_CR0_ET ; + vcpu->srcu_idx =srcu_read_lock (&vcpu->kvm->srcu);vmx_set_cr0 (&vmx->vcpu,kvm_read_cr0 (vcpu));/* enter rmode */ +srcu_read_unlock (&vcpu->kvm->srcu, vcpu->srcu_idx);vmx_set_cr4 (&vmx->vcpu,0 );vmx_set_efer (&vmx->vcpu,0 );vmx_fpu_activate (&vmx->vcpu);
arch/x86/kvm/x86.c +13 -6
@@ -2997,6 +2997,8 @@ static void write_protect_slot(struct kvm *kvm,unsigned long *dirty_bitmap, unsigned long nr_dirty_pages) { + spin_lock(&kvm->mmu_lock); +/* Not many dirty pages compared to # of shadow pages. */ if (nr_dirty_pages < kvm->arch.n_used_mmu_pages) {unsigned long gfn_offset;
@@ -3004,16 +3006,13 @@ static void write_protect_slot(struct kvm *kvm,for_each_set_bit (gfn_offset, dirty_bitmap, memslot->npages) {unsigned long gfn = memslot->base_gfn + gfn_offset; -spin_lock (&kvm->mmu_lock);kvm_mmu_rmap_write_protect (kvm, gfn, memslot); -spin_unlock (&kvm->mmu_lock); }kvm_flush_remote_tlbs (kvm); - }else { -spin_lock (&kvm->mmu_lock); + }else kvm_mmu_slot_remove_write_access (kvm, memslot->id); -spin_unlock (&kvm->mmu_lock); - } + +spin_unlock (&kvm->mmu_lock); }/*
@@ -3132,6 +3131,9 @@ long kvm_arch_vm_ioctl(struct file *filp, r = -EEXIST ;if (kvm->arch.vpic) goto create_irqchip_unlock; + r = -EINVAL ; +if (atomic_read (&kvm->online_vcpus)) + goto create_irqchip_unlock; r = -ENOMEM ; vpic =kvm_create_pic (kvm);if (vpic) {
@@ -5957,6 +5959,11 @@ void kvm_arch_check_processor_compat(void *rtn) kvm_x86_ops->check_processor_compatibility (rtn); } +bool kvm_vcpu_compatible (struct kvm_vcpu *vcpu) +{ +return irqchip_in_kernel (vcpu->kvm) == (vcpu->arch.apic !=NULL ); +} +int kvm_arch_vcpu_init (struct kvm_vcpu *vcpu) {struct page *page;
arch/x86/xen/enlighten.c +5 -2
@@ -62,6 +62,7 @@#include <asm/reboot.h> #include <asm/stackprotector.h> #include <asm/hypervisor.h> +#include <asm/pci_x86.h> #include "xen-ops.h" #include "mmu.h"
@@ -1274,8 +1275,10 @@ asmlinkage void __init xen_start_kernel(void)/* Make sure ACS will be enabled */ pci_request_acs (); } - - +#ifdef CONFIG_PCI +/* PCI BIOS service won't work from a PV guest. */ + pci_probe &= ~PCI_PROBE_BIOS ; +#endif xen_raw_console_write ("about to get started...\n" );xen_setup_runstate_info (0 );
arch/x86/xen/mmu.c +6 -1
@@ -353,8 +353,13 @@ static pteval_t pte_mfn_to_pfn(pteval_t val) {if (val & _PAGE_PRESENT) {unsigned long mfn = (val &PTE_PFN_MASK ) >>PAGE_SHIFT ; +unsigned long pfn =mfn_to_pfn (mfn); +pteval_t flags = val &PTE_FLAGS_MASK ; - val = ((pteval_t )mfn_to_pfn (mfn) <<PAGE_SHIFT ) | flags; +if (unlikely (pfn == ~0 )) + val = flags & ~_PAGE_PRESENT; +else + val = ((pteval_t )pfn <<PAGE_SHIFT ) | flags; }return val;
drivers/block/mtip32xx/Kconfig +1 -1
@@ -4,6 +4,6 @@ config BLK_DEV_PCIESSD_MTIP32XX tristate "Block Device Driver for Micron PCIe SSDs" - depends on HOTPLUG_PCI_PCIE + depends on PCI help This enables the block driver for Micron PCIe SSDs.
drivers/block/mtip32xx/mtip32xx.c +19 -15
@@ -422,6 +422,10 @@ static void mtip_init_port(struct mtip_port *port)/* Clear any pending interrupts for this port */ writel (readl (port->mmio +PORT_IRQ_STAT ), port->mmio +PORT_IRQ_STAT ); +/* Clear any pending interrupts on the HBA. */ +writel (readl (port->dd->mmio +HOST_IRQ_STAT ), + port->dd->mmio +HOST_IRQ_STAT ); +/* Enable port interrupts */ writel (DEF_PORT_IRQ , port->mmio +PORT_IRQ_MASK ); }
@@ -490,11 +494,9 @@ static void mtip_restart_port(struct mtip_port *port)dev_warn (&port->dd->pdev->dev,"COM reset failed\n" ); -/* Clear SError, the PxSERR.DIAG.x should be set so clear it */ -writel (readl (port->mmio +PORT_SCR_ERR ), port->mmio +PORT_SCR_ERR ); +mtip_init_port (port); +mtip_start_port (port); -/* Enable the DMA engine */ -mtip_enable_engine (port,1 ); }/*
@@ -3359,9 +3361,6 @@ static int mtip_pci_probe(struct pci_dev *pdev,return -ENOMEM ; } -/* Set the atomic variable as 1 in case of SRSI */ -atomic_set (&dd->drv_cleanup_done, true); -atomic_set (&dd->resumeflag, false);/* Attach the private data to this PCI device. */
@@ -3434,8 +3433,8 @@ iomap_err:pci_set_drvdata (pdev,NULL );return rv; done: -/* Set the atomic variable as 0 in case of SRSI */ -atomic_set (&dd->drv_cleanup_done, true); +/* Set the atomic variable as 0 */ +atomic_set (&dd->drv_cleanup_done, false);return rv; }
@@ -3463,8 +3462,6 @@ static void mtip_pci_remove(struct pci_dev *pdev) } } } -/* Set the atomic variable as 1 in case of SRSI */ -atomic_set (&dd->drv_cleanup_done, true);/* Clean up the block layer. */ mtip_block_remove (dd);
@@ -3608,18 +3605,25 @@ MODULE_DEVICE_TABLE(pci, mtip_pci_tbl);*/ static int __init mtip_init (void ) { +int error; + printk(KERN_INFO MTIP_DRV_NAME " Version " MTIP_DRV_VERSION "\n");/* Allocate a major block device number to use with this driver. */ - mtip_major =register_blkdev (0 ,MTIP_DRV_NAME ); -if (mtip_major <0 ) { + error =register_blkdev (0 ,MTIP_DRV_NAME ); +if (error <=0 ) {printk (KERN_ERR "Unable to register block device (%d)\n" , - mtip_major); + error);return -EBUSY ; } + mtip_major = error;/* Register our PCI operations. */ -return pci_register_driver (&mtip_pci_driver); + error =pci_register_driver (&mtip_pci_driver); +if (error) +unregister_blkdev (mtip_major,MTIP_DRV_NAME ); + +return error; }/*
drivers/gpu/drm/i915/intel_hdmi.c +1 -1
@@ -136,7 +136,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder, val &= ~VIDEO_DIP_SELECT_MASK ; -I915_WRITE (VIDEO_DIP_CTL , val | port | flags); +I915_WRITE (VIDEO_DIP_CTL ,VIDEO_DIP_ENABLE | val | port | flags);for (i =0 ; i < len; i +=4 ) {I915_WRITE (VIDEO_DIP_DATA , *data);
drivers/gpu/drm/i915/intel_ringbuffer.c +6 -3
@@ -414,10 +414,8 @@ static int init_render_ring(struct intel_ring_buffer *ring)return ret; } -if (INTEL_INFO (dev)->gen >=6 ) { -I915_WRITE (INSTPM , -INSTPM_FORCE_ORDERING <<16 |INSTPM_FORCE_ORDERING ); +if (IS_GEN6 (dev)) {/* From the Sandybridge PRM, volume 1 part 3, page 24: * "If this bit is set, STCunit will have LRA as replacement * policy. [...] This bit must be reset. LRA replacement
@@ -427,6 +425,11 @@ static int init_render_ring(struct intel_ring_buffer *ring) CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT); } +if (INTEL_INFO (dev)->gen >=6 ) { +I915_WRITE (INSTPM , +INSTPM_FORCE_ORDERING <<16 |INSTPM_FORCE_ORDERING ); + } +return ret; }
drivers/gpu/drm/i915/intel_sdvo.c +6 -0
@@ -1221,8 +1221,14 @@ static bool intel_sdvo_get_capabilities(struct intel_sdvo *intel_sdvo, struct instatic int intel_sdvo_supports_hotplug (struct intel_sdvo *intel_sdvo) { +struct drm_device *dev = intel_sdvo->base.base.dev;u8 response[2 ]; +/* HW Erratum: SDVO Hotplug is broken on all i945G chips, there's noise +* on the line. */ +if (IS_I945G (dev) ||IS_I945GM (dev)) +return false; +return intel_sdvo_get_value (intel_sdvo,SDVO_CMD_GET_HOT_PLUG_SUPPORT , &response,2 ) && response[0 ]; }
drivers/net/ethernet/broadcom/tg3.c +16 -2
@@ -879,8 +879,13 @@ static inline unsigned int tg3_has_work(struct tg3_napi *tnapi)if (sblk->status &SD_STATUS_LINK_CHG ) work_exists =1 ; } -/* check for RX/TX work to do */ -if (sblk->idx[0 ].tx_consumer != tnapi->tx_cons || + +/* check for TX work to do */ +if (sblk->idx[0 ].tx_consumer != tnapi->tx_cons) + work_exists =1 ; + +/* check for RX work to do */ +if (tnapi->rx_rcb_prod_idx && *(tnapi->rx_rcb_prod_idx) != tnapi->rx_rcb_ptr) work_exists =1 ;
@@ -5877,6 +5882,9 @@ static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget)return work_done; } +if (!tnapi->rx_rcb_prod_idx) +return work_done; +/* run RX thread, within the bounds set by NAPI. * All RX "locking" is done by ensuring outside * code synchronizes with tg3->napi.poll()
@@ -7428,6 +7436,12 @@ static int tg3_alloc_consistent(struct tg3 *tp)*/ switch (i) {default : +if (tg3_flag (tp,ENABLE_RSS )) { + tnapi->rx_rcb_prod_idx =NULL ; +break ; + } +/* Fall through */ +case 1 : tnapi->rx_rcb_prod_idx = &sblk->idx[0 ].rx_producer;break ;case 2 :
drivers/net/ethernet/intel/e1000/e1000_main.c +22 -13
@@ -164,6 +164,8 @@ static int e1000_82547_fifo_workaround(struct e1000_adapter *adapter,static bool e1000_vlan_used (struct e1000_adapter *adapter);static void e1000_vlan_mode (struct net_device *netdev,netdev_features_t features); +static void e1000_vlan_filter_on_off (struct e1000_adapter *adapter, +bool filter_on);static int e1000_vlan_rx_add_vid (struct net_device *netdev,u16 vid);static int e1000_vlan_rx_kill_vid (struct net_device *netdev,u16 vid);static void e1000_restore_vlan (struct e1000_adapter *adapter);
@@ -1213,7 +1215,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,if (err) goto err_register; -e1000_vlan_mode (netdev, netdev->features); +e1000_vlan_filter_on_off (adapter, false);/* print bus type/speed/width info */ e_info(probe, "(PCI%s:%dMHz:%d-bit) %pM\n",
@@ -4549,6 +4551,22 @@ static bool e1000_vlan_used(struct e1000_adapter *adapter)return false; } +static void __e1000_vlan_mode (struct e1000_adapter *adapter, +netdev_features_t features) +{ +struct e1000_hw *hw = &adapter->hw; +u32 ctrl; + + ctrl =er32 (CTRL ); +if (features &NETIF_F_HW_VLAN_RX ) { +/* enable VLAN tag insert/strip */ + ctrl |=E1000_CTRL_VME ; + }else { +/* disable VLAN tag insert/strip */ + ctrl &= ~E1000_CTRL_VME ; + } +ew32 (CTRL , ctrl); +}static void e1000_vlan_filter_on_off (struct e1000_adapter *adapter,bool filter_on) {
@@ -4558,6 +4576,7 @@ static void e1000_vlan_filter_on_off(struct e1000_adapter *adapter,if (!test_bit (__E1000_DOWN, &adapter->flags))e1000_irq_disable (adapter); +__e1000_vlan_mode (adapter, adapter->netdev->features);if (filter_on) {/* enable VLAN receive filtering */ rctl =er32 (RCTL );
@@ -4578,24 +4597,14 @@ static void e1000_vlan_filter_on_off(struct e1000_adapter *adapter, }static void e1000_vlan_mode (struct net_device *netdev, -netdev_features_t features) +netdev_features_t features) {struct e1000_adapter *adapter =netdev_priv (netdev); -struct e1000_hw *hw = &adapter->hw; -u32 ctrl;if (!test_bit (__E1000_DOWN, &adapter->flags))e1000_irq_disable (adapter); - ctrl =er32 (CTRL ); -if (features &NETIF_F_HW_VLAN_RX ) { -/* enable VLAN tag insert/strip */ - ctrl |=E1000_CTRL_VME ; - }else { -/* disable VLAN tag insert/strip */ - ctrl &= ~E1000_CTRL_VME ; - } -ew32 (CTRL , ctrl); +__e1000_vlan_mode (adapter, features);if (!test_bit (__E1000_DOWN, &adapter->flags))e1000_irq_enable (adapter);
drivers/net/ethernet/marvell/sky2.c +20 -11
@@ -2483,8 +2483,13 @@ static struct sk_buff *receive_copy(struct sky2_port *sky2,skb_copy_from_linear_data (re->skb, skb->data, length); skb->ip_summed = re->skb->ip_summed; skb->csum = re->skb->csum; + skb->rxhash = re->skb->rxhash; + skb->vlan_tci = re->skb->vlan_tci; +pci_dma_sync_single_for_device (sky2->hw->pdev, re->data_addr, length,PCI_DMA_FROMDEVICE ); + re->skb->vlan_tci =0 ; + re->skb->rxhash =0 ; re->skb->ip_summed =CHECKSUM_NONE ;skb_put (skb, length); }
@@ -2569,9 +2574,6 @@ static struct sk_buff *sky2_receive(struct net_device *dev,struct sk_buff *skb =NULL ;u16 count = (status &GMR_FS_LEN ) >>16 ; -if (status &GMR_FS_VLAN ) - count -=VLAN_HLEN ;/* Account for vlan tag */ -netif_printk (sky2, rx_status,KERN_DEBUG , dev,"rx slot %u status 0x%x len %d\n" , sky2->rx_next, status, length);
@@ -2579,6 +2581,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev, sky2->rx_next = (sky2->rx_next +1 ) % sky2->rx_pending;prefetch (sky2->rx_ring + sky2->rx_next); +if (vlan_tx_tag_present (re->skb)) + count -=VLAN_HLEN ;/* Account for vlan tag */ +/* This chip has hardware problems that generates bogus status. * So do only marginal checking and expect higher level protocols * to handle crap frames.
@@ -2636,11 +2641,8 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last) }static inline void sky2_skb_rx (const struct sky2_port *sky2, -u32 status,struct sk_buff *skb) +struct sk_buff *skb) { -if (status &GMR_FS_VLAN ) -__vlan_hwaccel_put_tag (skb,be16_to_cpu (sky2->rx_tag)); -if (skb->ip_summed ==CHECKSUM_NONE )netif_receive_skb (skb);else
@@ -2694,6 +2696,14 @@ static void sky2_rx_checksum(struct sky2_port *sky2, u32 status) } } +static void sky2_rx_tag (struct sky2_port *sky2,u16 length) +{ +struct sk_buff *skb; + + skb = sky2->rx_ring[sky2->rx_next].skb; +__vlan_hwaccel_put_tag (skb,be16_to_cpu (length)); +} +static void sky2_rx_hash (struct sky2_port *sky2,u32 status) {struct sk_buff *skb;
@@ -2752,8 +2762,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx) } skb->protocol =eth_type_trans (skb, dev); - -sky2_skb_rx (sky2, status, skb); +sky2_skb_rx (sky2, skb);/* Stop after net poll weight */ if (++work_done >= to_do)
@@ -2761,11 +2770,11 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)break ;case OP_RXVLAN : - sky2->rx_tag = length; +sky2_rx_tag (sky2, length);break ;case OP_RXCHKSVLAN : - sky2->rx_tag = length; +sky2_rx_tag (sky2, length);/* fall through */ case OP_RXCHKS :if (likely (dev->features &NETIF_F_RXCSUM ))
drivers/net/ethernet/marvell/sky2.h +0 -1
@@ -2241,7 +2241,6 @@ struct sky2_port {u16 rx_pending;u16 rx_data_size;u16 rx_nfrags; -u16 rx_tag;struct {unsigned long last;
drivers/net/ethernet/sun/sungem.c +1 -1
@@ -2340,7 +2340,7 @@ static int gem_suspend(struct pci_dev *pdev, pm_message_t state)netif_device_detach (dev);/* Switch off chip, remember WOL setting */ - gp->asleep_wol = gp->wake_on_lan; + gp->asleep_wol = !!gp->wake_on_lan;gem_do_stop (dev, gp->asleep_wol);/* Unlock the network stack */
drivers/net/usb/asix.c +2 -2
@@ -403,7 +403,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,u32 packet_len;u32 padbytes =0xffff0000 ; - padlen = ((skb->len +4 ) %512 ) ?0 :4 ; + padlen = ((skb->len +4 ) & (dev->maxpacket -1 )) ?0 :4 ;if ((!skb_cloned (skb)) && ((headroom + tailroom) >= (4 + padlen))) {
@@ -425,7 +425,7 @@ static struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,cpu_to_le32s (&packet_len);skb_copy_to_linear_data (skb, &packet_len,sizeof (packet_len)); -if ((skb->len %512 ) ==0 ) { +if (padlen) {cpu_to_le32s (&padbytes);memcpy (skb_tail_pointer (skb), &padbytes,sizeof (padbytes));skb_put (skb,sizeof (padbytes));
drivers/net/usb/smsc95xx.c +1 -1
@@ -1191,7 +1191,7 @@ static const struct driver_info smsc95xx_info = { .rx_fixup = smsc95xx_rx_fixup, .tx_fixup = smsc95xx_tx_fixup, .status = smsc95xx_status, - .flags = FLAG_ETHER | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_SEND_ZLP | FLAG_LINK_INTR, };static const struct usb_device_id products[] = {
drivers/platform/x86/sony-laptop.c +1 -1
@@ -127,7 +127,7 @@ MODULE_PARM_DESC(minor, "default is -1 (automatic)");#endif -static int kbd_backlight;/* = 1 */ +static int kbd_backlight =1 ;module_param (kbd_backlight, int,0444 );MODULE_PARM_DESC (kbd_backlight, "set this to 0 to disable keyboard backlight, "
drivers/regulator/max8997.c +1 -1
@@ -689,7 +689,7 @@ static int max8997_set_voltage_buck(struct regulator_dev *rdev, } new_val++; - }while (desc->min + desc->step + new_val <= desc->max); + }while (desc->min + desc->step * new_val <= desc->max); new_idx = tmp_idx; new_val = tmp_val;
drivers/usb/gadget/udc-core.c +2 -2
@@ -211,8 +211,8 @@ static void usb_gadget_remove_driver(struct usb_udc *udc)if (udc_is_newstyle (udc)) { udc->driver->disconnect (udc->gadget); - udc->driver->unbind (udc->gadget);usb_gadget_disconnect (udc->gadget); + udc->driver->unbind (udc->gadget);usb_gadget_udc_stop (udc->gadget, udc->driver); }else {usb_gadget_stop (udc->gadget, udc->driver);
@@ -363,9 +363,9 @@ static ssize_t usb_udc_softconn_store(struct device *dev,usb_gadget_udc_start (udc->gadget, udc->driver);usb_gadget_connect (udc->gadget); }else if (sysfs_streq (buf,"disconnect" )) { +usb_gadget_disconnect (udc->gadget);if (udc_is_newstyle (udc))usb_gadget_udc_stop (udc->gadget, udc->driver); -usb_gadget_disconnect (udc->gadget); }else {dev_err (dev,"unsupported command '%s'\n" , buf);return -EINVAL ;
fs/cifs/cifssmb.c +5 -1
@@ -4831,8 +4831,12 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, max_len = data_end - temp; node->node_name =cifs_strndup_from_utf16 (temp, max_len, is_unicode, nls_codepage); -if (!node->node_name) +if (!node->node_name) { rc = -ENOMEM ; + goto parse_DFS_referrals_exit; + } + + ref++; } parse_DFS_referrals_exit:
fs/hugetlbfs/inode.c +21 -33
84 lines not on this page · raw message
fs/nfsd/nfs4proc.c +4 -4
@@ -231,17 +231,17 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o*/ if (open->op_createmode ==NFS4_CREATE_EXCLUSIVE && status ==0 ) open->op_bmval[1 ] = (FATTR4_WORD1_TIME_ACCESS | -FATTR4_WORD1_TIME_MODIFY ); +FATTR4_WORD1_TIME_MODIFY ); }else { status =nfsd_lookup (rqstp, current_fh, open->op_fname.data, open->op_fname.len, &resfh);fh_unlock (current_fh); -if (status) - goto out; - status =nfsd_check_obj_isreg (&resfh); }if (status) goto out; + status =nfsd_check_obj_isreg (&resfh); +if (status) + goto out;if (is_create_with_attrs (open) && open->op_acl !=NULL )do_set_nfs4_acl (rqstp, &resfh, open->op_acl, open->op_bmval);
fs/nfsd/vfs.c +1 -1
@@ -1450,7 +1450,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,switch (createmode) {case NFS3_CREATE_UNCHECKED :if (!S_ISREG (dchild->d_inode->i_mode)) - err = nfserr_exist; + goto out;else if (truncp) {/* in nfsv4, we need to treat this case a little * differently. we don't want to truncate the
include/asm-generic/statfs.h +1 -1
@@ -15,7 +15,7 @@ typedef __kernel_fsid_t fsid_t;* with a 10' pole. */ #ifndef __statfs_word -#if BITS_PER_LONG ==64 +#if __BITS_PER_LONG ==64 #define __statfs_word long#else #define __statfs_word __u32
include/linux/hugetlb.h +10 -4
@@ -14,6 +14,15 @@ struct user_struct;#include <linux/shm.h> #include <asm/tlbflush.h> +struct hugepage_subpool { +spinlock_t lock; +long count; +long max_hpages, used_hpages; +}; + +struct hugepage_subpool *hugepage_new_subpool (long nr_blocks); +void hugepage_put_subpool (struct hugepage_subpool *spool); +int PageHuge (struct page *page);void reset_vma_resv_huge_pages (struct vm_area_struct *vma);
@@ -138,12 +147,11 @@ struct hugetlbfs_config { };struct hugetlbfs_sb_info { -long max_blocks;/* blocks allowed */ -long free_blocks;/* blocks free */ long max_inodes;/* inodes allowed */ long free_inodes;/* inodes free */ spinlock_t stat_lock;struct hstate *hstate; +struct hugepage_subpool *spool; };
@@ -166,8 +174,6 @@ extern const struct file_operations hugetlbfs_file_operations;extern const struct vm_operations_struct hugetlb_vm_ops;struct file *hugetlb_file_setup (const char *name,size_t size,vm_flags_t acct,struct user_struct **user,int creat_flags); -int hugetlb_get_quota (struct address_space *mapping,long delta); -void hugetlb_put_quota (struct address_space *mapping,long delta);static inline int is_file_hugepages (struct file *file) {
include/linux/kvm_host.h +7 -0
@@ -775,6 +775,13 @@ static inline bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu) {return vcpu->kvm->bsp_vcpu_id == vcpu->vcpu_id; } + +bool kvm_vcpu_compatible (struct kvm_vcpu *vcpu); + +#else + +static inline bool kvm_vcpu_compatible (struct kvm_vcpu *vcpu) {return true; } +#endif #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
include/linux/netdevice.h +34 -16
68 lines not on this page · raw message
include/linux/seqlock.h +1 -1
@@ -141,7 +141,7 @@ static inline unsigned __read_seqcount_begin(const seqcount_t *s)unsigned ret; repeat: - ret = s->sequence; + ret =ACCESS_ONCE (s->sequence);if (unlikely (ret &1 )) {cpu_relax (); goto repeat;
mm/hugetlb.c +108 -27
238 lines not on this page · raw message
net/core/dev.c +20 -0
@@ -1412,14 +1412,34 @@ EXPORT_SYMBOL(register_netdevice_notifier);* register_netdevice_notifier(). The notifier is unlinked into the * kernel structures and may then be reused. A negative errno code * is returned on a failure. +* +* After unregistering unregister and down device events are synthesized +* for all devices on the device list to the removed notifier to remove +* the need for special case cleanup code. */ int unregister_netdevice_notifier (struct notifier_block *nb) { +struct net_device *dev; +struct net *net;int err;rtnl_lock (); err =raw_notifier_chain_unregister (&netdev_chain, nb); +if (err) + goto unlock; + +for_each_net (net) { +for_each_netdev (net, dev) { +if (dev->flags &IFF_UP ) { + nb->notifier_call (nb,NETDEV_GOING_DOWN , dev); + nb->notifier_call (nb,NETDEV_DOWN , dev); + } + nb->notifier_call (nb,NETDEV_UNREGISTER , dev); + nb->notifier_call (nb,NETDEV_UNREGISTER_BATCH , dev); + } + } +unlock:rtnl_unlock ();return err; }
net/ipv4/tcp.c +5 -4
@@ -3240,7 +3240,7 @@ void __init tcp_init(void) {struct sk_buff *skb =NULL ;unsigned long limit; -int max_share, cnt; +int max_rshare, max_wshare, cnt;unsigned int i;unsigned long jiffy = jiffies;
@@ -3300,15 +3300,16 @@ void __init tcp_init(void)tcp_init_mem (&init_net);/* Set per-socket limits to no more than 1/128 the pressure threshold */ limit =nr_free_buffer_pages () << (PAGE_SHIFT -7 ); - max_share =min (4UL *1024 *1024 , limit); + max_wshare =min (4UL *1024 *1024 , limit); + max_rshare =min (6UL *1024 *1024 , limit); sysctl_tcp_wmem[0 ] =SK_MEM_QUANTUM ; sysctl_tcp_wmem[1 ] =16 *1024 ; - sysctl_tcp_wmem[2 ] =max (64 *1024 , max_share); + sysctl_tcp_wmem[2 ] =max (64 *1024 , max_wshare); sysctl_tcp_rmem[0 ] =SK_MEM_QUANTUM ; sysctl_tcp_rmem[1 ] =87380 ; - sysctl_tcp_rmem[2 ] =max (87380 , max_share); + sysctl_tcp_rmem[2 ] =max (87380 , max_rshare); printk(KERN_INFO "TCP: Hash tables configured " "(established %u bind %u)\n",
net/ipv4/tcp_input.c +7 -4
@@ -83,7 +83,7 @@ int sysctl_tcp_ecn __read_mostly = 2;EXPORT_SYMBOL (sysctl_tcp_ecn);int sysctl_tcp_dsack__read_mostly =1 ;int sysctl_tcp_app_win__read_mostly =31 ; -int sysctl_tcp_adv_win_scale__read_mostly =2 ; +int sysctl_tcp_adv_win_scale__read_mostly =1 ;EXPORT_SYMBOL (sysctl_tcp_adv_win_scale);int sysctl_tcp_stdurg__read_mostly ;
@@ -2866,11 +2866,14 @@ static inline void tcp_complete_cwr(struct sock *sk)/* Do not moderate cwnd if it's already undone in cwr or recovery. */ if (tp->undo_marker) { -if (inet_csk (sk)->icsk_ca_state ==TCP_CA_CWR ) +if (inet_csk (sk)->icsk_ca_state ==TCP_CA_CWR ) { tp->snd_cwnd =min (tp->snd_cwnd, tp->snd_ssthresh); -else /* PRR */ + tp->snd_cwnd_stamp = tcp_time_stamp; + }else if (tp->snd_ssthresh <TCP_INFINITE_SSTHRESH ) { +/* PRR algorithm. */ tp->snd_cwnd = tp->snd_ssthresh; - tp->snd_cwnd_stamp = tcp_time_stamp; + tp->snd_cwnd_stamp = tcp_time_stamp; + } }tcp_ca_event (sk,CA_EVENT_COMPLETE_CWR ); }
net/l2tp/l2tp_ip.c +2 -1
@@ -441,8 +441,9 @@ static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m daddr = lip->l2tp_addr.s_addr; }else { + rc = -EDESTADDRREQ ;if (sk->sk_state !=TCP_ESTABLISHED ) -return -EDESTADDRREQ ; + goto out; daddr = inet->inet_daddr; connected =1 ;
net/sched/sch_netem.c +2 -4
@@ -408,10 +408,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)if (q->corrupt && q->corrupt >=get_crandom (&q->corrupt_cor)) {if (!(skb =skb_unshare (skb,GFP_ATOMIC )) || (skb->ip_summed ==CHECKSUM_PARTIAL && -skb_checksum_help (skb))) { - sch->qstats.drops++; -return NET_XMIT_DROP ; - } +skb_checksum_help (skb))) +return qdisc_drop (skb, sch); skb->data[net_random () %skb_headlen (skb)] ^=1 <<(net_random () %8 ); }
sound/soc/codecs/tlv320aic23.c +2 -2
@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai,static int tlv320aic23_set_bias_level (struct snd_soc_codec *codec,enum snd_soc_bias_level level) { -u16 reg =snd_soc_read (codec,TLV320AIC23_PWR ) &0xff7f ; +u16 reg =snd_soc_read (codec,TLV320AIC23_PWR ) &0x17f ;switch (level) {case SND_SOC_BIAS_ON :
@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,case SND_SOC_BIAS_OFF :/* everything off, dac mute, inactive */ snd_soc_write (codec,TLV320AIC23_ACTIVE ,0x0 ); -snd_soc_write (codec,TLV320AIC23_PWR ,0xffff ); +snd_soc_write (codec,TLV320AIC23_PWR ,0x1ff );break ; } codec->dapm.bias_level = level;
sound/soc/soc-core.c +3 -3
@@ -3420,10 +3420,10 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,int i, ret; num_routes =of_property_count_strings (np, propname); -if (num_routes &1 ) { +if (num_routes <0 || num_routes &1 ) {dev_err (card->dev, -"Property '%s's length is not even\n" , - propname); +"Property '%s' does not exist or its length is not even\n" , + propname);return -EINVAL ; } num_routes /=2 ;
virt/kvm/iommu.c +15 -8
@@ -240,9 +240,13 @@ int kvm_iommu_map_guest(struct kvm *kvm)return -ENODEV ; } +mutex_lock (&kvm->slots_lock); + kvm->arch.iommu_domain =iommu_domain_alloc (&pci_bus_type); -if (!kvm->arch.iommu_domain) -return -ENOMEM ; +if (!kvm->arch.iommu_domain) { + r = -ENOMEM ; + goto out_unlock; + }if (!allow_unsafe_assigned_interrupts && !iommu_domain_has_cap(kvm->arch.iommu_domain,
@@ -253,17 +257,16 @@ int kvm_iommu_map_guest(struct kvm *kvm) " module option.\n", __func__);iommu_domain_free (kvm->arch.iommu_domain); kvm->arch.iommu_domain =NULL ; -return -EPERM ; + r = -EPERM ; + goto out_unlock; } r =kvm_iommu_map_memslots (kvm);if (r) - goto out_unmap; - -return 0 ; +kvm_iommu_unmap_memslots (kvm); -out_unmap: -kvm_iommu_unmap_memslots (kvm); +out_unlock: +mutex_unlock (&kvm->slots_lock);return r; }
@@ -340,7 +343,11 @@ int kvm_iommu_unmap_guest(struct kvm *kvm)if (!domain)return 0 ; +mutex_lock (&kvm->slots_lock);kvm_iommu_unmap_memslots (kvm); + kvm->arch.iommu_domain =NULL ; +mutex_unlock (&kvm->slots_lock); +iommu_domain_free (domain);return 0 ; }
virt/kvm/kvm_main.c +14 -9
@@ -289,15 +289,15 @@ static void kvm_mmu_notifier_invalidate_page(struct mmu_notifier *mn,*/ idx =srcu_read_lock (&kvm->srcu);spin_lock (&kvm->mmu_lock); + kvm->mmu_notifier_seq++; need_tlb_flush =kvm_unmap_hva (kvm, address) | kvm->tlbs_dirty; -spin_unlock (&kvm->mmu_lock); -srcu_read_unlock (&kvm->srcu, idx); -/* we've to flush the tlb before the pages can be freed */ if (need_tlb_flush)kvm_flush_remote_tlbs (kvm); +spin_unlock (&kvm->mmu_lock); +srcu_read_unlock (&kvm->srcu, idx); } static void kvm_mmu_notifier_change_pte(struct mmu_notifier *mn,
@@ -335,12 +335,12 @@ static void kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn,for (; start < end; start +=PAGE_SIZE ) need_tlb_flush |=kvm_unmap_hva (kvm, start); need_tlb_flush |= kvm->tlbs_dirty; -spin_unlock (&kvm->mmu_lock); -srcu_read_unlock (&kvm->srcu, idx); -/* we've to flush the tlb before the pages can be freed */ if (need_tlb_flush)kvm_flush_remote_tlbs (kvm); + +spin_unlock (&kvm->mmu_lock); +srcu_read_unlock (&kvm->srcu, idx); } static void kvm_mmu_notifier_invalidate_range_end(struct mmu_notifier *mn,
@@ -378,13 +378,14 @@ static int kvm_mmu_notifier_clear_flush_young(struct mmu_notifier *mn, idx =srcu_read_lock (&kvm->srcu);spin_lock (&kvm->mmu_lock); - young =kvm_age_hva (kvm, address); -spin_unlock (&kvm->mmu_lock); -srcu_read_unlock (&kvm->srcu, idx); + young =kvm_age_hva (kvm, address);if (young)kvm_flush_remote_tlbs (kvm); +spin_unlock (&kvm->mmu_lock); +srcu_read_unlock (&kvm->srcu, idx); +return young; }
@@ -1719,6 +1720,10 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id) goto vcpu_destroy;mutex_lock (&kvm->lock); +if (!kvm_vcpu_compatible (vcpu)) { + r = -EINVAL ; + goto unlock_vcpu_destroy; + }if (atomic_read (&kvm->online_vcpus) ==KVM_MAX_VCPUS ) { r = -EINVAL ; goto unlock_vcpu_destroy;