diff -druNp --no-dereference linux-libre-3.4.96-gnu1/arch/mips/kernel/irq-msc01.c linux-libre-3.4.97-gnu1/arch/mips/kernel/irq-msc01.c
--- linux-libre-3.4.96-gnu1/arch/mips/kernel/irq-msc01.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/arch/mips/kernel/irq-msc01.c	2014-07-06 21:50:29.000000000 -0400
@@ -131,7 +131,7 @@ void __init init_msc_irqs(unsigned long
 
 	board_bind_eic_interrupt = &msc_bind_eic_interrupt;
 
-	for (; nirq >= 0; nirq--, imp++) {
+	for (; nirq > 0; nirq--, imp++) {
 		int n = imp->im_irq;
 
 		switch (imp->im_type) {
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/arch/powerpc/kernel/time.c linux-libre-3.4.97-gnu1/arch/powerpc/kernel/time.c
--- linux-libre-3.4.96-gnu1/arch/powerpc/kernel/time.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/arch/powerpc/kernel/time.c	2014-07-06 21:50:29.000000000 -0400
@@ -496,7 +496,7 @@ void timer_interrupt(struct pt_regs * re
 
 	__get_cpu_var(irq_stat).timer_irqs++;
 
-#if defined(CONFIG_PPC32) && defined(CONFIG_PMAC)
+#if defined(CONFIG_PPC32) && defined(CONFIG_PPC_PMAC)
 	if (atomic_read(&ppc_n_lost_interrupts) != 0)
 		do_IRQ(regs);
 #endif
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/arch/powerpc/lib/sstep.c linux-libre-3.4.97-gnu1/arch/powerpc/lib/sstep.c
--- linux-libre-3.4.96-gnu1/arch/powerpc/lib/sstep.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/arch/powerpc/lib/sstep.c	2014-07-06 21:50:29.000000000 -0400
@@ -1395,7 +1395,7 @@ int __kprobes emulate_step(struct pt_reg
 				regs->gpr[rd] = byterev_4(val);
 			goto ldst_done;
 
-#ifdef CONFIG_PPC_CPU
+#ifdef CONFIG_PPC_FPU
 		case 535:	/* lfsx */
 		case 567:	/* lfsux */
 			if (!(regs->msr & MSR_FP))
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/arch/powerpc/platforms/pseries/eeh_pseries.c linux-libre-3.4.97-gnu1/arch/powerpc/platforms/pseries/eeh_pseries.c
--- linux-libre-3.4.96-gnu1/arch/powerpc/platforms/pseries/eeh_pseries.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/arch/powerpc/platforms/pseries/eeh_pseries.c	2014-07-06 21:50:29.000000000 -0400
@@ -319,6 +319,7 @@ static int pseries_eeh_get_state(struct
 			} else {
 				result = EEH_STATE_NOT_SUPPORT;
 			}
+			break;
 		default:
 			result = EEH_STATE_NOT_SUPPORT;
 		}
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/arch/x86/include/asm/ptrace.h linux-libre-3.4.97-gnu1/arch/x86/include/asm/ptrace.h
--- linux-libre-3.4.96-gnu1/arch/x86/include/asm/ptrace.h	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/arch/x86/include/asm/ptrace.h	2014-07-06 21:50:29.000000000 -0400
@@ -286,6 +286,22 @@ static inline unsigned long regs_get_ker
 
 #define ARCH_HAS_USER_SINGLE_STEP_INFO
 
+/*
+ * When hitting ptrace_stop(), we cannot return using SYSRET because
+ * that does not restore the full CPU state, only a minimal set.  The
+ * ptracer can change arbitrary register values, which is usually okay
+ * because the usual ptrace stops run off the signal delivery path which
+ * forces IRET; however, ptrace_event() stops happen in arbitrary places
+ * in the kernel and don't force IRET path.
+ *
+ * So force IRET path after a ptrace stop.
+ */
+#define arch_ptrace_stop_needed(code, info)				\
+({									\
+	set_thread_flag(TIF_NOTIFY_RESUME);				\
+	false;								\
+})
+
 struct user_desc;
 extern int do_get_thread_area(struct task_struct *p, int idx,
 			      struct user_desc __user *info);
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/drivers/infiniband/core/user_mad.c linux-libre-3.4.97-gnu1/drivers/infiniband/core/user_mad.c
--- linux-libre-3.4.96-gnu1/drivers/infiniband/core/user_mad.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/drivers/infiniband/core/user_mad.c	2014-07-06 21:50:29.000000000 -0400
@@ -98,7 +98,7 @@ struct ib_umad_port {
 
 struct ib_umad_device {
 	int                  start_port, end_port;
-	struct kref          ref;
+	struct kobject       kobj;
 	struct ib_umad_port  port[0];
 };
 
@@ -134,14 +134,18 @@ static DECLARE_BITMAP(dev_map, IB_UMAD_M
 static void ib_umad_add_one(struct ib_device *device);
 static void ib_umad_remove_one(struct ib_device *device);
 
-static void ib_umad_release_dev(struct kref *ref)
+static void ib_umad_release_dev(struct kobject *kobj)
 {
 	struct ib_umad_device *dev =
-		container_of(ref, struct ib_umad_device, ref);
+		container_of(kobj, struct ib_umad_device, kobj);
 
 	kfree(dev);
 }
 
+static struct kobj_type ib_umad_dev_ktype = {
+	.release = ib_umad_release_dev,
+};
+
 static int hdr_size(struct ib_umad_file *file)
 {
 	return file->use_pkey_index ? sizeof (struct ib_user_mad_hdr) :
@@ -780,27 +784,19 @@ static int ib_umad_open(struct inode *in
 {
 	struct ib_umad_port *port;
 	struct ib_umad_file *file;
-	int ret;
+	int ret = -ENXIO;
 
 	port = container_of(inode->i_cdev, struct ib_umad_port, cdev);
-	if (port)
-		kref_get(&port->umad_dev->ref);
-	else
-		return -ENXIO;
 
 	mutex_lock(&port->file_mutex);
 
-	if (!port->ib_dev) {
-		ret = -ENXIO;
+	if (!port->ib_dev)
 		goto out;
-	}
 
+	ret = -ENOMEM;
 	file = kzalloc(sizeof *file, GFP_KERNEL);
-	if (!file) {
-		kref_put(&port->umad_dev->ref, ib_umad_release_dev);
-		ret = -ENOMEM;
+	if (!file)
 		goto out;
-	}
 
 	mutex_init(&file->mutex);
 	spin_lock_init(&file->send_lock);
@@ -814,6 +810,13 @@ static int ib_umad_open(struct inode *in
 	list_add_tail(&file->port_list, &port->file_list);
 
 	ret = nonseekable_open(inode, filp);
+	if (ret) {
+		list_del(&file->port_list);
+		kfree(file);
+		goto out;
+	}
+
+	kobject_get(&port->umad_dev->kobj);
 
 out:
 	mutex_unlock(&port->file_mutex);
@@ -852,7 +855,7 @@ static int ib_umad_close(struct inode *i
 	mutex_unlock(&file->port->file_mutex);
 
 	kfree(file);
-	kref_put(&dev->ref, ib_umad_release_dev);
+	kobject_put(&dev->kobj);
 
 	return 0;
 }
@@ -880,10 +883,6 @@ static int ib_umad_sm_open(struct inode
 	int ret;
 
 	port = container_of(inode->i_cdev, struct ib_umad_port, sm_cdev);
-	if (port)
-		kref_get(&port->umad_dev->ref);
-	else
-		return -ENXIO;
 
 	if (filp->f_flags & O_NONBLOCK) {
 		if (down_trylock(&port->sm_sem)) {
@@ -898,17 +897,27 @@ static int ib_umad_sm_open(struct inode
 	}
 
 	ret = ib_modify_port(port->ib_dev, port->port_num, 0, &props);
-	if (ret) {
-		up(&port->sm_sem);
-		goto fail;
-	}
+	if (ret)
+		goto err_up_sem;
 
 	filp->private_data = port;
 
-	return nonseekable_open(inode, filp);
+	ret = nonseekable_open(inode, filp);
+	if (ret)
+		goto err_clr_sm_cap;
+
+	kobject_get(&port->umad_dev->kobj);
+
+	return 0;
+
+err_clr_sm_cap:
+	swap(props.set_port_cap_mask, props.clr_port_cap_mask);
+	ib_modify_port(port->ib_dev, port->port_num, 0, &props);
+
+err_up_sem:
+	up(&port->sm_sem);
 
 fail:
-	kref_put(&port->umad_dev->ref, ib_umad_release_dev);
 	return ret;
 }
 
@@ -927,7 +936,7 @@ static int ib_umad_sm_close(struct inode
 
 	up(&port->sm_sem);
 
-	kref_put(&port->umad_dev->ref, ib_umad_release_dev);
+	kobject_put(&port->umad_dev->kobj);
 
 	return ret;
 }
@@ -995,6 +1004,7 @@ static int find_overflow_devnum(void)
 }
 
 static int ib_umad_init_port(struct ib_device *device, int port_num,
+			     struct ib_umad_device *umad_dev,
 			     struct ib_umad_port *port)
 {
 	int devnum;
@@ -1027,6 +1037,7 @@ static int ib_umad_init_port(struct ib_d
 
 	cdev_init(&port->cdev, &umad_fops);
 	port->cdev.owner = THIS_MODULE;
+	port->cdev.kobj.parent = &umad_dev->kobj;
 	kobject_set_name(&port->cdev.kobj, "umad%d", port->dev_num);
 	if (cdev_add(&port->cdev, base, 1))
 		goto err_cdev;
@@ -1045,6 +1056,7 @@ static int ib_umad_init_port(struct ib_d
 	base += IB_UMAD_MAX_PORTS;
 	cdev_init(&port->sm_cdev, &umad_sm_fops);
 	port->sm_cdev.owner = THIS_MODULE;
+	port->sm_cdev.kobj.parent = &umad_dev->kobj;
 	kobject_set_name(&port->sm_cdev.kobj, "issm%d", port->dev_num);
 	if (cdev_add(&port->sm_cdev, base, 1))
 		goto err_sm_cdev;
@@ -1138,7 +1150,7 @@ static void ib_umad_add_one(struct ib_de
 	if (!umad_dev)
 		return;
 
-	kref_init(&umad_dev->ref);
+	kobject_init(&umad_dev->kobj, &ib_umad_dev_ktype);
 
 	umad_dev->start_port = s;
 	umad_dev->end_port   = e;
@@ -1146,7 +1158,8 @@ static void ib_umad_add_one(struct ib_de
 	for (i = s; i <= e; ++i) {
 		umad_dev->port[i - s].umad_dev = umad_dev;
 
-		if (ib_umad_init_port(device, i, &umad_dev->port[i - s]))
+		if (ib_umad_init_port(device, i, umad_dev,
+				      &umad_dev->port[i - s]))
 			goto err;
 	}
 
@@ -1158,7 +1171,7 @@ err:
 	while (--i >= s)
 		ib_umad_kill_port(&umad_dev->port[i - s]);
 
-	kref_put(&umad_dev->ref, ib_umad_release_dev);
+	kobject_put(&umad_dev->kobj);
 }
 
 static void ib_umad_remove_one(struct ib_device *device)
@@ -1172,7 +1185,7 @@ static void ib_umad_remove_one(struct ib
 	for (i = 0; i <= umad_dev->end_port - umad_dev->start_port; ++i)
 		ib_umad_kill_port(&umad_dev->port[i]);
 
-	kref_put(&umad_dev->ref, ib_umad_release_dev);
+	kobject_put(&umad_dev->kobj);
 }
 
 static char *umad_devnode(struct device *dev, umode_t *mode)
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/drivers/infiniband/hw/ipath/ipath_diag.c linux-libre-3.4.97-gnu1/drivers/infiniband/hw/ipath/ipath_diag.c
--- linux-libre-3.4.96-gnu1/drivers/infiniband/hw/ipath/ipath_diag.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/drivers/infiniband/hw/ipath/ipath_diag.c	2014-07-06 21:50:29.000000000 -0400
@@ -346,6 +346,10 @@ static ssize_t ipath_diagpkt_write(struc
 			ret = -EFAULT;
 			goto bail;
 		}
+		dp.len = odp.len;
+		dp.unit = odp.unit;
+		dp.data = odp.data;
+		dp.pbc_wd = 0;
 	} else {
 		ret = -EINVAL;
 		goto bail;
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/drivers/infiniband/hw/qib/qib_mad.c linux-libre-3.4.97-gnu1/drivers/infiniband/hw/qib/qib_mad.c
--- linux-libre-3.4.96-gnu1/drivers/infiniband/hw/qib/qib_mad.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/drivers/infiniband/hw/qib/qib_mad.c	2014-07-06 21:50:29.000000000 -0400
@@ -1005,7 +1005,7 @@ static int set_pkeys(struct qib_devdata
 
 		event.event = IB_EVENT_PKEY_CHANGE;
 		event.device = &dd->verbs_dev.ibdev;
-		event.element.port_num = 1;
+		event.element.port_num = port;
 		ib_dispatch_event(&event);
 	}
 	return 0;
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/drivers/infiniband/ulp/srp/ib_srp.c linux-libre-3.4.97-gnu1/drivers/infiniband/ulp/srp/ib_srp.c
--- linux-libre-3.4.96-gnu1/drivers/infiniband/ulp/srp/ib_srp.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/drivers/infiniband/ulp/srp/ib_srp.c	2014-07-06 21:50:29.000000000 -0400
@@ -1371,6 +1371,12 @@ err_unmap:
 err_iu:
 	srp_put_tx_iu(target, iu, SRP_IU_CMD);
 
+	/*
+	 * Avoid that the loops that iterate over the request ring can
+	 * encounter a dangling SCSI command pointer.
+	 */
+	req->scmnd = NULL;
+
 	spin_lock_irqsave(&target->lock, flags);
 	list_add(&req->list, &target->free_reqs);
 
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/drivers/input/mouse/elantech.c linux-libre-3.4.97-gnu1/drivers/input/mouse/elantech.c
--- linux-libre-3.4.96-gnu1/drivers/input/mouse/elantech.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/drivers/input/mouse/elantech.c	2014-07-06 21:50:29.000000000 -0400
@@ -472,8 +472,15 @@ static void elantech_report_absolute_v3(
 	input_report_key(dev, BTN_TOOL_FINGER, fingers == 1);
 	input_report_key(dev, BTN_TOOL_DOUBLETAP, fingers == 2);
 	input_report_key(dev, BTN_TOOL_TRIPLETAP, fingers == 3);
-	input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
-	input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
+
+	/* For clickpads map both buttons to BTN_LEFT */
+	if (etd->fw_version & 0x001000) {
+		input_report_key(dev, BTN_LEFT, packet[0] & 0x03);
+	} else {
+		input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
+		input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
+	}
+
 	input_report_abs(dev, ABS_PRESSURE, pres);
 	input_report_abs(dev, ABS_TOOL_WIDTH, width);
 
@@ -483,10 +490,17 @@ static void elantech_report_absolute_v3(
 static void elantech_input_sync_v4(struct psmouse *psmouse)
 {
 	struct input_dev *dev = psmouse->dev;
+	struct elantech_data *etd = psmouse->private;
 	unsigned char *packet = psmouse->packet;
 
-	input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
-	input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
+	/* For clickpads map both buttons to BTN_LEFT */
+	if (etd->fw_version & 0x001000) {
+		input_report_key(dev, BTN_LEFT, packet[0] & 0x03);
+	} else {
+		input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
+		input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
+	}
+
 	input_mt_report_pointer_emulation(dev, true);
 	input_sync(dev);
 }
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/drivers/pci/pci.c linux-libre-3.4.97-gnu1/drivers/pci/pci.c
--- linux-libre-3.4.96-gnu1/drivers/pci/pci.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/drivers/pci/pci.c	2014-07-06 21:50:29.000000000 -0400
@@ -3610,7 +3610,7 @@ int pci_set_vga_state(struct pci_dev *de
 	u16 cmd;
 	int rc;
 
-	WARN_ON((flags & PCI_VGA_STATE_CHANGE_DECODES) & (command_bits & ~(PCI_COMMAND_IO|PCI_COMMAND_MEMORY)));
+	WARN_ON((flags & PCI_VGA_STATE_CHANGE_DECODES) && (command_bits & ~(PCI_COMMAND_IO|PCI_COMMAND_MEMORY)));
 
 	/* ARCH specific VGA enables */
 	rc = pci_set_vga_state_arch(dev, decode, command_bits, flags);
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/drivers/pci/quirks.c linux-libre-3.4.97-gnu1/drivers/pci/quirks.c
--- linux-libre-3.4.96-gnu1/drivers/pci/quirks.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/drivers/pci/quirks.c	2014-07-06 21:50:29.000000000 -0400
@@ -2921,6 +2921,7 @@ static void __devinit disable_igfx_irq(s
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
 
 static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
 			  struct pci_fixup *end)
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/drivers/watchdog/sp805_wdt.c linux-libre-3.4.97-gnu1/drivers/watchdog/sp805_wdt.c
--- linux-libre-3.4.96-gnu1/drivers/watchdog/sp805_wdt.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/drivers/watchdog/sp805_wdt.c	2014-07-06 21:50:29.000000000 -0400
@@ -62,7 +62,6 @@
  * @adev: amba device structure of wdt
  * @status: current status of wdt
  * @load_val: load value to be set for current timeout
- * @timeout: current programmed timeout
  */
 struct sp805_wdt {
 	spinlock_t			lock;
@@ -73,7 +72,6 @@ struct sp805_wdt {
 	#define WDT_BUSY		0
 	#define WDT_CAN_BE_CLOSED	1
 	unsigned int			load_val;
-	unsigned int			timeout;
 };
 
 /* local variables */
@@ -101,7 +99,7 @@ static void wdt_setload(unsigned int tim
 	spin_lock(&wdt->lock);
 	wdt->load_val = load;
 	/* roundup timeout to closest positive integer value */
-	wdt->timeout = div_u64((load + 1) * 2 + (rate / 2), rate);
+	wdd->timeout = div_u64((load + 1) * 2 + (rate / 2), rate);
 	spin_unlock(&wdt->lock);
 }
 
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/fs/nfsd/nfs4state.c linux-libre-3.4.97-gnu1/fs/nfsd/nfs4state.c
--- linux-libre-3.4.96-gnu1/fs/nfsd/nfs4state.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/fs/nfsd/nfs4state.c	2014-07-06 21:50:29.000000000 -0400
@@ -3485,7 +3485,7 @@ nfsd4_free_lock_stateid(struct nfs4_ol_s
 	 * correspondance, and we have to delete the lockowner when we
 	 * delete the lock stateid:
 	 */
-	unhash_lockowner(lo);
+	release_lockowner(lo);
 	return nfs_ok;
 }
 
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/fs/nfsd/nfs4xdr.c linux-libre-3.4.97-gnu1/fs/nfsd/nfs4xdr.c
--- linux-libre-3.4.96-gnu1/fs/nfsd/nfs4xdr.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/fs/nfsd/nfs4xdr.c	2014-07-06 21:50:29.000000000 -0400
@@ -2032,8 +2032,8 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s
 	err = vfs_getattr(exp->ex_path.mnt, dentry, &stat);
 	if (err)
 		goto out_nfserr;
-	if ((bmval0 & (FATTR4_WORD0_FILES_FREE | FATTR4_WORD0_FILES_TOTAL |
-			FATTR4_WORD0_MAXNAME)) ||
+	if ((bmval0 & (FATTR4_WORD0_FILES_AVAIL | FATTR4_WORD0_FILES_FREE |
+			FATTR4_WORD0_FILES_TOTAL | FATTR4_WORD0_MAXNAME)) ||
 	    (bmval1 & (FATTR4_WORD1_SPACE_AVAIL | FATTR4_WORD1_SPACE_FREE |
 		       FATTR4_WORD1_SPACE_TOTAL))) {
 		err = vfs_statfs(&path, &statfs);
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/fs/ubifs/shrinker.c linux-libre-3.4.97-gnu1/fs/ubifs/shrinker.c
--- linux-libre-3.4.96-gnu1/fs/ubifs/shrinker.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/fs/ubifs/shrinker.c	2014-07-06 21:50:29.000000000 -0400
@@ -128,7 +128,6 @@ static int shrink_tnc(struct ubifs_info
 			freed = ubifs_destroy_tnc_subtree(znode);
 			atomic_long_sub(freed, &ubifs_clean_zn_cnt);
 			atomic_long_sub(freed, &c->clean_zn_cnt);
-			ubifs_assert(atomic_long_read(&c->clean_zn_cnt) >= 0);
 			total_freed += freed;
 			znode = zprev;
 		}
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/include/linux/ptrace.h linux-libre-3.4.97-gnu1/include/linux/ptrace.h
--- linux-libre-3.4.96-gnu1/include/linux/ptrace.h	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/include/linux/ptrace.h	2014-07-06 21:50:29.000000000 -0400
@@ -379,6 +379,9 @@ static inline void user_single_step_sigi
  * calling arch_ptrace_stop() when it would be superfluous.  For example,
  * if the thread has not been back to user mode since the last stop, the
  * thread state might indicate that nothing needs to be done.
+ *
+ * This is guaranteed to be invoked once before a task stops for ptrace and
+ * may include arch-specific operations necessary prior to a ptrace stop.
  */
 #define arch_ptrace_stop_needed(code, info)	(0)
 #endif
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/include/trace/syscall.h linux-libre-3.4.97-gnu1/include/trace/syscall.h
--- linux-libre-3.4.96-gnu1/include/trace/syscall.h	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/include/trace/syscall.h	2014-07-06 21:50:29.000000000 -0400
@@ -4,6 +4,7 @@
 #include <linux/tracepoint.h>
 #include <linux/unistd.h>
 #include <linux/ftrace_event.h>
+#include <linux/thread_info.h>
 
 #include <asm/ptrace.h>
 
@@ -54,4 +55,18 @@ int perf_sysexit_enable(struct ftrace_ev
 void perf_sysexit_disable(struct ftrace_event_call *call);
 #endif
 
+#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
+static inline void syscall_tracepoint_update(struct task_struct *p)
+{
+	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
+		set_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT);
+	else
+		clear_tsk_thread_flag(p, TIF_SYSCALL_TRACEPOINT);
+}
+#else
+static inline void syscall_tracepoint_update(struct task_struct *p)
+{
+}
+#endif
+
 #endif /* _TRACE_SYSCALL_H */
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/kernel/fork.c linux-libre-3.4.97-gnu1/kernel/fork.c
--- linux-libre-3.4.96-gnu1/kernel/fork.c	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/kernel/fork.c	2014-07-06 21:50:29.000000000 -0400
@@ -1441,7 +1441,9 @@ static struct task_struct *copy_process(
 
 	total_forks++;
 	spin_unlock(&current->sighand->siglock);
+	syscall_tracepoint_update(p);
 	write_unlock_irq(&tasklist_lock);
+
 	proc_fork_connector(p);
 	cgroup_post_fork(p);
 	if (clone_flags & CLONE_THREAD)
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/Makefile linux-libre-3.4.97-gnu1/Makefile
--- linux-libre-3.4.96-gnu1/Makefile	2014-07-01 09:40:55.000000000 -0400
+++ linux-libre-3.4.97-gnu1/Makefile	2014-07-07 05:41:38.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 4
-SUBLEVEL = 96
+SUBLEVEL = 97
 EXTRAVERSION =-gnu1
 NAME = Saber-toothed Squirrel
 
diff -druNp --no-dereference linux-libre-3.4.96-gnu1/scripts/recordmcount.h linux-libre-3.4.97-gnu1/scripts/recordmcount.h
--- linux-libre-3.4.96-gnu1/scripts/recordmcount.h	2014-06-30 23:05:38.000000000 -0400
+++ linux-libre-3.4.97-gnu1/scripts/recordmcount.h	2014-07-06 21:50:29.000000000 -0400
@@ -163,11 +163,11 @@ static int mcount_adjust = 0;
 
 static int MIPS_is_fake_mcount(Elf_Rel const *rp)
 {
-	static Elf_Addr old_r_offset;
+	static Elf_Addr old_r_offset = ~(Elf_Addr)0;
 	Elf_Addr current_r_offset = _w(rp->r_offset);
 	int is_fake;
 
-	is_fake = old_r_offset &&
+	is_fake = (old_r_offset != ~(Elf_Addr)0) &&
 		(current_r_offset - old_r_offset == MIPS_FAKEMCOUNT_OFFSET);
 	old_r_offset = current_r_offset;
 
