diff -druNp --no-dereference linux-libre-3.18.37-gnu/arch/mips/include/asm/pgtable.h linux-libre-3.18.38-gnu/arch/mips/include/asm/pgtable.h
--- linux-libre-3.18.37-gnu/arch/mips/include/asm/pgtable.h	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/arch/mips/include/asm/pgtable.h	2016-07-29 21:41:44.000000000 -0400
@@ -596,7 +596,8 @@ static inline struct page *pmd_page(pmd_
 
 static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
 {
-	pmd_val(pmd) = (pmd_val(pmd) & _PAGE_CHG_MASK) | pgprot_val(newprot);
+	pmd_val(pmd) = (pmd_val(pmd) & (_PAGE_CHG_MASK | _PAGE_HUGE)) |
+		       (pgprot_val(newprot) & ~_PAGE_CHG_MASK);
 	return pmd;
 }
 
diff -druNp --no-dereference linux-libre-3.18.37-gnu/arch/powerpc/kernel/prom.c linux-libre-3.18.38-gnu/arch/powerpc/kernel/prom.c
--- linux-libre-3.18.37-gnu/arch/powerpc/kernel/prom.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/arch/powerpc/kernel/prom.c	2016-07-29 21:41:44.000000000 -0400
@@ -166,8 +166,7 @@ static struct ibm_pa_feature {
 	 * we don't want to turn on TM here, so we use the *_COMP versions
 	 * which are 0 if the kernel doesn't support TM.
 	 */
-	{CPU_FTR_TM_COMP, 0, 0,
-	 PPC_FEATURE2_HTM_COMP|PPC_FEATURE2_HTM_NOSC_COMP, 22, 0, 0},
+	{CPU_FTR_TM_COMP, 0, 0, PPC_FEATURE2_HTM_COMP, 22, 0, 0},
 };
 
 static void __init scan_features(unsigned long node, const unsigned char *ftrs,
diff -druNp --no-dereference linux-libre-3.18.37-gnu/arch/x86/kernel/amd_nb.c linux-libre-3.18.38-gnu/arch/x86/kernel/amd_nb.c
--- linux-libre-3.18.37-gnu/arch/x86/kernel/amd_nb.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/arch/x86/kernel/amd_nb.c	2016-07-29 21:41:44.000000000 -0400
@@ -69,8 +69,8 @@ int amd_cache_northbridges(void)
 	while ((misc = next_northbridge(misc, amd_nb_misc_ids)) != NULL)
 		i++;
 
-	if (i == 0)
-		return 0;
+	if (!i)
+		return -ENODEV;
 
 	nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);
 	if (!nb)
diff -druNp --no-dereference linux-libre-3.18.37-gnu/block/ioprio.c linux-libre-3.18.38-gnu/block/ioprio.c
--- linux-libre-3.18.37-gnu/block/ioprio.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/block/ioprio.c	2016-07-29 21:41:44.000000000 -0400
@@ -149,8 +149,10 @@ static int get_task_ioprio(struct task_s
 	if (ret)
 		goto out;
 	ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);
+	task_lock(p);
 	if (p->io_context)
 		ret = p->io_context->ioprio;
+	task_unlock(p);
 out:
 	return ret;
 }
diff -druNp --no-dereference linux-libre-3.18.37-gnu/drivers/s390/net/qeth_l2_main.c linux-libre-3.18.38-gnu/drivers/s390/net/qeth_l2_main.c
--- linux-libre-3.18.37-gnu/drivers/s390/net/qeth_l2_main.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/drivers/s390/net/qeth_l2_main.c	2016-07-29 21:41:44.000000000 -0400
@@ -911,6 +911,7 @@ static void qeth_l2_remove_device(struct
 		qeth_l2_set_offline(cgdev);
 
 	if (card->dev) {
+		netif_napi_del(&card->napi);
 		unregister_netdev(card->dev);
 		card->dev = NULL;
 	}
diff -druNp --no-dereference linux-libre-3.18.37-gnu/drivers/s390/net/qeth_l3_main.c linux-libre-3.18.38-gnu/drivers/s390/net/qeth_l3_main.c
--- linux-libre-3.18.37-gnu/drivers/s390/net/qeth_l3_main.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/drivers/s390/net/qeth_l3_main.c	2016-07-29 21:41:44.000000000 -0400
@@ -3337,6 +3337,7 @@ static void qeth_l3_remove_device(struct
 		qeth_l3_set_offline(cgdev);
 
 	if (card->dev) {
+		netif_napi_del(&card->napi);
 		unregister_netdev(card->dev);
 		card->dev = NULL;
 	}
diff -druNp --no-dereference linux-libre-3.18.37-gnu/drivers/scsi/ipr.c linux-libre-3.18.38-gnu/drivers/scsi/ipr.c
--- linux-libre-3.18.37-gnu/drivers/scsi/ipr.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/drivers/scsi/ipr.c	2016-07-29 21:41:44.000000000 -0400
@@ -9759,6 +9759,7 @@ static int ipr_probe_ioa(struct pci_dev
 		ioa_cfg->intr_flag = IPR_USE_MSI;
 	else {
 		ioa_cfg->intr_flag = IPR_USE_LSI;
+		ioa_cfg->clear_isr = 1;
 		ioa_cfg->nvectors = 1;
 		dev_info(&pdev->dev, "Cannot enable MSI.\n");
 	}
diff -druNp --no-dereference linux-libre-3.18.37-gnu/drivers/xen/xen-acpi-processor.c linux-libre-3.18.38-gnu/drivers/xen/xen-acpi-processor.c
--- linux-libre-3.18.37-gnu/drivers/xen/xen-acpi-processor.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/drivers/xen/xen-acpi-processor.c	2016-07-29 21:41:44.000000000 -0400
@@ -423,36 +423,7 @@ upload:
 
 	return 0;
 }
-static int __init check_prereq(void)
-{
-	struct cpuinfo_x86 *c = &cpu_data(0);
-
-	if (!xen_initial_domain())
-		return -ENODEV;
-
-	if (!acpi_gbl_FADT.smi_command)
-		return -ENODEV;
 
-	if (c->x86_vendor == X86_VENDOR_INTEL) {
-		if (!cpu_has(c, X86_FEATURE_EST))
-			return -ENODEV;
-
-		return 0;
-	}
-	if (c->x86_vendor == X86_VENDOR_AMD) {
-		/* Copied from powernow-k8.h, can't include ../cpufreq/powernow
-		 * as we get compile warnings for the static functions.
-		 */
-#define CPUID_FREQ_VOLT_CAPABILITIES    0x80000007
-#define USE_HW_PSTATE                   0x00000080
-		u32 eax, ebx, ecx, edx;
-		cpuid(CPUID_FREQ_VOLT_CAPABILITIES, &eax, &ebx, &ecx, &edx);
-		if ((edx & USE_HW_PSTATE) != USE_HW_PSTATE)
-			return -ENODEV;
-		return 0;
-	}
-	return -ENODEV;
-}
 /* acpi_perf_data is a pointer to percpu data. */
 static struct acpi_processor_performance __percpu *acpi_perf_data;
 
@@ -509,10 +480,10 @@ struct notifier_block xen_acpi_processor
 static int __init xen_acpi_processor_init(void)
 {
 	unsigned int i;
-	int rc = check_prereq();
+	int rc;
 
-	if (rc)
-		return rc;
+	if (!xen_initial_domain())
+		return -ENODEV;
 
 	nr_acpi_bits = get_max_acpi_id() + 1;
 	acpi_ids_done = kcalloc(BITS_TO_LONGS(nr_acpi_bits), sizeof(unsigned long), GFP_KERNEL);
diff -druNp --no-dereference linux-libre-3.18.37-gnu/drivers/xen/xenbus/xenbus_dev_frontend.c linux-libre-3.18.38-gnu/drivers/xen/xenbus/xenbus_dev_frontend.c
--- linux-libre-3.18.37-gnu/drivers/xen/xenbus/xenbus_dev_frontend.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/drivers/xen/xenbus/xenbus_dev_frontend.c	2016-07-29 21:41:44.000000000 -0400
@@ -316,26 +316,31 @@ static int xenbus_write_transaction(unsi
 			rc = -ENOMEM;
 			goto out;
 		}
+	} else {
+		list_for_each_entry(trans, &u->transactions, list)
+			if (trans->handle.id == u->u.msg.tx_id)
+				break;
+		if (&trans->list == &u->transactions)
+			return -ESRCH;
 	}
 
 	reply = xenbus_dev_request_and_reply(&u->u.msg);
 	if (IS_ERR(reply)) {
-		kfree(trans);
+		if (msg_type == XS_TRANSACTION_START)
+			kfree(trans);
 		rc = PTR_ERR(reply);
 		goto out;
 	}
 
 	if (msg_type == XS_TRANSACTION_START) {
-		trans->handle.id = simple_strtoul(reply, NULL, 0);
-
-		list_add(&trans->list, &u->transactions);
-	} else if (msg_type == XS_TRANSACTION_END) {
-		list_for_each_entry(trans, &u->transactions, list)
-			if (trans->handle.id == u->u.msg.tx_id)
-				break;
-		BUG_ON(&trans->list == &u->transactions);
+		if (u->u.msg.type == XS_ERROR)
+			kfree(trans);
+		else {
+			trans->handle.id = simple_strtoul(reply, NULL, 0);
+			list_add(&trans->list, &u->transactions);
+		}
+	} else if (u->u.msg.type == XS_TRANSACTION_END) {
 		list_del(&trans->list);
-
 		kfree(trans);
 	}
 
diff -druNp --no-dereference linux-libre-3.18.37-gnu/drivers/xen/xenbus/xenbus_xs.c linux-libre-3.18.38-gnu/drivers/xen/xenbus/xenbus_xs.c
--- linux-libre-3.18.37-gnu/drivers/xen/xenbus/xenbus_xs.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/drivers/xen/xenbus/xenbus_xs.c	2016-07-29 21:41:44.000000000 -0400
@@ -250,9 +250,6 @@ void *xenbus_dev_request_and_reply(struc
 
 	mutex_unlock(&xs_state.request_mutex);
 
-	if (IS_ERR(ret))
-		return ret;
-
 	if ((msg->type == XS_TRANSACTION_END) ||
 	    ((req_msg.type == XS_TRANSACTION_START) &&
 	     (msg->type == XS_ERROR)))
diff -druNp --no-dereference linux-libre-3.18.37-gnu/fs/ecryptfs/file.c linux-libre-3.18.38-gnu/fs/ecryptfs/file.c
--- linux-libre-3.18.37-gnu/fs/ecryptfs/file.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/fs/ecryptfs/file.c	2016-07-29 21:41:44.000000000 -0400
@@ -177,6 +177,19 @@ out:
 	return rc;
 }
 
+static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)
+{
+	struct file *lower_file = ecryptfs_file_to_lower(file);
+	/*
+	 * Don't allow mmap on top of file systems that don't support it
+	 * natively.  If FILESYSTEM_MAX_STACK_DEPTH > 2 or ecryptfs
+	 * allows recursive mounting, this will need to be extended.
+	 */
+	if (!lower_file->f_op->mmap)
+		return -ENODEV;
+	return generic_file_mmap(file, vma);
+}
+
 /**
  * ecryptfs_open
  * @inode: inode speciying file to open
@@ -374,7 +387,7 @@ const struct file_operations ecryptfs_ma
 #ifdef CONFIG_COMPAT
 	.compat_ioctl = ecryptfs_compat_ioctl,
 #endif
-	.mmap = generic_file_mmap,
+	.mmap = ecryptfs_mmap,
 	.open = ecryptfs_open,
 	.flush = ecryptfs_flush,
 	.release = ecryptfs_release,
diff -druNp --no-dereference linux-libre-3.18.37-gnu/fs/ecryptfs/kthread.c linux-libre-3.18.38-gnu/fs/ecryptfs/kthread.c
--- linux-libre-3.18.37-gnu/fs/ecryptfs/kthread.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/fs/ecryptfs/kthread.c	2016-07-29 21:41:44.000000000 -0400
@@ -25,7 +25,6 @@
 #include <linux/slab.h>
 #include <linux/wait.h>
 #include <linux/mount.h>
-#include <linux/file.h>
 #include "ecryptfs_kernel.h"
 
 struct ecryptfs_open_req {
@@ -148,7 +147,7 @@ int ecryptfs_privileged_open(struct file
 	flags |= IS_RDONLY(lower_dentry->d_inode) ? O_RDONLY : O_RDWR;
 	(*lower_file) = dentry_open(&req.path, flags, cred);
 	if (!IS_ERR(*lower_file))
-		goto have_file;
+		goto out;
 	if ((flags & O_ACCMODE) == O_RDONLY) {
 		rc = PTR_ERR((*lower_file));
 		goto out;
@@ -166,16 +165,8 @@ int ecryptfs_privileged_open(struct file
 	mutex_unlock(&ecryptfs_kthread_ctl.mux);
 	wake_up(&ecryptfs_kthread_ctl.wait);
 	wait_for_completion(&req.done);
-	if (IS_ERR(*lower_file)) {
+	if (IS_ERR(*lower_file))
 		rc = PTR_ERR(*lower_file);
-		goto out;
-	}
-have_file:
-	if ((*lower_file)->f_op->mmap == NULL) {
-		fput(*lower_file);
-		*lower_file = NULL;
-		rc = -EMEDIUMTYPE;
-	}
 out:
 	return rc;
 }
diff -druNp --no-dereference linux-libre-3.18.37-gnu/Makefile linux-libre-3.18.38-gnu/Makefile
--- linux-libre-3.18.37-gnu/Makefile	2016-07-15 23:37:23.000000000 -0400
+++ linux-libre-3.18.38-gnu/Makefile	2016-07-31 14:03:26.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 3
 PATCHLEVEL = 18
-SUBLEVEL = 37
+SUBLEVEL = 38
 EXTRAVERSION =-gnu
 NAME = Diseased Newt
 
diff -druNp --no-dereference linux-libre-3.18.37-gnu/mm/swap.c linux-libre-3.18.38-gnu/mm/swap.c
--- linux-libre-3.18.37-gnu/mm/swap.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/mm/swap.c	2016-07-29 21:41:44.000000000 -0400
@@ -623,7 +623,7 @@ static void __lru_cache_add(struct page
 	struct pagevec *pvec = &get_cpu_var(lru_add_pvec);
 
 	page_cache_get(page);
-	if (!pagevec_space(pvec) || PageCompound(page))
+	if (!pagevec_add(pvec, page) || PageCompound(page))
 		__pagevec_lru_add(pvec);
 	put_cpu_var(lru_add_pvec);
 }
diff -druNp --no-dereference linux-libre-3.18.37-gnu/sound/core/timer.c linux-libre-3.18.38-gnu/sound/core/timer.c
--- linux-libre-3.18.37-gnu/sound/core/timer.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/sound/core/timer.c	2016-07-29 21:41:44.000000000 -0400
@@ -1959,6 +1959,7 @@ static ssize_t snd_timer_user_read(struc
 
 		qhead = tu->qhead++;
 		tu->qhead %= tu->queue_size;
+		tu->qused--;
 		spin_unlock_irq(&tu->qlock);
 
 		if (tu->tread) {
@@ -1972,7 +1973,6 @@ static ssize_t snd_timer_user_read(struc
 		}
 
 		spin_lock_irq(&tu->qlock);
-		tu->qused--;
 		if (err < 0)
 			goto _error;
 		result += unit;
diff -druNp --no-dereference linux-libre-3.18.37-gnu/sound/pci/au88x0/au88x0_core.c linux-libre-3.18.38-gnu/sound/pci/au88x0/au88x0_core.c
--- linux-libre-3.18.37-gnu/sound/pci/au88x0/au88x0_core.c	2016-07-13 14:19:51.000000000 -0400
+++ linux-libre-3.18.38-gnu/sound/pci/au88x0/au88x0_core.c	2016-07-29 21:41:44.000000000 -0400
@@ -1442,9 +1442,8 @@ static int vortex_wtdma_bufshift(vortex_
 	int page, p, pp, delta, i;
 
 	page =
-	    (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2)) &
-	     WT_SUBBUF_MASK)
-	    >> WT_SUBBUF_SHIFT;
+	    (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2))
+	     >> WT_SUBBUF_SHIFT) & WT_SUBBUF_MASK;
 	if (dma->nr_periods >= 4)
 		delta = (page - dma->period_real) & 3;
 	else {
diff -druNp --no-dereference linux-libre-3.18.37-gnu/sound/pci/echoaudio/echoaudio.c linux-libre-3.18.38-gnu/sound/pci/echoaudio/echoaudio.c
--- linux-libre-3.18.37-gnu/sound/pci/echoaudio/echoaudio.c	2016-07-16 00:04:34.000000000 -0400
+++ linux-libre-3.18.38-gnu/sound/pci/echoaudio/echoaudio.c	2016-07-31 14:24:49.000000000 -0400
@@ -2247,11 +2247,11 @@ static int snd_echo_resume(struct device
 
 	DE_INIT(("resume start\n"));
 	pci_restore_state(pci);
-	commpage_bak = kmalloc(sizeof(struct echoaudio), GFP_KERNEL);
+	commpage_bak = kmalloc(sizeof(*commpage), GFP_KERNEL);
 	if (commpage_bak == NULL)
 		return -ENOMEM;
 	commpage = chip->comm_page;
-	memcpy(commpage_bak, commpage, sizeof(struct comm_page));
+	memcpy(commpage_bak, commpage, sizeof(*commpage));
 
 	err = init_hw(chip, chip->pci->device, chip->pci->subsystem_device);
 	if (err < 0) {
