diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/arc/include/asm/pgtable.h linux-libre-3.14.35-gnu/arch/arc/include/asm/pgtable.h
--- linux-libre-3.14.34-gnu/arch/arc/include/asm/pgtable.h	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/arc/include/asm/pgtable.h	2015-03-06 17:44:34.000000000 -0500
@@ -259,7 +259,8 @@ static inline void pmd_set(pmd_t *pmdp,
 #define pmd_clear(xp)			do { pmd_val(*(xp)) = 0; } while (0)
 
 #define pte_page(x) (mem_map + \
-		(unsigned long)(((pte_val(x) - PAGE_OFFSET) >> PAGE_SHIFT)))
+		(unsigned long)(((pte_val(x) - CONFIG_LINUX_LINK_BASE) >> \
+				PAGE_SHIFT)))
 
 #define mk_pte(page, pgprot)						\
 ({									\
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/arm/boot/dts/am335x-bone-common.dtsi linux-libre-3.14.35-gnu/arch/arm/boot/dts/am335x-bone-common.dtsi
--- linux-libre-3.14.34-gnu/arch/arm/boot/dts/am335x-bone-common.dtsi	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/arm/boot/dts/am335x-bone-common.dtsi	2015-03-06 17:44:34.000000000 -0500
@@ -197,6 +197,7 @@
 
 	usb@47401000 {
 		status = "okay";
+		dr_mode = "peripheral";
 	};
 
 	usb@47401800 {
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/arm/boot/dts/tegra20.dtsi linux-libre-3.14.35-gnu/arch/arm/boot/dts/tegra20.dtsi
--- linux-libre-3.14.34-gnu/arch/arm/boot/dts/tegra20.dtsi	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/arm/boot/dts/tegra20.dtsi	2015-03-06 17:44:34.000000000 -0500
@@ -76,9 +76,9 @@
 			reset-names = "2d";
 		};
 
-		gr3d@54140000 {
+		gr3d@54180000 {
 			compatible = "nvidia,tegra20-gr3d";
-			reg = <0x54140000 0x00040000>;
+			reg = <0x54180000 0x00040000>;
 			clocks = <&tegra_car TEGRA20_CLK_GR3D>;
 			resets = <&tegra_car 24>;
 			reset-names = "3d";
@@ -138,9 +138,9 @@
 			status = "disabled";
 		};
 
-		dsi@542c0000 {
+		dsi@54300000 {
 			compatible = "nvidia,tegra20-dsi";
-			reg = <0x542c0000 0x00040000>;
+			reg = <0x54300000 0x00040000>;
 			clocks = <&tegra_car TEGRA20_CLK_DSI>;
 			resets = <&tegra_car 48>;
 			reset-names = "dsi";
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/arm/mach-omap2/omap_hwmod_7xx_data.c linux-libre-3.14.35-gnu/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
--- linux-libre-3.14.34-gnu/arch/arm/mach-omap2/omap_hwmod_7xx_data.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/arm/mach-omap2/omap_hwmod_7xx_data.c	2015-03-06 17:44:34.000000000 -0500
@@ -1669,7 +1669,7 @@ static struct omap_hwmod dra7xx_uart3_hw
 	.class		= &dra7xx_uart_hwmod_class,
 	.clkdm_name	= "l4per_clkdm",
 	.main_clk	= "uart3_gfclk_mux",
-	.flags		= HWMOD_SWSUP_SIDLE_ACT,
+	.flags		= HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS,
 	.prcm = {
 		.omap4 = {
 			.clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/arm/mach-pxa/corgi.c linux-libre-3.14.35-gnu/arch/arm/mach-pxa/corgi.c
--- linux-libre-3.14.34-gnu/arch/arm/mach-pxa/corgi.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/arm/mach-pxa/corgi.c	2015-03-06 17:44:34.000000000 -0500
@@ -26,6 +26,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c/pxa-i2c.h>
 #include <linux/io.h>
+#include <linux/regulator/machine.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/spi/corgi_lcd.h>
@@ -711,6 +712,8 @@ static void __init corgi_init(void)
 		sharpsl_nand_partitions[1].size = 53 * 1024 * 1024;
 
 	platform_add_devices(devices, ARRAY_SIZE(devices));
+
+	regulator_has_full_constraints();
 }
 
 static void __init fixup_corgi(struct tag *tags, char **cmdline,
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/arm/mach-pxa/hx4700.c linux-libre-3.14.35-gnu/arch/arm/mach-pxa/hx4700.c
--- linux-libre-3.14.34-gnu/arch/arm/mach-pxa/hx4700.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/arm/mach-pxa/hx4700.c	2015-03-06 17:44:34.000000000 -0500
@@ -892,6 +892,8 @@ static void __init hx4700_init(void)
 	mdelay(10);
 	gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1);
 	mdelay(10);
+
+	regulator_has_full_constraints();
 }
 
 MACHINE_START(H4700, "HP iPAQ HX4700")
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/arm/mach-pxa/poodle.c linux-libre-3.14.35-gnu/arch/arm/mach-pxa/poodle.c
--- linux-libre-3.14.34-gnu/arch/arm/mach-pxa/poodle.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/arm/mach-pxa/poodle.c	2015-03-06 17:44:34.000000000 -0500
@@ -25,6 +25,7 @@
 #include <linux/gpio.h>
 #include <linux/i2c.h>
 #include <linux/i2c/pxa-i2c.h>
+#include <linux/regulator/machine.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/spi/pxa2xx_spi.h>
@@ -454,6 +455,7 @@ static void __init poodle_init(void)
 	pxa_set_i2c_info(NULL);
 	i2c_register_board_info(0, ARRAY_AND_SIZE(poodle_i2c_devices));
 	poodle_init_spi();
+	regulator_has_full_constraints();
 }
 
 static void __init fixup_poodle(struct tag *tags, char **cmdline,
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/arm/mach-sa1100/pm.c linux-libre-3.14.35-gnu/arch/arm/mach-sa1100/pm.c
--- linux-libre-3.14.34-gnu/arch/arm/mach-sa1100/pm.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/arm/mach-sa1100/pm.c	2015-03-06 17:44:34.000000000 -0500
@@ -81,6 +81,7 @@ static int sa11x0_pm_enter(suspend_state
 	/*
 	 * Ensure not to come back here if it wasn't intended
 	 */
+	RCSR = RCSR_SMR;
 	PSPR = 0;
 
 	/*
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/arm64/kernel/signal32.c linux-libre-3.14.35-gnu/arch/arm64/kernel/signal32.c
--- linux-libre-3.14.34-gnu/arch/arm64/kernel/signal32.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/arm64/kernel/signal32.c	2015-03-06 17:44:34.000000000 -0500
@@ -151,8 +151,7 @@ int copy_siginfo_to_user32(compat_siginf
 	case __SI_TIMER:
 		 err |= __put_user(from->si_tid, &to->si_tid);
 		 err |= __put_user(from->si_overrun, &to->si_overrun);
-		 err |= __put_user((compat_uptr_t)(unsigned long)from->si_ptr,
-				   &to->si_ptr);
+		 err |= __put_user(from->si_int, &to->si_int);
 		break;
 	case __SI_POLL:
 		err |= __put_user(from->si_band, &to->si_band);
@@ -181,7 +180,7 @@ int copy_siginfo_to_user32(compat_siginf
 	case __SI_MESGQ: /* But this is */
 		err |= __put_user(from->si_pid, &to->si_pid);
 		err |= __put_user(from->si_uid, &to->si_uid);
-		err |= __put_user((compat_uptr_t)(unsigned long)from->si_ptr, &to->si_ptr);
+		err |= __put_user(from->si_int, &to->si_int);
 		break;
 	default: /* this is just in case for now ... */
 		err |= __put_user(from->si_pid, &to->si_pid);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/metag/include/asm/processor.h linux-libre-3.14.35-gnu/arch/metag/include/asm/processor.h
--- linux-libre-3.14.34-gnu/arch/metag/include/asm/processor.h	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/metag/include/asm/processor.h	2015-03-06 17:44:34.000000000 -0500
@@ -149,8 +149,8 @@ extern void exit_thread(void);
 
 unsigned long get_wchan(struct task_struct *p);
 
-#define	KSTK_EIP(tsk)	((tsk)->thread.kernel_context->CurrPC)
-#define	KSTK_ESP(tsk)	((tsk)->thread.kernel_context->AX[0].U0)
+#define	KSTK_EIP(tsk)	(task_pt_regs(tsk)->ctx.CurrPC)
+#define	KSTK_ESP(tsk)	(task_pt_regs(tsk)->ctx.AX[0].U0)
 
 #define user_stack_pointer(regs)        ((regs)->ctx.AX[0].U0)
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/mips/kernel/mips_ksyms.c linux-libre-3.14.35-gnu/arch/mips/kernel/mips_ksyms.c
--- linux-libre-3.14.34-gnu/arch/mips/kernel/mips_ksyms.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/mips/kernel/mips_ksyms.c	2015-03-06 17:44:34.000000000 -0500
@@ -14,6 +14,7 @@
 #include <linux/mm.h>
 #include <asm/uaccess.h>
 #include <asm/ftrace.h>
+#include <asm/fpu.h>
 
 extern void *__bzero(void *__s, size_t __count);
 extern long __strncpy_from_user_nocheck_asm(char *__to,
@@ -26,6 +27,13 @@ extern long __strnlen_user_nocheck_asm(c
 extern long __strnlen_user_asm(const char *s);
 
 /*
+ * Core architecture code
+ */
+#ifdef CONFIG_CPU_R4K_FPU
+EXPORT_SYMBOL_GPL(_save_fp);
+#endif
+
+/*
  * String functions
  */
 EXPORT_SYMBOL(memset);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/mips/kvm/kvm_locore.S linux-libre-3.14.35-gnu/arch/mips/kvm/kvm_locore.S
--- linux-libre-3.14.34-gnu/arch/mips/kvm/kvm_locore.S	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/mips/kvm/kvm_locore.S	2015-03-06 17:44:34.000000000 -0500
@@ -428,7 +428,7 @@ __kvm_mips_return_to_guest:
 	/* Setup status register for running guest in UM */
 	.set	at
 	or	v1, v1, (ST0_EXL | KSU_USER | ST0_IE)
-	and	v1, v1, ~ST0_CU0
+	and	v1, v1, ~(ST0_CU0 | ST0_MX)
 	.set	noat
 	mtc0	v1, CP0_STATUS
 	ehb
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/mips/kvm/kvm_mips.c linux-libre-3.14.35-gnu/arch/mips/kvm/kvm_mips.c
--- linux-libre-3.14.34-gnu/arch/mips/kvm/kvm_mips.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/mips/kvm/kvm_mips.c	2015-03-06 17:44:34.000000000 -0500
@@ -15,6 +15,7 @@
 #include <linux/vmalloc.h>
 #include <linux/fs.h>
 #include <linux/bootmem.h>
+#include <asm/fpu.h>
 #include <asm/page.h>
 #include <asm/cacheflush.h>
 #include <asm/mmu_context.h>
@@ -418,11 +419,13 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v
 		vcpu->mmio_needed = 0;
 	}
 
+	lose_fpu(1);
+
+	local_irq_disable();
 	/* Check if we have any exceptions/interrupts pending */
 	kvm_mips_deliver_interrupts(vcpu,
 				    kvm_read_c0_guest_cause(vcpu->arch.cop0));
 
-	local_irq_disable();
 	kvm_guest_enter();
 
 	r = __kvm_mips_vcpu_run(run, vcpu);
@@ -1021,9 +1024,6 @@ void kvm_mips_set_c0_status(void)
 {
 	uint32_t status = read_c0_status();
 
-	if (cpu_has_fpu)
-		status |= (ST0_CU1);
-
 	if (cpu_has_dsp)
 		status |= (ST0_MX);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/powerpc/sysdev/axonram.c linux-libre-3.14.35-gnu/arch/powerpc/sysdev/axonram.c
--- linux-libre-3.14.34-gnu/arch/powerpc/sysdev/axonram.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/powerpc/sysdev/axonram.c	2015-03-06 17:44:34.000000000 -0500
@@ -156,7 +156,7 @@ axon_ram_direct_access(struct block_devi
 	}
 
 	*kaddr = (void *)(bank->ph_addr + offset);
-	*pfn = virt_to_phys(kaddr) >> PAGE_SHIFT;
+	*pfn = virt_to_phys(*kaddr) >> PAGE_SHIFT;
 
 	return 0;
 }
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/x86/kvm/x86.c linux-libre-3.14.35-gnu/arch/x86/kvm/x86.c
--- linux-libre-3.14.34-gnu/arch/x86/kvm/x86.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/x86/kvm/x86.c	2015-03-06 17:44:34.000000000 -0500
@@ -1207,21 +1207,22 @@ void kvm_track_tsc_matching(struct kvm_v
 {
 #ifdef CONFIG_X86_64
 	bool vcpus_matched;
-	bool do_request = false;
 	struct kvm_arch *ka = &vcpu->kvm->arch;
 	struct pvclock_gtod_data *gtod = &pvclock_gtod_data;
 
 	vcpus_matched = (ka->nr_vcpus_matched_tsc + 1 ==
 			 atomic_read(&vcpu->kvm->online_vcpus));
 
-	if (vcpus_matched && gtod->clock.vclock_mode == VCLOCK_TSC)
-		if (!ka->use_master_clock)
-			do_request = 1;
-
-	if (!vcpus_matched && ka->use_master_clock)
-			do_request = 1;
-
-	if (do_request)
+	/*
+	 * Once the masterclock is enabled, always perform request in
+	 * order to update it.
+	 *
+	 * In order to enable masterclock, the host clocksource must be TSC
+	 * and the vcpus need to have matched TSCs.  When that happens,
+	 * perform request to enable masterclock.
+	 */
+	if (ka->use_master_clock ||
+	    (gtod->clock.vclock_mode == VCLOCK_TSC && vcpus_matched))
 		kvm_make_request(KVM_REQ_MASTERCLOCK_UPDATE, vcpu);
 
 	trace_kvm_track_tsc(vcpu->vcpu_id, ka->nr_vcpus_matched_tsc,
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/x86/mm/gup.c linux-libre-3.14.35-gnu/arch/x86/mm/gup.c
--- linux-libre-3.14.34-gnu/arch/x86/mm/gup.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/x86/mm/gup.c	2015-03-06 17:44:34.000000000 -0500
@@ -172,7 +172,7 @@ static int gup_pmd_range(pud_t pud, unsi
 		 */
 		if (pmd_none(pmd) || pmd_trans_splitting(pmd))
 			return 0;
-		if (unlikely(pmd_large(pmd))) {
+		if (unlikely(pmd_large(pmd) || !pmd_present(pmd))) {
 			/*
 			 * NUMA hinting faults need to be handled in the GUP
 			 * slowpath for accounting purposes and so that they
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/x86/mm/hugetlbpage.c linux-libre-3.14.35-gnu/arch/x86/mm/hugetlbpage.c
--- linux-libre-3.14.34-gnu/arch/x86/mm/hugetlbpage.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/x86/mm/hugetlbpage.c	2015-03-06 17:44:34.000000000 -0500
@@ -66,9 +66,15 @@ follow_huge_addr(struct mm_struct *mm, u
 	return ERR_PTR(-EINVAL);
 }
 
+/*
+ * pmd_huge() returns 1 if @pmd is hugetlb related entry, that is normal
+ * hugetlb entry or non-present (migration or hwpoisoned) hugetlb entry.
+ * Otherwise, returns 0.
+ */
 int pmd_huge(pmd_t pmd)
 {
-	return !!(pmd_val(pmd) & _PAGE_PSE);
+	return !pmd_none(pmd) &&
+		(pmd_val(pmd) & (_PAGE_PRESENT|_PAGE_PSE)) != _PAGE_PRESENT;
 }
 
 int pud_huge(pud_t pud)
diff -druNp --no-dereference linux-libre-3.14.34-gnu/arch/x86/mm/mmap.c linux-libre-3.14.35-gnu/arch/x86/mm/mmap.c
--- linux-libre-3.14.34-gnu/arch/x86/mm/mmap.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/arch/x86/mm/mmap.c	2015-03-06 17:44:34.000000000 -0500
@@ -35,12 +35,12 @@ struct __read_mostly va_alignment va_ali
 	.flags = -1,
 };
 
-static unsigned int stack_maxrandom_size(void)
+static unsigned long stack_maxrandom_size(void)
 {
-	unsigned int max = 0;
+	unsigned long max = 0;
 	if ((current->flags & PF_RANDOMIZE) &&
 		!(current->personality & ADDR_NO_RANDOMIZE)) {
-		max = ((-1U) & STACK_RND_MASK) << PAGE_SHIFT;
+		max = ((-1UL) & STACK_RND_MASK) << PAGE_SHIFT;
 	}
 
 	return max;
diff -druNp --no-dereference linux-libre-3.14.34-gnu/block/blk-throttle.c linux-libre-3.14.35-gnu/block/blk-throttle.c
--- linux-libre-3.14.34-gnu/block/blk-throttle.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/block/blk-throttle.c	2015-03-06 17:44:34.000000000 -0500
@@ -1292,6 +1292,9 @@ static u64 tg_prfill_cpu_rwstat(struct s
 	struct blkg_rwstat rwstat = { }, tmp;
 	int i, cpu;
 
+	if (tg->stats_cpu == NULL)
+		return 0;
+
 	for_each_possible_cpu(cpu) {
 		struct tg_stats_cpu *sc = per_cpu_ptr(tg->stats_cpu, cpu);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/block/cfq-iosched.c linux-libre-3.14.35-gnu/block/cfq-iosched.c
--- linux-libre-3.14.34-gnu/block/cfq-iosched.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/block/cfq-iosched.c	2015-03-06 17:44:34.000000000 -0500
@@ -3585,6 +3585,11 @@ retry:
 
 	blkcg = bio_blkcg(bio);
 	cfqg = cfq_lookup_create_cfqg(cfqd, blkcg);
+	if (!cfqg) {
+		cfqq = &cfqd->oom_cfqq;
+		goto out;
+	}
+
 	cfqq = cic_to_cfqq(cic, is_sync);
 
 	/*
@@ -3621,7 +3626,7 @@ retry:
 		} else
 			cfqq = &cfqd->oom_cfqq;
 	}
-
+out:
 	if (new_cfqq)
 		kmem_cache_free(cfq_pool, new_cfqq);
 
@@ -3651,12 +3656,17 @@ static struct cfq_queue *
 cfq_get_queue(struct cfq_data *cfqd, bool is_sync, struct cfq_io_cq *cic,
 	      struct bio *bio, gfp_t gfp_mask)
 {
-	const int ioprio_class = IOPRIO_PRIO_CLASS(cic->ioprio);
-	const int ioprio = IOPRIO_PRIO_DATA(cic->ioprio);
+	int ioprio_class = IOPRIO_PRIO_CLASS(cic->ioprio);
+	int ioprio = IOPRIO_PRIO_DATA(cic->ioprio);
 	struct cfq_queue **async_cfqq = NULL;
 	struct cfq_queue *cfqq = NULL;
 
 	if (!is_sync) {
+		if (!ioprio_valid(cic->ioprio)) {
+			struct task_struct *tsk = current;
+			ioprio = task_nice_ioprio(tsk);
+			ioprio_class = task_nice_ioclass(tsk);
+		}
 		async_cfqq = cfq_async_queue_prio(cfqd, ioprio_class, ioprio);
 		cfqq = *async_cfqq;
 	}
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/bluetooth/ath3k.c linux-libre-3.14.35-gnu/drivers/bluetooth/ath3k.c
--- linux-libre-3.14.34-gnu/drivers/bluetooth/ath3k.c	2015-02-27 01:46:40.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/bluetooth/ath3k.c	2015-03-07 17:04:10.000000000 -0500
@@ -157,6 +157,8 @@ static const struct usb_device_id ath3k_
 #define USB_REQ_DFU_DNLOAD	1
 #define BULK_SIZE		4096
 #define FW_HDR_SIZE		20
+#define TIMEGAP_USEC_MIN	50
+#define TIMEGAP_USEC_MAX	100
 
 static int ath3k_load_firmware(struct usb_device *udev,
 				const struct firmware *firmware)
@@ -187,6 +189,9 @@ static int ath3k_load_firmware(struct us
 	count -= 20;
 
 	while (count) {
+		/* workaround the compatibility issue with xHCI controller*/
+		usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX);
+
 		size = min_t(uint, count, BULK_SIZE);
 		pipe = usb_sndbulkpipe(udev, 0x02);
 		memcpy(send_buf, firmware->data + sent, size);
@@ -283,6 +288,9 @@ static int ath3k_load_fwfile(struct usb_
 	count -= size;
 
 	while (count) {
+		/* workaround the compatibility issue with xHCI controller*/
+		usleep_range(TIMEGAP_USEC_MIN, TIMEGAP_USEC_MAX);
+
 		size = min_t(uint, count, BULK_SIZE);
 		pipe = usb_sndbulkpipe(udev, 0x02);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_i2c_atmel.c linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_i2c_atmel.c
--- linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_i2c_atmel.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_i2c_atmel.c	2015-03-06 17:44:34.000000000 -0500
@@ -168,6 +168,10 @@ static int i2c_atmel_probe(struct i2c_cl
 
 	chip->vendor.priv = devm_kzalloc(dev, sizeof(struct priv_data),
 					 GFP_KERNEL);
+	if (!chip->vendor.priv) {
+		rc = -ENOMEM;
+		goto out_err;
+	}
 
 	/* Default timeouts */
 	chip->vendor.timeout_a = msecs_to_jiffies(TPM_I2C_SHORT_TIMEOUT);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_i2c_nuvoton.c linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_i2c_nuvoton.c
--- linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_i2c_nuvoton.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_i2c_nuvoton.c	2015-03-06 17:44:34.000000000 -0500
@@ -538,6 +538,11 @@ static int i2c_nuvoton_probe(struct i2c_
 
 	chip->vendor.priv = devm_kzalloc(dev, sizeof(struct priv_data),
 					 GFP_KERNEL);
+	if (!chip->vendor.priv) {
+		rc = -ENOMEM;
+		goto out_err;
+	}
+
 	init_waitqueue_head(&chip->vendor.read_queue);
 	init_waitqueue_head(&chip->vendor.int_queue);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_i2c_stm_st33.c linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_i2c_stm_st33.c
--- linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_i2c_stm_st33.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_i2c_stm_st33.c	2015-03-06 17:44:34.000000000 -0500
@@ -488,7 +488,7 @@ static int tpm_stm_i2c_send(struct tpm_c
 		if (burstcnt < 0)
 			return burstcnt;
 		size = min_t(int, len - i - 1, burstcnt);
-		ret = I2C_WRITE_DATA(client, TPM_DATA_FIFO, buf, size);
+		ret = I2C_WRITE_DATA(client, TPM_DATA_FIFO, buf + i, size);
 		if (ret < 0)
 			goto out_err;
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_ibmvtpm.c linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_ibmvtpm.c
--- linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_ibmvtpm.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_ibmvtpm.c	2015-03-06 17:44:34.000000000 -0500
@@ -148,7 +148,8 @@ static int tpm_ibmvtpm_send(struct tpm_c
 	crq.len = (u16)count;
 	crq.data = ibmvtpm->rtce_dma_handle;
 
-	rc = ibmvtpm_send_crq(ibmvtpm->vdev, word[0], word[1]);
+	rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(word[0]),
+			      cpu_to_be64(word[1]));
 	if (rc != H_SUCCESS) {
 		dev_err(ibmvtpm->dev, "tpm_ibmvtpm_send failed rc=%d\n", rc);
 		rc = 0;
@@ -186,7 +187,8 @@ static int ibmvtpm_crq_get_rtce_size(str
 	crq.valid = (u8)IBMVTPM_VALID_CMD;
 	crq.msg = (u8)VTPM_GET_RTCE_BUFFER_SIZE;
 
-	rc = ibmvtpm_send_crq(ibmvtpm->vdev, buf[0], buf[1]);
+	rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(buf[0]),
+			      cpu_to_be64(buf[1]));
 	if (rc != H_SUCCESS)
 		dev_err(ibmvtpm->dev,
 			"ibmvtpm_crq_get_rtce_size failed rc=%d\n", rc);
@@ -212,7 +214,8 @@ static int ibmvtpm_crq_get_version(struc
 	crq.valid = (u8)IBMVTPM_VALID_CMD;
 	crq.msg = (u8)VTPM_GET_VERSION;
 
-	rc = ibmvtpm_send_crq(ibmvtpm->vdev, buf[0], buf[1]);
+	rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(buf[0]),
+			      cpu_to_be64(buf[1]));
 	if (rc != H_SUCCESS)
 		dev_err(ibmvtpm->dev,
 			"ibmvtpm_crq_get_version failed rc=%d\n", rc);
@@ -307,6 +310,14 @@ static int tpm_ibmvtpm_remove(struct vio
 static unsigned long tpm_ibmvtpm_get_desired_dma(struct vio_dev *vdev)
 {
 	struct ibmvtpm_dev *ibmvtpm = ibmvtpm_get_data(&vdev->dev);
+
+	/* ibmvtpm initializes at probe time, so the data we are
+	* asking for may not be set yet. Estimate that 4K required
+	* for TCE-mapped buffer in addition to CRQ.
+	*/
+	if (!ibmvtpm)
+		return CRQ_RES_BUF_SIZE + PAGE_SIZE;
+
 	return CRQ_RES_BUF_SIZE + ibmvtpm->rtce_size;
 }
 
@@ -327,7 +338,8 @@ static int tpm_ibmvtpm_suspend(struct de
 	crq.valid = (u8)IBMVTPM_VALID_CMD;
 	crq.msg = (u8)VTPM_PREPARE_TO_SUSPEND;
 
-	rc = ibmvtpm_send_crq(ibmvtpm->vdev, buf[0], buf[1]);
+	rc = ibmvtpm_send_crq(ibmvtpm->vdev, cpu_to_be64(buf[0]),
+			      cpu_to_be64(buf[1]));
 	if (rc != H_SUCCESS)
 		dev_err(ibmvtpm->dev,
 			"tpm_ibmvtpm_suspend failed rc=%d\n", rc);
@@ -472,11 +484,11 @@ static void ibmvtpm_crq_process(struct i
 	case IBMVTPM_VALID_CMD:
 		switch (crq->msg) {
 		case VTPM_GET_RTCE_BUFFER_SIZE_RES:
-			if (crq->len <= 0) {
+			if (be16_to_cpu(crq->len) <= 0) {
 				dev_err(ibmvtpm->dev, "Invalid rtce size\n");
 				return;
 			}
-			ibmvtpm->rtce_size = crq->len;
+			ibmvtpm->rtce_size = be16_to_cpu(crq->len);
 			ibmvtpm->rtce_buf = kmalloc(ibmvtpm->rtce_size,
 						    GFP_KERNEL);
 			if (!ibmvtpm->rtce_buf) {
@@ -497,11 +509,11 @@ static void ibmvtpm_crq_process(struct i
 
 			return;
 		case VTPM_GET_VERSION_RES:
-			ibmvtpm->vtpm_version = crq->data;
+			ibmvtpm->vtpm_version = be32_to_cpu(crq->data);
 			return;
 		case VTPM_TPM_COMMAND_RES:
 			/* len of the data in rtce buffer */
-			ibmvtpm->res_len = crq->len;
+			ibmvtpm->res_len = be16_to_cpu(crq->len);
 			wake_up_interruptible(&ibmvtpm->wq);
 			return;
 		default:
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/char/tpm/tpm-interface.c linux-libre-3.14.35-gnu/drivers/char/tpm/tpm-interface.c
--- linux-libre-3.14.34-gnu/drivers/char/tpm/tpm-interface.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/char/tpm/tpm-interface.c	2015-03-06 17:44:34.000000000 -0500
@@ -1122,7 +1122,7 @@ struct tpm_chip *tpm_register_hardware(s
 
 	/* Make chip available */
 	spin_lock(&driver_lock);
-	list_add_rcu(&chip->list, &tpm_chip_list);
+	list_add_tail_rcu(&chip->list, &tpm_chip_list);
 	spin_unlock(&driver_lock);
 
 	return chip;
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_tis.c linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_tis.c
--- linux-libre-3.14.34-gnu/drivers/char/tpm/tpm_tis.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/char/tpm/tpm_tis.c	2015-03-06 17:44:34.000000000 -0500
@@ -75,6 +75,10 @@ enum tis_defaults {
 #define	TPM_DID_VID(l)			(0x0F00 | ((l) << 12))
 #define	TPM_RID(l)			(0x0F04 | ((l) << 12))
 
+struct priv_data {
+	bool irq_tested;
+};
+
 static LIST_HEAD(tis_chips);
 static DEFINE_MUTEX(tis_lock);
 
@@ -338,12 +342,27 @@ out_err:
 	return rc;
 }
 
+static void disable_interrupts(struct tpm_chip *chip)
+{
+	u32 intmask;
+
+	intmask =
+	    ioread32(chip->vendor.iobase +
+		     TPM_INT_ENABLE(chip->vendor.locality));
+	intmask &= ~TPM_GLOBAL_INT_ENABLE;
+	iowrite32(intmask,
+		  chip->vendor.iobase +
+		  TPM_INT_ENABLE(chip->vendor.locality));
+	free_irq(chip->vendor.irq, chip);
+	chip->vendor.irq = 0;
+}
+
 /*
  * If interrupts are used (signaled by an irq set in the vendor structure)
  * tpm.c can skip polling for the data to be available as the interrupt is
  * waited for here
  */
-static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len)
+static int tpm_tis_send_main(struct tpm_chip *chip, u8 *buf, size_t len)
 {
 	int rc;
 	u32 ordinal;
@@ -373,6 +392,30 @@ out_err:
 	return rc;
 }
 
+static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len)
+{
+	int rc, irq;
+	struct priv_data *priv = chip->vendor.priv;
+
+	if (!chip->vendor.irq || priv->irq_tested)
+		return tpm_tis_send_main(chip, buf, len);
+
+	/* Verify receipt of the expected IRQ */
+	irq = chip->vendor.irq;
+	chip->vendor.irq = 0;
+	rc = tpm_tis_send_main(chip, buf, len);
+	chip->vendor.irq = irq;
+	if (!priv->irq_tested)
+		msleep(1);
+	if (!priv->irq_tested) {
+		disable_interrupts(chip);
+		dev_err(chip->dev,
+			FW_BUG "TPM interrupt not working, polling instead\n");
+	}
+	priv->irq_tested = true;
+	return rc;
+}
+
 struct tis_vendor_timeout_override {
 	u32 did_vid;
 	unsigned long timeout_us[4];
@@ -505,6 +548,7 @@ static irqreturn_t tis_int_handler(int d
 	if (interrupt == 0)
 		return IRQ_NONE;
 
+	((struct priv_data *)chip->vendor.priv)->irq_tested = true;
 	if (interrupt & TPM_INTF_DATA_AVAIL_INT)
 		wake_up_interruptible(&chip->vendor.read_queue);
 	if (interrupt & TPM_INTF_LOCALITY_CHANGE_INT)
@@ -534,9 +578,14 @@ static int tpm_tis_init(struct device *d
 	u32 vendor, intfcaps, intmask;
 	int rc, i, irq_s, irq_e, probe;
 	struct tpm_chip *chip;
+	struct priv_data *priv;
 
+	priv = devm_kzalloc(dev, sizeof(struct priv_data), GFP_KERNEL);
+	if (priv == NULL)
+		return -ENOMEM;
 	if (!(chip = tpm_register_hardware(dev, &tpm_tis)))
 		return -ENODEV;
+	chip->vendor.priv = priv;
 
 	chip->vendor.iobase = ioremap(start, len);
 	if (!chip->vendor.iobase) {
@@ -605,19 +654,6 @@ static int tpm_tis_init(struct device *d
 	if (intfcaps & TPM_INTF_DATA_AVAIL_INT)
 		dev_dbg(dev, "\tData Avail Int Support\n");
 
-	/* get the timeouts before testing for irqs */
-	if (tpm_get_timeouts(chip)) {
-		dev_err(dev, "Could not get TPM timeouts and durations\n");
-		rc = -ENODEV;
-		goto out_err;
-	}
-
-	if (tpm_do_selftest(chip)) {
-		dev_err(dev, "TPM self test failed\n");
-		rc = -ENODEV;
-		goto out_err;
-	}
-
 	/* INTERRUPT Setup */
 	init_waitqueue_head(&chip->vendor.read_queue);
 	init_waitqueue_head(&chip->vendor.int_queue);
@@ -719,6 +755,18 @@ static int tpm_tis_init(struct device *d
 		}
 	}
 
+	if (tpm_get_timeouts(chip)) {
+		dev_err(dev, "Could not get TPM timeouts and durations\n");
+		rc = -ENODEV;
+		goto out_err;
+	}
+
+	if (tpm_do_selftest(chip)) {
+		dev_err(dev, "TPM self test failed\n");
+		rc = -ENODEV;
+		goto out_err;
+	}
+
 	INIT_LIST_HEAD(&chip->vendor.list);
 	mutex_lock(&tis_lock);
 	list_add(&chip->vendor.list, &tis_chips);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/cpufreq/cpufreq.c linux-libre-3.14.35-gnu/drivers/cpufreq/cpufreq.c
--- linux-libre-3.14.34-gnu/drivers/cpufreq/cpufreq.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/cpufreq/cpufreq.c	2015-03-06 17:44:34.000000000 -0500
@@ -1365,9 +1365,10 @@ static int __cpufreq_remove_dev_finish(s
 	unsigned long flags;
 	struct cpufreq_policy *policy;
 
-	read_lock_irqsave(&cpufreq_driver_lock, flags);
+	write_lock_irqsave(&cpufreq_driver_lock, flags);
 	policy = per_cpu(cpufreq_cpu_data, cpu);
-	read_unlock_irqrestore(&cpufreq_driver_lock, flags);
+	per_cpu(cpufreq_cpu_data, cpu) = NULL;
+	write_unlock_irqrestore(&cpufreq_driver_lock, flags);
 
 	if (!policy) {
 		pr_debug("%s: No cpu_data found\n", __func__);
@@ -1422,7 +1423,6 @@ static int __cpufreq_remove_dev_finish(s
 		}
 	}
 
-	per_cpu(cpufreq_cpu_data, cpu) = NULL;
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/cpufreq/s3c2416-cpufreq.c linux-libre-3.14.35-gnu/drivers/cpufreq/s3c2416-cpufreq.c
--- linux-libre-3.14.34-gnu/drivers/cpufreq/s3c2416-cpufreq.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/cpufreq/s3c2416-cpufreq.c	2015-03-06 17:44:34.000000000 -0500
@@ -263,7 +263,7 @@ out:
 }
 
 #ifdef CONFIG_ARM_S3C2416_CPUFREQ_VCORESCALE
-static void __init s3c2416_cpufreq_cfg_regulator(struct s3c2416_data *s3c_freq)
+static void s3c2416_cpufreq_cfg_regulator(struct s3c2416_data *s3c_freq)
 {
 	int count, v, i, found;
 	struct cpufreq_frequency_table *freq;
@@ -335,7 +335,7 @@ static struct notifier_block s3c2416_cpu
 	.notifier_call = s3c2416_cpufreq_reboot_notifier_evt,
 };
 
-static int __init s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
+static int s3c2416_cpufreq_driver_init(struct cpufreq_policy *policy)
 {
 	struct s3c2416_data *s3c_freq = &s3c2416_cpufreq;
 	struct cpufreq_frequency_table *freq;
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/cpufreq/s3c24xx-cpufreq.c linux-libre-3.14.35-gnu/drivers/cpufreq/s3c24xx-cpufreq.c
--- linux-libre-3.14.34-gnu/drivers/cpufreq/s3c24xx-cpufreq.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/cpufreq/s3c24xx-cpufreq.c	2015-03-06 17:44:34.000000000 -0500
@@ -454,7 +454,7 @@ static struct cpufreq_driver s3c24xx_dri
 };
 
 
-int __init s3c_cpufreq_register(struct s3c_cpufreq_info *info)
+int s3c_cpufreq_register(struct s3c_cpufreq_info *info)
 {
 	if (!info || !info->name) {
 		printk(KERN_ERR "%s: failed to pass valid information\n",
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/cpufreq/speedstep-lib.c linux-libre-3.14.35-gnu/drivers/cpufreq/speedstep-lib.c
--- linux-libre-3.14.34-gnu/drivers/cpufreq/speedstep-lib.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/cpufreq/speedstep-lib.c	2015-03-06 17:44:34.000000000 -0500
@@ -400,6 +400,7 @@ unsigned int speedstep_get_freqs(enum sp
 
 	pr_debug("previous speed is %u\n", prev_speed);
 
+	preempt_disable();
 	local_irq_save(flags);
 
 	/* switch to low state */
@@ -464,6 +465,8 @@ unsigned int speedstep_get_freqs(enum sp
 
 out:
 	local_irq_restore(flags);
+	preempt_enable();
+
 	return ret;
 }
 EXPORT_SYMBOL_GPL(speedstep_get_freqs);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/cpufreq/speedstep-smi.c linux-libre-3.14.35-gnu/drivers/cpufreq/speedstep-smi.c
--- linux-libre-3.14.34-gnu/drivers/cpufreq/speedstep-smi.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/cpufreq/speedstep-smi.c	2015-03-06 17:44:34.000000000 -0500
@@ -156,6 +156,7 @@ static void speedstep_set_state(unsigned
 		return;
 
 	/* Disable IRQs */
+	preempt_disable();
 	local_irq_save(flags);
 
 	command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);
@@ -166,9 +167,19 @@ static void speedstep_set_state(unsigned
 
 	do {
 		if (retry) {
+			/*
+			 * We need to enable interrupts, otherwise the blockage
+			 * won't resolve.
+			 *
+			 * We disable preemption so that other processes don't
+			 * run. If other processes were running, they could
+			 * submit more DMA requests, making the blockage worse.
+			 */
 			pr_debug("retry %u, previous result %u, waiting...\n",
 					retry, result);
+			local_irq_enable();
 			mdelay(retry * 50);
+			local_irq_disable();
 		}
 		retry++;
 		__asm__ __volatile__(
@@ -185,6 +196,7 @@ static void speedstep_set_state(unsigned
 
 	/* enable IRQs */
 	local_irq_restore(flags);
+	preempt_enable();
 
 	if (new_state == state)
 		pr_debug("change to %u MHz succeeded after %u tries "
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/edac/amd64_edac.c linux-libre-3.14.35-gnu/drivers/edac/amd64_edac.c
--- linux-libre-3.14.34-gnu/drivers/edac/amd64_edac.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/edac/amd64_edac.c	2015-03-06 17:44:34.000000000 -0500
@@ -2006,14 +2006,20 @@ static void __log_bus_error(struct mem_c
 
 static inline void decode_bus_error(int node_id, struct mce *m)
 {
-	struct mem_ctl_info *mci = mcis[node_id];
-	struct amd64_pvt *pvt = mci->pvt_info;
+	struct mem_ctl_info *mci;
+	struct amd64_pvt *pvt;
 	u8 ecc_type = (m->status >> 45) & 0x3;
 	u8 xec = XEC(m->status, 0x1f);
 	u16 ec = EC(m->status);
 	u64 sys_addr;
 	struct err_info err;
 
+	mci = edac_mc_find(node_id);
+	if (!mci)
+		return;
+
+	pvt = mci->pvt_info;
+
 	/* Bail out early if this was an 'observed' error */
 	if (PP(ec) == NBSL_PP_OBS)
 		return;
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/gpio/gpiolib-of.c linux-libre-3.14.35-gnu/drivers/gpio/gpiolib-of.c
--- linux-libre-3.14.34-gnu/drivers/gpio/gpiolib-of.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/gpio/gpiolib-of.c	2015-03-06 17:44:34.000000000 -0500
@@ -45,12 +45,13 @@ static int of_gpiochip_find_and_xlate(st
 
 	ret = gc->of_xlate(gc, &gg_data->gpiospec, gg_data->flags);
 	if (ret < 0) {
-		/* We've found the gpio chip, but the translation failed.
-		 * Return true to stop looking and return the translation
-		 * error via out_gpio
+		/* We've found a gpio chip, but the translation failed.
+		 * Store translation error in out_gpio.
+		 * Return false to keep looking, as more than one gpio chip
+		 * could be registered per of-node.
 		 */
 		gg_data->out_gpio = ERR_PTR(ret);
-		return true;
+		return false;
 	 }
 
 	gg_data->out_gpio = gpio_to_desc(ret + gc->base);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/gpio/gpio-tps65912.c linux-libre-3.14.35-gnu/drivers/gpio/gpio-tps65912.c
--- linux-libre-3.14.34-gnu/drivers/gpio/gpio-tps65912.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/gpio/gpio-tps65912.c	2015-03-06 17:44:34.000000000 -0500
@@ -26,9 +26,12 @@ struct tps65912_gpio_data {
 	struct gpio_chip gpio_chip;
 };
 
+#define to_tgd(gc) container_of(gc, struct tps65912_gpio_data, gpio_chip)
+
 static int tps65912_gpio_get(struct gpio_chip *gc, unsigned offset)
 {
-	struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio);
+	struct tps65912_gpio_data *tps65912_gpio = to_tgd(gc);
+	struct tps65912 *tps65912 = tps65912_gpio->tps65912;
 	int val;
 
 	val = tps65912_reg_read(tps65912, TPS65912_GPIO1 + offset);
@@ -42,7 +45,8 @@ static int tps65912_gpio_get(struct gpio
 static void tps65912_gpio_set(struct gpio_chip *gc, unsigned offset,
 			      int value)
 {
-	struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio);
+	struct tps65912_gpio_data *tps65912_gpio = to_tgd(gc);
+	struct tps65912 *tps65912 = tps65912_gpio->tps65912;
 
 	if (value)
 		tps65912_set_bits(tps65912, TPS65912_GPIO1 + offset,
@@ -55,7 +59,8 @@ static void tps65912_gpio_set(struct gpi
 static int tps65912_gpio_output(struct gpio_chip *gc, unsigned offset,
 				int value)
 {
-	struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio);
+	struct tps65912_gpio_data *tps65912_gpio = to_tgd(gc);
+	struct tps65912 *tps65912 = tps65912_gpio->tps65912;
 
 	/* Set the initial value */
 	tps65912_gpio_set(gc, offset, value);
@@ -66,7 +71,8 @@ static int tps65912_gpio_output(struct g
 
 static int tps65912_gpio_input(struct gpio_chip *gc, unsigned offset)
 {
-	struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio);
+	struct tps65912_gpio_data *tps65912_gpio = to_tgd(gc);
+	struct tps65912 *tps65912 = tps65912_gpio->tps65912;
 
 	return tps65912_clear_bits(tps65912, TPS65912_GPIO1 + offset,
 								GPIO_CFG_MASK);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/hid/i2c-hid/i2c-hid.c linux-libre-3.14.35-gnu/drivers/hid/i2c-hid/i2c-hid.c
--- linux-libre-3.14.34-gnu/drivers/hid/i2c-hid/i2c-hid.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/hid/i2c-hid/i2c-hid.c	2015-03-06 17:44:34.000000000 -0500
@@ -356,7 +356,10 @@ static int i2c_hid_hwreset(struct i2c_cl
 static void i2c_hid_get_input(struct i2c_hid *ihid)
 {
 	int ret, ret_size;
-	int size = ihid->bufsize;
+	int size = le16_to_cpu(ihid->hdesc.wMaxInputLength);
+
+	if (size > ihid->bufsize)
+		size = ihid->bufsize;
 
 	ret = i2c_master_recv(ihid->client, ihid->inbuf, size);
 	if (ret != size) {
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/md/raid1.c linux-libre-3.14.35-gnu/drivers/md/raid1.c
--- linux-libre-3.14.34-gnu/drivers/md/raid1.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/md/raid1.c	2015-03-06 17:44:34.000000000 -0500
@@ -561,7 +561,7 @@ static int read_balance(struct r1conf *c
 		if (test_bit(WriteMostly, &rdev->flags)) {
 			/* Don't balance among write-mostly, just
 			 * use the first as a last resort */
-			if (best_disk < 0) {
+			if (best_dist_disk < 0) {
 				if (is_badblock(rdev, this_sector, sectors,
 						&first_bad, &bad_sectors)) {
 					if (first_bad < this_sector)
@@ -570,7 +570,8 @@ static int read_balance(struct r1conf *c
 					best_good_sectors = first_bad - this_sector;
 				} else
 					best_good_sectors = sectors;
-				best_disk = disk;
+				best_dist_disk = disk;
+				best_pending_disk = disk;
 			}
 			continue;
 		}
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/md/raid5.c linux-libre-3.14.35-gnu/drivers/md/raid5.c
--- linux-libre-3.14.34-gnu/drivers/md/raid5.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/md/raid5.c	2015-03-06 17:44:34.000000000 -0500
@@ -3071,7 +3071,8 @@ static void handle_stripe_dirtying(struc
 	 * generate correct data from the parity.
 	 */
 	if (conf->max_degraded == 2 ||
-	    (recovery_cp < MaxSector && sh->sector >= recovery_cp)) {
+	    (recovery_cp < MaxSector && sh->sector >= recovery_cp &&
+	     s->failed == 0)) {
 		/* Calculate the real rcw later - for now make it
 		 * look like rcw is cheaper
 		 */
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/media/usb/dvb-usb-v2/lmedm04.c linux-libre-3.14.35-gnu/drivers/media/usb/dvb-usb-v2/lmedm04.c
--- linux-libre-3.14.34-gnu/drivers/media/usb/dvb-usb-v2/lmedm04.c	2015-02-27 01:37:58.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/media/usb/dvb-usb-v2/lmedm04.c	2015-03-07 16:55:29.000000000 -0500
@@ -350,6 +350,7 @@ static int lme2510_int_read(struct dvb_u
 {
 	struct dvb_usb_device *d = adap_to_d(adap);
 	struct lme2510_state *lme_int = adap_to_priv(adap);
+	struct usb_host_endpoint *ep;
 
 	lme_int->lme_urb = usb_alloc_urb(0, GFP_ATOMIC);
 
@@ -371,6 +372,12 @@ static int lme2510_int_read(struct dvb_u
 				adap,
 				8);
 
+	/* Quirk of pipe reporting PIPE_BULK but behaves as interrupt */
+	ep = usb_pipe_endpoint(d->udev, lme_int->lme_urb->pipe);
+
+	if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
+		lme_int->lme_urb->pipe = usb_rcvbulkpipe(d->udev, 0xa),
+
 	lme_int->lme_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
 
 	usb_submit_urb(lme_int->lme_urb, GFP_ATOMIC);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/media/usb/em28xx/em28xx-audio.c linux-libre-3.14.35-gnu/drivers/media/usb/em28xx/em28xx-audio.c
--- linux-libre-3.14.34-gnu/drivers/media/usb/em28xx/em28xx-audio.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/media/usb/em28xx/em28xx-audio.c	2015-03-06 17:44:34.000000000 -0500
@@ -814,7 +814,7 @@ static int em28xx_audio_urb_init(struct
 	if (urb_size > ep_size * npackets)
 		npackets = DIV_ROUND_UP(urb_size, ep_size);
 
-	em28xx_info("Number of URBs: %d, with %d packets and %d size",
+	em28xx_info("Number of URBs: %d, with %d packets and %d size\n",
 		    num_urb, npackets, urb_size);
 
 	/* Estimate the bytes per period */
@@ -974,7 +974,7 @@ static int em28xx_audio_fini(struct em28
 		return 0;
 	}
 
-	em28xx_info("Closing audio extension");
+	em28xx_info("Closing audio extension\n");
 
 	if (dev->adev.sndcard) {
 		snd_card_disconnect(dev->adev.sndcard);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/media/usb/em28xx/em28xx-dvb.c linux-libre-3.14.35-gnu/drivers/media/usb/em28xx/em28xx-dvb.c
--- linux-libre-3.14.34-gnu/drivers/media/usb/em28xx/em28xx-dvb.c	2015-02-27 01:39:50.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/media/usb/em28xx/em28xx-dvb.c	2015-03-07 16:57:23.000000000 -0500
@@ -1468,7 +1468,7 @@ static int em28xx_dvb_fini(struct em28xx
 		return 0;
 	}
 
-	em28xx_info("Closing DVB extension");
+	em28xx_info("Closing DVB extension\n");
 
 	if (dev->dvb) {
 		struct em28xx_dvb *dvb = dev->dvb;
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/media/usb/em28xx/em28xx-input.c linux-libre-3.14.35-gnu/drivers/media/usb/em28xx/em28xx-input.c
--- linux-libre-3.14.34-gnu/drivers/media/usb/em28xx/em28xx-input.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/media/usb/em28xx/em28xx-input.c	2015-03-06 17:44:34.000000000 -0500
@@ -810,7 +810,7 @@ static int em28xx_ir_fini(struct em28xx
 		return 0;
 	}
 
-	em28xx_info("Closing input extension");
+	em28xx_info("Closing input extension\n");
 
 	em28xx_shutdown_buttons(dev);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/media/usb/em28xx/em28xx-video.c linux-libre-3.14.35-gnu/drivers/media/usb/em28xx/em28xx-video.c
--- linux-libre-3.14.34-gnu/drivers/media/usb/em28xx/em28xx-video.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/media/usb/em28xx/em28xx-video.c	2015-03-06 17:44:34.000000000 -0500
@@ -1900,7 +1900,7 @@ static int em28xx_v4l2_fini(struct em28x
 		return 0;
 	}
 
-	em28xx_info("Closing video extension");
+	em28xx_info("Closing video extension\n");
 
 	mutex_lock(&dev->lock);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/mmc/host/sdhci-pxav3.c linux-libre-3.14.35-gnu/drivers/mmc/host/sdhci-pxav3.c
--- linux-libre-3.14.34-gnu/drivers/mmc/host/sdhci-pxav3.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/mmc/host/sdhci-pxav3.c	2015-03-06 17:44:34.000000000 -0500
@@ -201,8 +201,8 @@ static struct sdhci_pxa_platdata *pxav3_
 	if (!pdata)
 		return NULL;
 
-	of_property_read_u32(np, "mrvl,clk-delay-cycles", &clk_delay_cycles);
-	if (clk_delay_cycles > 0)
+	if (!of_property_read_u32(np, "mrvl,clk-delay-cycles",
+				  &clk_delay_cycles))
 		pdata->clk_delay_cycles = clk_delay_cycles;
 
 	return pdata;
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/net/wireless/iwlwifi/mvm/mac80211.c linux-libre-3.14.35-gnu/drivers/net/wireless/iwlwifi/mvm/mac80211.c
--- linux-libre-3.14.34-gnu/drivers/net/wireless/iwlwifi/mvm/mac80211.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/net/wireless/iwlwifi/mvm/mac80211.c	2015-03-06 17:44:34.000000000 -0500
@@ -410,9 +410,6 @@ static void iwl_mvm_cleanup_iterator(voi
 	mvmvif->uploaded = false;
 	mvmvif->ap_sta_id = IWL_MVM_STATION_COUNT;
 
-	/* does this make sense at all? */
-	mvmvif->color++;
-
 	spin_lock_bh(&mvm->time_event_lock);
 	iwl_mvm_te_clear_data(mvm, &mvmvif->time_event_data);
 	spin_unlock_bh(&mvm->time_event_lock);
@@ -597,7 +594,7 @@ static int iwl_mvm_mac_add_interface(str
 
 	ret = iwl_mvm_mac_ctxt_add(mvm, vif);
 	if (ret)
-		goto out_release;
+		goto out_remove_mac;
 
 	iwl_mvm_power_disable(mvm, vif);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/net/wireless/iwlwifi/mvm/tx.c linux-libre-3.14.35-gnu/drivers/net/wireless/iwlwifi/mvm/tx.c
--- linux-libre-3.14.34-gnu/drivers/net/wireless/iwlwifi/mvm/tx.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/net/wireless/iwlwifi/mvm/tx.c	2015-03-06 17:44:34.000000000 -0500
@@ -835,6 +835,11 @@ int iwl_mvm_rx_ba_notif(struct iwl_mvm *
 	sta_id = ba_notif->sta_id;
 	tid = ba_notif->tid;
 
+	if (WARN_ONCE(sta_id >= IWL_MVM_STATION_COUNT ||
+		      tid >= IWL_MAX_TID_COUNT,
+		      "sta_id %d tid %d", sta_id, tid))
+		return 0;
+
 	rcu_read_lock();
 
 	sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/net/wireless/iwlwifi/pcie/tx.c linux-libre-3.14.35-gnu/drivers/net/wireless/iwlwifi/pcie/tx.c
--- linux-libre-3.14.34-gnu/drivers/net/wireless/iwlwifi/pcie/tx.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/net/wireless/iwlwifi/pcie/tx.c	2015-03-06 17:44:34.000000000 -0500
@@ -729,7 +729,12 @@ void iwl_trans_pcie_tx_reset(struct iwl_
 	iwl_write_direct32(trans, FH_KW_MEM_ADDR_REG,
 			   trans_pcie->kw.dma >> 4);
 
-	iwl_pcie_tx_start(trans, trans_pcie->scd_base_addr);
+	/*
+	 * Send 0 as the scd_base_addr since the device may have be reset
+	 * while we were in WoWLAN in which case SCD_SRAM_BASE_ADDR will
+	 * contain garbage.
+	 */
+	iwl_pcie_tx_start(trans, 0);
 }
 
 /*
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/pci/pci-driver.c linux-libre-3.14.35-gnu/drivers/pci/pci-driver.c
--- linux-libre-3.14.34-gnu/drivers/pci/pci-driver.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/pci/pci-driver.c	2015-03-06 17:44:34.000000000 -0500
@@ -1324,7 +1324,7 @@ static int pci_uevent(struct device *dev
 	if (add_uevent_var(env, "PCI_SLOT_NAME=%s", pci_name(pdev)))
 		return -ENOMEM;
 
-	if (add_uevent_var(env, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x",
+	if (add_uevent_var(env, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02X",
 			   pdev->vendor, pdev->device,
 			   pdev->subsystem_vendor, pdev->subsystem_device,
 			   (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/pci/rom.c linux-libre-3.14.35-gnu/drivers/pci/rom.c
--- linux-libre-3.14.34-gnu/drivers/pci/rom.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/pci/rom.c	2015-03-06 17:44:34.000000000 -0500
@@ -69,6 +69,7 @@ size_t pci_get_rom_size(struct pci_dev *
 {
 	void __iomem *image;
 	int last_image;
+	unsigned length;
 
 	image = rom;
 	do {
@@ -91,9 +92,9 @@ size_t pci_get_rom_size(struct pci_dev *
 		if (readb(pds + 3) != 'R')
 			break;
 		last_image = readb(pds + 21) & 0x80;
-		/* this length is reliable */
-		image += readw(pds + 16) * 512;
-	} while (!last_image);
+		length = readw(pds + 16);
+		image += length * 512;
+	} while (length && !last_image);
 
 	/* never return a size larger than the PCI resource window */
 	/* there are known ROMs that get the size wrong */
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/power/88pm860x_charger.c linux-libre-3.14.35-gnu/drivers/power/88pm860x_charger.c
--- linux-libre-3.14.34-gnu/drivers/power/88pm860x_charger.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/power/88pm860x_charger.c	2015-03-06 17:44:34.000000000 -0500
@@ -711,6 +711,7 @@ static int pm860x_charger_probe(struct p
 	return 0;
 
 out_irq:
+	power_supply_unregister(&info->usb);
 	while (--i >= 0)
 		free_irq(info->irq[i], info);
 out:
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/power/bq24190_charger.c linux-libre-3.14.35-gnu/drivers/power/bq24190_charger.c
--- linux-libre-3.14.34-gnu/drivers/power/bq24190_charger.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/power/bq24190_charger.c	2015-03-06 17:44:34.000000000 -0500
@@ -929,7 +929,7 @@ static void bq24190_charger_init(struct
 	charger->properties = bq24190_charger_properties;
 	charger->num_properties = ARRAY_SIZE(bq24190_charger_properties);
 	charger->supplied_to = bq24190_charger_supplied_to;
-	charger->num_supplies = ARRAY_SIZE(bq24190_charger_supplied_to);
+	charger->num_supplicants = ARRAY_SIZE(bq24190_charger_supplied_to);
 	charger->get_property = bq24190_charger_get_property;
 	charger->set_property = bq24190_charger_set_property;
 	charger->property_is_writeable = bq24190_charger_property_is_writeable;
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/power/gpio-charger.c linux-libre-3.14.35-gnu/drivers/power/gpio-charger.c
--- linux-libre-3.14.34-gnu/drivers/power/gpio-charger.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/power/gpio-charger.c	2015-03-06 17:44:34.000000000 -0500
@@ -168,7 +168,7 @@ static int gpio_charger_suspend(struct d
 
 	if (device_may_wakeup(dev))
 		gpio_charger->wakeup_enabled =
-			enable_irq_wake(gpio_charger->irq);
+			!enable_irq_wake(gpio_charger->irq);
 
 	return 0;
 }
@@ -178,7 +178,7 @@ static int gpio_charger_resume(struct de
 	struct platform_device *pdev = to_platform_device(dev);
 	struct gpio_charger *gpio_charger = platform_get_drvdata(pdev);
 
-	if (gpio_charger->wakeup_enabled)
+	if (device_may_wakeup(dev) && gpio_charger->wakeup_enabled)
 		disable_irq_wake(gpio_charger->irq);
 	power_supply_changed(&gpio_charger->charger);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/scsi/megaraid/megaraid_sas_fusion.c linux-libre-3.14.35-gnu/drivers/scsi/megaraid/megaraid_sas_fusion.c
--- linux-libre-3.14.34-gnu/drivers/scsi/megaraid/megaraid_sas_fusion.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/scsi/megaraid/megaraid_sas_fusion.c	2015-03-06 17:44:34.000000000 -0500
@@ -92,6 +92,8 @@ megasas_enable_intr_fusion(struct megasa
 {
 	struct megasas_register_set __iomem *regs;
 	regs = instance->reg_set;
+
+	instance->mask_interrupts = 0;
 	/* For Thunderbolt/Invader also clear intr on enable */
 	writel(~0, &regs->outbound_intr_status);
 	readl(&regs->outbound_intr_status);
@@ -100,7 +102,6 @@ megasas_enable_intr_fusion(struct megasa
 
 	/* Dummy readl to force pci flush */
 	readl(&regs->outbound_intr_mask);
-	instance->mask_interrupts = 0;
 }
 
 /**
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/target/iscsi/iscsi_target_tq.c linux-libre-3.14.35-gnu/drivers/target/iscsi/iscsi_target_tq.c
--- linux-libre-3.14.34-gnu/drivers/target/iscsi/iscsi_target_tq.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/target/iscsi/iscsi_target_tq.c	2015-03-06 17:44:34.000000000 -0500
@@ -24,36 +24,22 @@
 #include "iscsi_target_tq.h"
 #include "iscsi_target.h"
 
-static LIST_HEAD(active_ts_list);
 static LIST_HEAD(inactive_ts_list);
-static DEFINE_SPINLOCK(active_ts_lock);
 static DEFINE_SPINLOCK(inactive_ts_lock);
 static DEFINE_SPINLOCK(ts_bitmap_lock);
 
-static void iscsi_add_ts_to_active_list(struct iscsi_thread_set *ts)
-{
-	spin_lock(&active_ts_lock);
-	list_add_tail(&ts->ts_list, &active_ts_list);
-	iscsit_global->active_ts++;
-	spin_unlock(&active_ts_lock);
-}
-
 static void iscsi_add_ts_to_inactive_list(struct iscsi_thread_set *ts)
 {
+	if (!list_empty(&ts->ts_list)) {
+		WARN_ON(1);
+		return;
+	}
 	spin_lock(&inactive_ts_lock);
 	list_add_tail(&ts->ts_list, &inactive_ts_list);
 	iscsit_global->inactive_ts++;
 	spin_unlock(&inactive_ts_lock);
 }
 
-static void iscsi_del_ts_from_active_list(struct iscsi_thread_set *ts)
-{
-	spin_lock(&active_ts_lock);
-	list_del(&ts->ts_list);
-	iscsit_global->active_ts--;
-	spin_unlock(&active_ts_lock);
-}
-
 static struct iscsi_thread_set *iscsi_get_ts_from_inactive_list(void)
 {
 	struct iscsi_thread_set *ts;
@@ -66,7 +52,7 @@ static struct iscsi_thread_set *iscsi_ge
 
 	ts = list_first_entry(&inactive_ts_list, struct iscsi_thread_set, ts_list);
 
-	list_del(&ts->ts_list);
+	list_del_init(&ts->ts_list);
 	iscsit_global->inactive_ts--;
 	spin_unlock(&inactive_ts_lock);
 
@@ -204,8 +190,6 @@ static void iscsi_deallocate_extra_threa
 
 void iscsi_activate_thread_set(struct iscsi_conn *conn, struct iscsi_thread_set *ts)
 {
-	iscsi_add_ts_to_active_list(ts);
-
 	spin_lock_bh(&ts->ts_state_lock);
 	conn->thread_set = ts;
 	ts->conn = conn;
@@ -397,7 +381,6 @@ struct iscsi_conn *iscsi_rx_thread_pre_h
 
 	if (ts->delay_inactive && (--ts->thread_count == 0)) {
 		spin_unlock_bh(&ts->ts_state_lock);
-		iscsi_del_ts_from_active_list(ts);
 
 		if (!iscsit_global->in_shutdown)
 			iscsi_deallocate_extra_thread_sets();
@@ -452,7 +435,6 @@ struct iscsi_conn *iscsi_tx_thread_pre_h
 
 	if (ts->delay_inactive && (--ts->thread_count == 0)) {
 		spin_unlock_bh(&ts->ts_state_lock);
-		iscsi_del_ts_from_active_list(ts);
 
 		if (!iscsit_global->in_shutdown)
 			iscsi_deallocate_extra_thread_sets();
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/tty/pty.c linux-libre-3.14.35-gnu/drivers/tty/pty.c
--- linux-libre-3.14.34-gnu/drivers/tty/pty.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/tty/pty.c	2015-03-06 17:44:34.000000000 -0500
@@ -209,6 +209,9 @@ static int pty_signal(struct tty_struct
 	unsigned long flags;
 	struct pid *pgrp;
 
+	if (sig != SIGINT && sig != SIGQUIT && sig != SIGTSTP)
+		return -EINVAL;
+
 	if (tty->link) {
 		spin_lock_irqsave(&tty->link->ctrl_lock, flags);
 		pgrp = get_pid(tty->link->pgrp);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/tty/serial/atmel_serial.c linux-libre-3.14.35-gnu/drivers/tty/serial/atmel_serial.c
--- linux-libre-3.14.34-gnu/drivers/tty/serial/atmel_serial.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/tty/serial/atmel_serial.c	2015-03-06 17:44:34.000000000 -0500
@@ -2392,7 +2392,7 @@ static int atmel_serial_probe(struct pla
 
 	ret = atmel_init_port(port, pdev);
 	if (ret)
-		goto err;
+		goto err_clear_bit;
 
 	if (!atmel_use_pdc_rx(&port->uart)) {
 		ret = -ENOMEM;
@@ -2441,6 +2441,8 @@ err_alloc_ring:
 		clk_put(port->clk);
 		port->clk = NULL;
 	}
+err_clear_bit:
+	clear_bit(port->uart.line, atmel_ports_in_use);
 err:
 	return ret;
 }
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/tty/vt/vt.c linux-libre-3.14.35-gnu/drivers/tty/vt/vt.c
--- linux-libre-3.14.34-gnu/drivers/tty/vt/vt.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/tty/vt/vt.c	2015-03-06 17:44:34.000000000 -0500
@@ -498,6 +498,7 @@ void invert_screen(struct vc_data *vc, i
 #endif
 	if (DO_UPDATE(vc))
 		do_update_region(vc, (unsigned long) p, count);
+	notify_update(vc);
 }
 
 /* used by selection: complement pointer position */
@@ -514,6 +515,7 @@ void complement_pos(struct vc_data *vc,
 		scr_writew(old, screenpos(vc, old_offset, 1));
 		if (DO_UPDATE(vc))
 			vc->vc_sw->con_putc(vc, old, oldy, oldx);
+		notify_update(vc);
 	}
 
 	old_offset = offset;
@@ -531,8 +533,8 @@ void complement_pos(struct vc_data *vc,
 			oldy = (offset >> 1) / vc->vc_cols;
 			vc->vc_sw->con_putc(vc, new, oldy, oldx);
 		}
+		notify_update(vc);
 	}
-
 }
 
 static void insert_char(struct vc_data *vc, unsigned int nr)
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/usb/core/buffer.c linux-libre-3.14.35-gnu/drivers/usb/core/buffer.c
--- linux-libre-3.14.34-gnu/drivers/usb/core/buffer.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/usb/core/buffer.c	2015-03-06 17:44:34.000000000 -0500
@@ -22,17 +22,25 @@
  */
 
 /* FIXME tune these based on pool statistics ... */
-static const size_t	pool_max[HCD_BUFFER_POOLS] = {
-	/* platforms without dma-friendly caches might need to
-	 * prevent cacheline sharing...
-	 */
-	32,
-	128,
-	512,
-	PAGE_SIZE / 2
-	/* bigger --> allocate pages */
+static size_t pool_max[HCD_BUFFER_POOLS] = {
+	32, 128, 512, 2048,
 };
 
+void __init usb_init_pool_max(void)
+{
+	/*
+	 * The pool_max values must never be smaller than
+	 * ARCH_KMALLOC_MINALIGN.
+	 */
+	if (ARCH_KMALLOC_MINALIGN <= 32)
+		;			/* Original value is okay */
+	else if (ARCH_KMALLOC_MINALIGN <= 64)
+		pool_max[0] = 64;
+	else if (ARCH_KMALLOC_MINALIGN <= 128)
+		pool_max[0] = 0;	/* Don't use this pool */
+	else
+		BUILD_BUG();		/* We don't allow this */
+}
 
 /* SETUP primitives */
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/usb/core/hcd.c linux-libre-3.14.35-gnu/drivers/usb/core/hcd.c
--- linux-libre-3.14.34-gnu/drivers/usb/core/hcd.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/usb/core/hcd.c	2015-03-06 17:44:34.000000000 -0500
@@ -1617,6 +1617,7 @@ static int unlink1(struct usb_hcd *hcd,
 int usb_hcd_unlink_urb (struct urb *urb, int status)
 {
 	struct usb_hcd		*hcd;
+	struct usb_device	*udev = urb->dev;
 	int			retval = -EIDRM;
 	unsigned long		flags;
 
@@ -1628,20 +1629,19 @@ int usb_hcd_unlink_urb (struct urb *urb,
 	spin_lock_irqsave(&hcd_urb_unlink_lock, flags);
 	if (atomic_read(&urb->use_count) > 0) {
 		retval = 0;
-		usb_get_dev(urb->dev);
+		usb_get_dev(udev);
 	}
 	spin_unlock_irqrestore(&hcd_urb_unlink_lock, flags);
 	if (retval == 0) {
 		hcd = bus_to_hcd(urb->dev->bus);
 		retval = unlink1(hcd, urb, status);
-		usb_put_dev(urb->dev);
+		if (retval == 0)
+			retval = -EINPROGRESS;
+		else if (retval != -EIDRM && retval != -EBUSY)
+			dev_dbg(&udev->dev, "hcd_unlink_urb %p fail %d\n",
+					urb, retval);
+		usb_put_dev(udev);
 	}
-
-	if (retval == 0)
-		retval = -EINPROGRESS;
-	else if (retval != -EIDRM && retval != -EBUSY)
-		dev_dbg(&urb->dev->dev, "hcd_unlink_urb %p fail %d\n",
-				urb, retval);
 	return retval;
 }
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/usb/core/usb.c linux-libre-3.14.35-gnu/drivers/usb/core/usb.c
--- linux-libre-3.14.34-gnu/drivers/usb/core/usb.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/usb/core/usb.c	2015-03-06 17:44:34.000000000 -0500
@@ -1050,6 +1050,7 @@ static int __init usb_init(void)
 		pr_info("%s: USB support disabled\n", usbcore_name);
 		return 0;
 	}
+	usb_init_pool_max();
 
 	retval = usb_debugfs_init();
 	if (retval)
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/usb/serial/cp210x.c linux-libre-3.14.35-gnu/drivers/usb/serial/cp210x.c
--- linux-libre-3.14.34-gnu/drivers/usb/serial/cp210x.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/usb/serial/cp210x.c	2015-03-06 17:44:34.000000000 -0500
@@ -56,6 +56,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x0846, 0x1100) }, /* NetGear Managed Switch M4100 series, M5300 series, M7100 series */
 	{ USB_DEVICE(0x08e6, 0x5501) }, /* Gemalto Prox-PU/CU contactless smartcard reader */
 	{ USB_DEVICE(0x08FD, 0x000A) }, /* Digianswer A/S , ZigBee/802.15.4 MAC Device */
+	{ USB_DEVICE(0x0908, 0x01FF) }, /* Siemens RUGGEDCOM USB Serial Console */
 	{ USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */
 	{ USB_DEVICE(0x0BED, 0x1101) }, /* MEI series 2000 Combo Acceptor */
 	{ USB_DEVICE(0x0FCF, 0x1003) }, /* Dynastream ANT development board */
diff -druNp --no-dereference linux-libre-3.14.34-gnu/drivers/xen/manage.c linux-libre-3.14.35-gnu/drivers/xen/manage.c
--- linux-libre-3.14.34-gnu/drivers/xen/manage.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/drivers/xen/manage.c	2015-03-06 17:44:34.000000000 -0500
@@ -113,10 +113,16 @@ static void do_suspend(void)
 
 	err = freeze_processes();
 	if (err) {
-		pr_err("%s: freeze failed %d\n", __func__, err);
+		pr_err("%s: freeze processes failed %d\n", __func__, err);
 		goto out;
 	}
 
+	err = freeze_kernel_threads();
+	if (err) {
+		pr_err("%s: freeze kernel threads failed %d\n", __func__, err);
+		goto out_thaw;
+	}
+
 	err = dpm_suspend_start(PMSG_FREEZE);
 	if (err) {
 		pr_err("%s: dpm_suspend_start %d\n", __func__, err);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/binfmt_elf.c linux-libre-3.14.35-gnu/fs/binfmt_elf.c
--- linux-libre-3.14.34-gnu/fs/binfmt_elf.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/binfmt_elf.c	2015-03-06 17:44:34.000000000 -0500
@@ -549,11 +549,12 @@ out:
 
 static unsigned long randomize_stack_top(unsigned long stack_top)
 {
-	unsigned int random_variable = 0;
+	unsigned long random_variable = 0;
 
 	if ((current->flags & PF_RANDOMIZE) &&
 		!(current->personality & ADDR_NO_RANDOMIZE)) {
-		random_variable = get_random_int() & STACK_RND_MASK;
+		random_variable = (unsigned long) get_random_int();
+		random_variable &= STACK_RND_MASK;
 		random_variable <<= PAGE_SHIFT;
 	}
 #ifdef CONFIG_STACK_GROWSUP
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/btrfs/ctree.c linux-libre-3.14.35-gnu/fs/btrfs/ctree.c
--- linux-libre-3.14.34-gnu/fs/btrfs/ctree.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/btrfs/ctree.c	2015-03-06 17:44:34.000000000 -0500
@@ -2655,32 +2655,23 @@ static int key_search(struct extent_buff
 	return 0;
 }
 
-int btrfs_find_item(struct btrfs_root *fs_root, struct btrfs_path *found_path,
+int btrfs_find_item(struct btrfs_root *fs_root, struct btrfs_path *path,
 		u64 iobjectid, u64 ioff, u8 key_type,
 		struct btrfs_key *found_key)
 {
 	int ret;
 	struct btrfs_key key;
 	struct extent_buffer *eb;
-	struct btrfs_path *path;
+
+	ASSERT(path);
 
 	key.type = key_type;
 	key.objectid = iobjectid;
 	key.offset = ioff;
 
-	if (found_path == NULL) {
-		path = btrfs_alloc_path();
-		if (!path)
-			return -ENOMEM;
-	} else
-		path = found_path;
-
 	ret = btrfs_search_slot(NULL, fs_root, &key, path, 0, 0);
-	if ((ret < 0) || (found_key == NULL)) {
-		if (path != found_path)
-			btrfs_free_path(path);
+	if ((ret < 0) || (found_key == NULL))
 		return ret;
-	}
 
 	eb = path->nodes[0];
 	if (ret && path->slots[0] >= btrfs_header_nritems(eb)) {
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/btrfs/disk-io.c linux-libre-3.14.35-gnu/fs/btrfs/disk-io.c
--- linux-libre-3.14.34-gnu/fs/btrfs/disk-io.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/btrfs/disk-io.c	2015-03-06 17:44:34.000000000 -0500
@@ -1560,6 +1560,7 @@ struct btrfs_root *btrfs_get_fs_root(str
 				     bool check_ref)
 {
 	struct btrfs_root *root;
+	struct btrfs_path *path;
 	int ret;
 
 	if (location->objectid == BTRFS_ROOT_TREE_OBJECTID)
@@ -1599,8 +1600,14 @@ again:
 	if (ret)
 		goto fail;
 
-	ret = btrfs_find_item(fs_info->tree_root, NULL, BTRFS_ORPHAN_OBJECTID,
+	path = btrfs_alloc_path();
+	if (!path) {
+		ret = -ENOMEM;
+		goto fail;
+	}
+	ret = btrfs_find_item(fs_info->tree_root, path, BTRFS_ORPHAN_OBJECTID,
 			location->objectid, BTRFS_ORPHAN_ITEM_KEY, NULL);
+	btrfs_free_path(path);
 	if (ret < 0)
 		goto fail;
 	if (ret == 0)
@@ -2411,7 +2418,7 @@ int open_ctree(struct super_block *sb,
 		features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO;
 
 	if (features & BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA)
-		printk(KERN_ERR "BTRFS: has skinny extents\n");
+		printk(KERN_INFO "BTRFS: has skinny extents\n");
 
 	/*
 	 * flag our filesystem as having big metadata blocks if
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/btrfs/tree-log.c linux-libre-3.14.35-gnu/fs/btrfs/tree-log.c
--- linux-libre-3.14.34-gnu/fs/btrfs/tree-log.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/btrfs/tree-log.c	2015-03-06 17:44:34.000000000 -0500
@@ -1238,10 +1238,19 @@ static int insert_orphan_item(struct btr
 			      struct btrfs_root *root, u64 offset)
 {
 	int ret;
-	ret = btrfs_find_item(root, NULL, BTRFS_ORPHAN_OBJECTID,
+	struct btrfs_path *path;
+
+	path = btrfs_alloc_path();
+	if (!path)
+		return -ENOMEM;
+
+	ret = btrfs_find_item(root, path, BTRFS_ORPHAN_OBJECTID,
 			offset, BTRFS_ORPHAN_ITEM_KEY, NULL);
 	if (ret > 0)
 		ret = btrfs_insert_orphan_item(trans, root, offset);
+
+	btrfs_free_path(path);
+
 	return ret;
 }
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/jffs2/scan.c linux-libre-3.14.35-gnu/fs/jffs2/scan.c
--- linux-libre-3.14.34-gnu/fs/jffs2/scan.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/jffs2/scan.c	2015-03-06 17:44:34.000000000 -0500
@@ -510,6 +510,10 @@ static int jffs2_scan_eraseblock (struct
 				sumlen = c->sector_size - je32_to_cpu(sm->offset);
 				sumptr = buf + buf_size - sumlen;
 
+				/* sm->offset maybe wrong but MAGIC maybe right */
+				if (sumlen > c->sector_size)
+					goto full_scan;
+
 				/* Now, make sure the summary itself is available */
 				if (sumlen > buf_size) {
 					/* Need to kmalloc for this. */
@@ -544,6 +548,7 @@ static int jffs2_scan_eraseblock (struct
 		}
 	}
 
+full_scan:
 	buf_ofs = jeb->offset;
 
 	if (!buf_size) {
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/nfs/callback.c linux-libre-3.14.35-gnu/fs/nfs/callback.c
--- linux-libre-3.14.34-gnu/fs/nfs/callback.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/nfs/callback.c	2015-03-06 17:44:34.000000000 -0500
@@ -128,22 +128,24 @@ nfs41_callback_svc(void *vrqstp)
 		if (try_to_freeze())
 			continue;
 
-		prepare_to_wait(&serv->sv_cb_waitq, &wq, TASK_INTERRUPTIBLE);
+		prepare_to_wait(&serv->sv_cb_waitq, &wq, TASK_UNINTERRUPTIBLE);
 		spin_lock_bh(&serv->sv_cb_lock);
 		if (!list_empty(&serv->sv_cb_list)) {
 			req = list_first_entry(&serv->sv_cb_list,
 					struct rpc_rqst, rq_bc_list);
 			list_del(&req->rq_bc_list);
 			spin_unlock_bh(&serv->sv_cb_lock);
+			finish_wait(&serv->sv_cb_waitq, &wq);
 			dprintk("Invoking bc_svc_process()\n");
 			error = bc_svc_process(serv, req, rqstp);
 			dprintk("bc_svc_process() returned w/ error code= %d\n",
 				error);
 		} else {
 			spin_unlock_bh(&serv->sv_cb_lock);
-			schedule();
+			/* schedule_timeout to game the hung task watchdog */
+			schedule_timeout(60 * HZ);
+			finish_wait(&serv->sv_cb_waitq, &wq);
 		}
-		finish_wait(&serv->sv_cb_waitq, &wq);
 	}
 	return 0;
 }
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/nfs/callback_xdr.c linux-libre-3.14.35-gnu/fs/nfs/callback_xdr.c
--- linux-libre-3.14.34-gnu/fs/nfs/callback_xdr.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/nfs/callback_xdr.c	2015-03-06 17:44:34.000000000 -0500
@@ -464,8 +464,10 @@ static __be32 decode_cb_sequence_args(st
 
 		for (i = 0; i < args->csa_nrclists; i++) {
 			status = decode_rc_list(xdr, &args->csa_rclists[i]);
-			if (status)
+			if (status) {
+				args->csa_nrclists = i;
 				goto out_free;
+			}
 		}
 	}
 	status = 0;
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/xfs/xfs_buf_item.c linux-libre-3.14.35-gnu/fs/xfs/xfs_buf_item.c
--- linux-libre-3.14.34-gnu/fs/xfs/xfs_buf_item.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/xfs/xfs_buf_item.c	2015-03-06 17:44:34.000000000 -0500
@@ -319,6 +319,10 @@ xfs_buf_item_format(
 	ASSERT(atomic_read(&bip->bli_refcount) > 0);
 	ASSERT((bip->bli_flags & XFS_BLI_LOGGED) ||
 	       (bip->bli_flags & XFS_BLI_STALE));
+	ASSERT((bip->bli_flags & XFS_BLI_STALE) ||
+	       (xfs_blft_from_flags(&bip->__bli_format) > XFS_BLFT_UNKNOWN_BUF
+	        && xfs_blft_from_flags(&bip->__bli_format) < XFS_BLFT_MAX_BUF));
+
 
 	/*
 	 * If it is an inode buffer, transfer the in-memory state to the
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/xfs/xfs_inode.c linux-libre-3.14.35-gnu/fs/xfs/xfs_inode.c
--- linux-libre-3.14.34-gnu/fs/xfs/xfs_inode.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/xfs/xfs_inode.c	2015-03-06 17:44:34.000000000 -0500
@@ -1946,6 +1946,7 @@ xfs_iunlink(
 	agi->agi_unlinked[bucket_index] = cpu_to_be32(agino);
 	offset = offsetof(xfs_agi_t, agi_unlinked) +
 		(sizeof(xfs_agino_t) * bucket_index);
+	xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF);
 	xfs_trans_log_buf(tp, agibp, offset,
 			  (offset + sizeof(xfs_agino_t) - 1));
 	return 0;
@@ -2037,6 +2038,7 @@ xfs_iunlink_remove(
 		agi->agi_unlinked[bucket_index] = cpu_to_be32(next_agino);
 		offset = offsetof(xfs_agi_t, agi_unlinked) +
 			(sizeof(xfs_agino_t) * bucket_index);
+		xfs_trans_buf_set_type(tp, agibp, XFS_BLFT_AGI_BUF);
 		xfs_trans_log_buf(tp, agibp, offset,
 				  (offset + sizeof(xfs_agino_t) - 1));
 	} else {
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/xfs/xfs_qm.c linux-libre-3.14.35-gnu/fs/xfs/xfs_qm.c
--- linux-libre-3.14.34-gnu/fs/xfs/xfs_qm.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/xfs/xfs_qm.c	2015-03-06 17:44:34.000000000 -0500
@@ -1108,6 +1108,11 @@ xfs_qm_reset_dqcounts(
 		 */
 		xfs_dqcheck(mp, ddq, id+j, type, XFS_QMOPT_DQREPAIR,
 			    "xfs_quotacheck");
+		/*
+		 * Reset type in case we are reusing group quota file for
+		 * project quotas or vice versa
+		 */
+		ddq->d_flags = type;
 		ddq->d_bcount = 0;
 		ddq->d_icount = 0;
 		ddq->d_rtbcount = 0;
diff -druNp --no-dereference linux-libre-3.14.34-gnu/fs/xfs/xfs_trans.c linux-libre-3.14.35-gnu/fs/xfs/xfs_trans.c
--- linux-libre-3.14.34-gnu/fs/xfs/xfs_trans.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/fs/xfs/xfs_trans.c	2015-03-06 17:44:34.000000000 -0500
@@ -474,6 +474,7 @@ xfs_trans_apply_sb_deltas(
 		whole = 1;
 	}
 
+	xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SB_BUF);
 	if (whole)
 		/*
 		 * Log the whole thing, the fields are noncontiguous.
diff -druNp --no-dereference linux-libre-3.14.34-gnu/include/linux/fsnotify.h linux-libre-3.14.35-gnu/include/linux/fsnotify.h
--- linux-libre-3.14.34-gnu/include/linux/fsnotify.h	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/include/linux/fsnotify.h	2015-03-06 17:44:34.000000000 -0500
@@ -101,8 +101,10 @@ static inline void fsnotify_move(struct
 		new_dir_mask |= FS_ISDIR;
 	}
 
-	fsnotify(old_dir, old_dir_mask, old_dir, FSNOTIFY_EVENT_INODE, old_name, fs_cookie);
-	fsnotify(new_dir, new_dir_mask, new_dir, FSNOTIFY_EVENT_INODE, new_name, fs_cookie);
+	fsnotify(old_dir, old_dir_mask, source, FSNOTIFY_EVENT_INODE, old_name,
+		 fs_cookie);
+	fsnotify(new_dir, new_dir_mask, source, FSNOTIFY_EVENT_INODE, new_name,
+		 fs_cookie);
 
 	if (target)
 		fsnotify_link_count(target);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/include/linux/usb/hcd.h linux-libre-3.14.35-gnu/include/linux/usb/hcd.h
--- linux-libre-3.14.34-gnu/include/linux/usb/hcd.h	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/include/linux/usb/hcd.h	2015-03-06 17:44:34.000000000 -0500
@@ -447,6 +447,7 @@ extern const struct dev_pm_ops usb_hcd_p
 #endif /* CONFIG_PCI */
 
 /* pci-ish (pdev null is ok) buffer alloc/mapping support */
+void usb_init_pool_max(void);
 int hcd_buffer_create(struct usb_hcd *hcd);
 void hcd_buffer_destroy(struct usb_hcd *hcd);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/kernel/debug/kdb/kdb_main.c linux-libre-3.14.35-gnu/kernel/debug/kdb/kdb_main.c
--- linux-libre-3.14.34-gnu/kernel/debug/kdb/kdb_main.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/kernel/debug/kdb/kdb_main.c	2015-03-06 17:44:34.000000000 -0500
@@ -2535,7 +2535,7 @@ static int kdb_summary(int argc, const c
 #define K(x) ((x) << (PAGE_SHIFT - 10))
 	kdb_printf("\nMemTotal:       %8lu kB\nMemFree:        %8lu kB\n"
 		   "Buffers:        %8lu kB\n",
-		   val.totalram, val.freeram, val.bufferram);
+		   K(val.totalram), K(val.freeram), K(val.bufferram));
 	return 0;
 }
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/kernel/time/ntp.c linux-libre-3.14.35-gnu/kernel/time/ntp.c
--- linux-libre-3.14.34-gnu/kernel/time/ntp.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/kernel/time/ntp.c	2015-03-06 17:44:34.000000000 -0500
@@ -631,10 +631,14 @@ int ntp_validate_timex(struct timex *txc
 	if ((txc->modes & ADJ_SETOFFSET) && (!capable(CAP_SYS_TIME)))
 		return -EPERM;
 
-	if (txc->modes & ADJ_FREQUENCY) {
-		if (LONG_MIN / PPM_SCALE > txc->freq)
+	/*
+	 * Check for potential multiplication overflows that can
+	 * only happen on 64-bit systems:
+	 */
+	if ((txc->modes & ADJ_FREQUENCY) && (BITS_PER_LONG == 64)) {
+		if (LLONG_MIN / PPM_SCALE > txc->freq)
 			return -EINVAL;
-		if (LONG_MAX / PPM_SCALE < txc->freq)
+		if (LLONG_MAX / PPM_SCALE < txc->freq)
 			return -EINVAL;
 	}
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/kernel/trace/trace.c linux-libre-3.14.35-gnu/kernel/trace/trace.c
--- linux-libre-3.14.34-gnu/kernel/trace/trace.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/kernel/trace/trace.c	2015-03-06 17:44:34.000000000 -0500
@@ -4694,7 +4694,7 @@ tracing_mark_write(struct file *filp, co
 	*fpos += written;
 
  out_unlock:
-	for (i = 0; i < nr_pages; i++){
+	for (i = nr_pages - 1; i >= 0; i--) {
 		kunmap_atomic(map_page[i]);
 		put_page(pages[i]);
 	}
diff -druNp --no-dereference linux-libre-3.14.34-gnu/Makefile linux-libre-3.14.35-gnu/Makefile
--- linux-libre-3.14.34-gnu/Makefile	2015-02-27 01:34:29.000000000 -0500
+++ linux-libre-3.14.35-gnu/Makefile	2015-03-07 16:52:24.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 14
-SUBLEVEL = 34
+SUBLEVEL = 35
 EXTRAVERSION =-gnu
 NAME = Remembering Coco
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/mm/hugetlb.c linux-libre-3.14.35-gnu/mm/hugetlb.c
--- linux-libre-3.14.34-gnu/mm/hugetlb.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/mm/hugetlb.c	2015-03-06 17:44:34.000000000 -0500
@@ -3456,6 +3456,8 @@ follow_huge_pmd(struct mm_struct *mm, un
 {
 	struct page *page;
 
+	if (!pmd_present(*pmd))
+		return NULL;
 	page = pte_page(*(pte_t *)pmd);
 	if (page)
 		page += ((address & ~PMD_MASK) >> PAGE_SHIFT);
diff -druNp --no-dereference linux-libre-3.14.34-gnu/net/ceph/osd_client.c linux-libre-3.14.35-gnu/net/ceph/osd_client.c
--- linux-libre-3.14.34-gnu/net/ceph/osd_client.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/net/ceph/osd_client.c	2015-03-06 17:44:34.000000000 -0500
@@ -977,12 +977,24 @@ static void put_osd(struct ceph_osd *osd
  */
 static void __remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd)
 {
-	dout("__remove_osd %p\n", osd);
-	BUG_ON(!list_empty(&osd->o_requests));
-	rb_erase(&osd->o_node, &osdc->osds);
+	dout("%s %p osd%d\n", __func__, osd, osd->o_osd);
+	WARN_ON(!list_empty(&osd->o_requests));
+	WARN_ON(!list_empty(&osd->o_linger_requests));
+
 	list_del_init(&osd->o_osd_lru);
-	ceph_con_close(&osd->o_con);
-	put_osd(osd);
+	rb_erase(&osd->o_node, &osdc->osds);
+	RB_CLEAR_NODE(&osd->o_node);
+}
+
+static void remove_osd(struct ceph_osd_client *osdc, struct ceph_osd *osd)
+{
+	dout("%s %p osd%d\n", __func__, osd, osd->o_osd);
+
+	if (!RB_EMPTY_NODE(&osd->o_node)) {
+		ceph_con_close(&osd->o_con);
+		__remove_osd(osdc, osd);
+		put_osd(osd);
+	}
 }
 
 static void remove_all_osds(struct ceph_osd_client *osdc)
@@ -992,7 +1004,7 @@ static void remove_all_osds(struct ceph_
 	while (!RB_EMPTY_ROOT(&osdc->osds)) {
 		struct ceph_osd *osd = rb_entry(rb_first(&osdc->osds),
 						struct ceph_osd, o_node);
-		__remove_osd(osdc, osd);
+		remove_osd(osdc, osd);
 	}
 	mutex_unlock(&osdc->request_mutex);
 }
@@ -1022,7 +1034,7 @@ static void remove_old_osds(struct ceph_
 	list_for_each_entry_safe(osd, nosd, &osdc->osd_lru, o_osd_lru) {
 		if (time_before(jiffies, osd->lru_ttl))
 			break;
-		__remove_osd(osdc, osd);
+		remove_osd(osdc, osd);
 	}
 	mutex_unlock(&osdc->request_mutex);
 }
@@ -1037,8 +1049,7 @@ static int __reset_osd(struct ceph_osd_c
 	dout("__reset_osd %p osd%d\n", osd, osd->o_osd);
 	if (list_empty(&osd->o_requests) &&
 	    list_empty(&osd->o_linger_requests)) {
-		__remove_osd(osdc, osd);
-
+		remove_osd(osdc, osd);
 		return -ENODEV;
 	}
 
@@ -1840,6 +1851,7 @@ static void reset_changed_osds(struct ce
 {
 	struct rb_node *p, *n;
 
+	dout("%s %p\n", __func__, osdc);
 	for (p = rb_first(&osdc->osds); p; p = n) {
 		struct ceph_osd *osd = rb_entry(p, struct ceph_osd, o_node);
 
diff -druNp --no-dereference linux-libre-3.14.34-gnu/sound/pci/riptide/riptide.c linux-libre-3.14.35-gnu/sound/pci/riptide/riptide.c
--- linux-libre-3.14.34-gnu/sound/pci/riptide/riptide.c	2015-02-27 01:50:34.000000000 -0500
+++ linux-libre-3.14.35-gnu/sound/pci/riptide/riptide.c	2015-03-07 17:08:00.000000000 -0500
@@ -2032,32 +2032,43 @@ snd_riptide_joystick_probe(struct pci_de
 {
 	static int dev;
 	struct gameport *gameport;
+	int ret;
 
 	if (dev >= SNDRV_CARDS)
 		return -ENODEV;
+
 	if (!enable[dev]) {
-		dev++;
-		return -ENOENT;
+		ret = -ENOENT;
+		goto inc_dev;
 	}
 
-	if (!joystick_port[dev++])
-		return 0;
+	if (!joystick_port[dev]) {
+		ret = 0;
+		goto inc_dev;
+	}
 
 	gameport = gameport_allocate_port();
-	if (!gameport)
-		return -ENOMEM;
+	if (!gameport) {
+		ret = -ENOMEM;
+		goto inc_dev;
+	}
 	if (!request_region(joystick_port[dev], 8, "Riptide gameport")) {
 		snd_printk(KERN_WARNING
 			   "Riptide: cannot grab gameport 0x%x\n",
 			   joystick_port[dev]);
 		gameport_free_port(gameport);
-		return -EBUSY;
+		ret = -EBUSY;
+		goto inc_dev;
 	}
 
 	gameport->io = joystick_port[dev];
 	gameport_register_port(gameport);
 	pci_set_drvdata(pci, gameport);
-	return 0;
+
+	ret = 0;
+inc_dev:
+	dev++;
+	return ret;
 }
 
 static void snd_riptide_joystick_remove(struct pci_dev *pci)
diff -druNp --no-dereference linux-libre-3.14.34-gnu/sound/pci/rme9652/hdspm.c linux-libre-3.14.35-gnu/sound/pci/rme9652/hdspm.c
--- linux-libre-3.14.34-gnu/sound/pci/rme9652/hdspm.c	2015-02-26 20:50:27.000000000 -0500
+++ linux-libre-3.14.35-gnu/sound/pci/rme9652/hdspm.c	2015-03-06 17:44:34.000000000 -0500
@@ -6102,6 +6102,9 @@ static int snd_hdspm_playback_open(struc
 		snd_pcm_hw_constraint_minmax(runtime,
 					     SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
 					     64, 8192);
+		snd_pcm_hw_constraint_minmax(runtime,
+					     SNDRV_PCM_HW_PARAM_PERIODS,
+					     2, 2);
 		break;
 	}
 
@@ -6176,6 +6179,9 @@ static int snd_hdspm_capture_open(struct
 		snd_pcm_hw_constraint_minmax(runtime,
 					     SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
 					     64, 8192);
+		snd_pcm_hw_constraint_minmax(runtime,
+					     SNDRV_PCM_HW_PARAM_PERIODS,
+					     2, 2);
 		break;
 	}
 
