diff -druNp --no-dereference linux-libre-4.9.129-gnu/arch/x86/xen/pmu.c linux-libre-4.9.130-gnu/arch/x86/xen/pmu.c
--- linux-libre-4.9.129-gnu/arch/x86/xen/pmu.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/arch/x86/xen/pmu.c	2018-09-29 06:07:35.000000000 -0400
@@ -477,7 +477,7 @@ static void xen_convert_regs(const struc
 irqreturn_t xen_pmu_irq_handler(int irq, void *dev_id)
 {
 	int err, ret = IRQ_NONE;
-	struct pt_regs regs;
+	struct pt_regs regs = {0};
 	const struct xen_pmu_data *xenpmu_data = get_xenpmu_data();
 	uint8_t xenpmu_flags = get_xenpmu_flags();
 
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/gpu/drm/nouveau/nouveau_connector.c linux-libre-4.9.130-gnu/drivers/gpu/drm/nouveau/nouveau_connector.c
--- linux-libre-4.9.129-gnu/drivers/gpu/drm/nouveau/nouveau_connector.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/gpu/drm/nouveau/nouveau_connector.c	2018-09-29 06:07:35.000000000 -0400
@@ -271,12 +271,16 @@ nouveau_connector_detect(struct drm_conn
 		nv_connector->edid = NULL;
 	}
 
-	/* Outputs are only polled while runtime active, so acquiring a
-	 * runtime PM ref here is unnecessary (and would deadlock upon
-	 * runtime suspend because it waits for polling to finish).
+	/* Outputs are only polled while runtime active, so resuming the
+	 * device here is unnecessary (and would deadlock upon runtime suspend
+	 * because it waits for polling to finish). We do however, want to
+	 * prevent the autosuspend timer from elapsing during this operation
+	 * if possible.
 	 */
-	if (!drm_kms_helper_is_poll_worker()) {
-		ret = pm_runtime_get_sync(connector->dev->dev);
+	if (drm_kms_helper_is_poll_worker()) {
+		pm_runtime_get_noresume(dev->dev);
+	} else {
+		ret = pm_runtime_get_sync(dev->dev);
 		if (ret < 0 && ret != -EACCES)
 			return conn_status;
 	}
@@ -354,10 +358,8 @@ detect_analog:
 
  out:
 
-	if (!drm_kms_helper_is_poll_worker()) {
-		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
-	}
+	pm_runtime_mark_last_busy(dev->dev);
+	pm_runtime_put_autosuspend(dev->dev);
 
 	return conn_status;
 }
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/gpu/drm/nouveau/nouveau_display.c linux-libre-4.9.130-gnu/drivers/gpu/drm/nouveau/nouveau_display.c
--- linux-libre-4.9.129-gnu/drivers/gpu/drm/nouveau/nouveau_display.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/gpu/drm/nouveau/nouveau_display.c	2018-09-29 06:07:35.000000000 -0400
@@ -367,8 +367,6 @@ nouveau_display_hpd_work(struct work_str
 	pm_runtime_get_sync(drm->dev->dev);
 
 	drm_helper_hpd_irq_event(drm->dev);
-	/* enable polling for external displays */
-	drm_kms_helper_poll_enable(drm->dev);
 
 	pm_runtime_mark_last_busy(drm->dev->dev);
 	pm_runtime_put_sync(drm->dev->dev);
@@ -391,15 +389,29 @@ nouveau_display_acpi_ntfy(struct notifie
 {
 	struct nouveau_drm *drm = container_of(nb, typeof(*drm), acpi_nb);
 	struct acpi_bus_event *info = data;
+	int ret;
 
 	if (!strcmp(info->device_class, ACPI_VIDEO_CLASS)) {
 		if (info->type == ACPI_VIDEO_NOTIFY_PROBE) {
-			/*
-			 * This may be the only indication we receive of a
-			 * connector hotplug on a runtime suspended GPU,
-			 * schedule hpd_work to check.
-			 */
-			schedule_work(&drm->hpd_work);
+			ret = pm_runtime_get(drm->dev->dev);
+			if (ret == 1 || ret == -EACCES) {
+				/* If the GPU is already awake, or in a state
+				 * where we can't wake it up, it can handle
+				 * it's own hotplug events.
+				 */
+				pm_runtime_put_autosuspend(drm->dev->dev);
+			} else if (ret == 0) {
+				/* This may be the only indication we receive
+				 * of a connector hotplug on a runtime
+				 * suspended GPU, schedule hpd_work to check.
+				 */
+				NV_DEBUG(drm, "ACPI requested connector reprobe\n");
+				schedule_work(&drm->hpd_work);
+				pm_runtime_put_noidle(drm->dev->dev);
+			} else {
+				NV_WARN(drm, "Dropped ACPI reprobe event due to RPM error: %d\n",
+					ret);
+			}
 
 			/* acpi-video should not generate keypresses for this */
 			return NOTIFY_BAD;
@@ -422,6 +434,11 @@ nouveau_display_init(struct drm_device *
 	if (ret)
 		return ret;
 
+	/* enable connector detection and polling for connectors without HPD
+	 * support
+	 */
+	drm_kms_helper_poll_enable(dev);
+
 	/* enable hotplug interrupts */
 	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
 		struct nouveau_connector *conn = nouveau_connector(connector);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/gpu/drm/vc4/vc4_plane.c linux-libre-4.9.130-gnu/drivers/gpu/drm/vc4/vc4_plane.c
--- linux-libre-4.9.129-gnu/drivers/gpu/drm/vc4/vc4_plane.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/gpu/drm/vc4/vc4_plane.c	2018-09-29 06:07:35.000000000 -0400
@@ -327,6 +327,9 @@ static int vc4_plane_setup_clipping_and_
 	vc4_state->y_scaling[0] = vc4_get_scaling_mode(vc4_state->src_h[0],
 						       vc4_state->crtc_h);
 
+	vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
+			       vc4_state->y_scaling[0] == VC4_SCALING_NONE);
+
 	if (num_planes > 1) {
 		vc4_state->is_yuv = true;
 
@@ -342,24 +345,17 @@ static int vc4_plane_setup_clipping_and_
 			vc4_get_scaling_mode(vc4_state->src_h[1],
 					     vc4_state->crtc_h);
 
-		/* YUV conversion requires that scaling be enabled,
-		 * even on a plane that's otherwise 1:1.  Choose TPZ
-		 * for simplicity.
+		/* YUV conversion requires that horizontal scaling be enabled,
+		 * even on a plane that's otherwise 1:1. Looks like only PPF
+		 * works in that case, so let's pick that one.
 		 */
-		if (vc4_state->x_scaling[0] == VC4_SCALING_NONE)
-			vc4_state->x_scaling[0] = VC4_SCALING_TPZ;
-		if (vc4_state->y_scaling[0] == VC4_SCALING_NONE)
-			vc4_state->y_scaling[0] = VC4_SCALING_TPZ;
+		if (vc4_state->is_unity)
+			vc4_state->x_scaling[0] = VC4_SCALING_PPF;
 	} else {
 		vc4_state->x_scaling[1] = VC4_SCALING_NONE;
 		vc4_state->y_scaling[1] = VC4_SCALING_NONE;
 	}
 
-	vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
-			       vc4_state->y_scaling[0] == VC4_SCALING_NONE &&
-			       vc4_state->x_scaling[1] == VC4_SCALING_NONE &&
-			       vc4_state->y_scaling[1] == VC4_SCALING_NONE);
-
 	/* No configuring scaling on the cursor plane, since it gets
 	   non-vblank-synced updates, and scaling requires requires
 	   LBM changes which have to be vblank-synced.
@@ -614,7 +610,10 @@ static int vc4_plane_mode_set(struct drm
 		vc4_dlist_write(vc4_state, SCALER_CSC2_ITR_R_601_5);
 	}
 
-	if (!vc4_state->is_unity) {
+	if (vc4_state->x_scaling[0] != VC4_SCALING_NONE ||
+	    vc4_state->x_scaling[1] != VC4_SCALING_NONE ||
+	    vc4_state->y_scaling[0] != VC4_SCALING_NONE ||
+	    vc4_state->y_scaling[1] != VC4_SCALING_NONE) {
 		/* LBM Base Address. */
 		if (vc4_state->y_scaling[0] != VC4_SCALING_NONE ||
 		    vc4_state->y_scaling[1] != VC4_SCALING_NONE) {
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/hid/hid-core.c linux-libre-4.9.130-gnu/drivers/hid/hid-core.c
--- linux-libre-4.9.129-gnu/drivers/hid/hid-core.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/hid/hid-core.c	2018-09-29 06:07:35.000000000 -0400
@@ -2059,6 +2059,9 @@ static const struct hid_device_id hid_ha
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SINO_LITE, USB_DEVICE_ID_SINO_LITE_CONTROLLER) },
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/hid/hid-ids.h linux-libre-4.9.130-gnu/drivers/hid/hid-ids.h
--- linux-libre-4.9.129-gnu/drivers/hid/hid-ids.h	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/hid/hid-ids.h	2018-09-29 06:07:35.000000000 -0400
@@ -927,6 +927,8 @@
 #define USB_DEVICE_ID_SONY_PS3_BDREMOTE		0x0306
 #define USB_DEVICE_ID_SONY_PS3_CONTROLLER	0x0268
 #define USB_DEVICE_ID_SONY_PS4_CONTROLLER	0x05c4
+#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_2	0x09cc
+#define USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE	0x0ba0
 #define USB_DEVICE_ID_SONY_MOTION_CONTROLLER	0x03d5
 #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER	0x042f
 #define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER		0x0002
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/hid/hid-sony.c linux-libre-4.9.130-gnu/drivers/hid/hid-sony.c
--- linux-libre-4.9.129-gnu/drivers/hid/hid-sony.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/hid/hid-sony.c	2018-09-29 06:07:35.000000000 -0400
@@ -2581,6 +2581,12 @@ static const struct hid_device_id sony_d
 		.driver_data = DUALSHOCK4_CONTROLLER_USB },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER),
 		.driver_data = DUALSHOCK4_CONTROLLER_BT },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
+		.driver_data = DUALSHOCK4_CONTROLLER_USB },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_2),
+		.driver_data = DUALSHOCK4_CONTROLLER_BT },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER_DONGLE),
+		.driver_data = DUALSHOCK4_CONTROLLER_USB },
 	/* Nyko Core Controller for PS3 */
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SINO_LITE, USB_DEVICE_ID_SINO_LITE_CONTROLLER),
 		.driver_data = SIXAXIS_CONTROLLER_USB | SINO_LITE_CONTROLLER },
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/infiniband/hw/cxgb4/qp.c linux-libre-4.9.130-gnu/drivers/infiniband/hw/cxgb4/qp.c
--- linux-libre-4.9.129-gnu/drivers/infiniband/hw/cxgb4/qp.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/infiniband/hw/cxgb4/qp.c	2018-09-29 06:07:35.000000000 -0400
@@ -1258,6 +1258,12 @@ static void flush_qp(struct c4iw_qp *qhp
 
 	t4_set_wq_in_error(&qhp->wq);
 	if (qhp->ibqp.uobject) {
+
+		/* for user qps, qhp->wq.flushed is protected by qhp->mutex */
+		if (qhp->wq.flushed)
+			return;
+
+		qhp->wq.flushed = 1;
 		t4_set_cq_in_error(&rchp->cq);
 		spin_lock_irqsave(&rchp->comp_handler_lock, flag);
 		(*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/misc/vmw_balloon.c linux-libre-4.9.130-gnu/drivers/misc/vmw_balloon.c
--- linux-libre-4.9.129-gnu/drivers/misc/vmw_balloon.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/misc/vmw_balloon.c	2018-09-29 06:07:35.000000000 -0400
@@ -45,6 +45,7 @@
 #include <linux/seq_file.h>
 #include <linux/vmw_vmci_defs.h>
 #include <linux/vmw_vmci_api.h>
+#include <linux/io.h>
 #include <asm/hypervisor.h>
 
 MODULE_AUTHOR("VMware, Inc.");
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/net/appletalk/ipddp.c linux-libre-4.9.130-gnu/drivers/net/appletalk/ipddp.c
--- linux-libre-4.9.129-gnu/drivers/net/appletalk/ipddp.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/net/appletalk/ipddp.c	2018-09-29 06:07:35.000000000 -0400
@@ -284,8 +284,12 @@ static int ipddp_ioctl(struct net_device
                 case SIOCFINDIPDDPRT:
 			spin_lock_bh(&ipddp_route_lock);
 			rp = __ipddp_find_route(&rcp);
-			if (rp)
-				memcpy(&rcp2, rp, sizeof(rcp2));
+			if (rp) {
+				memset(&rcp2, 0, sizeof(rcp2));
+				rcp2.ip    = rp->ip;
+				rcp2.at    = rp->at;
+				rcp2.flags = rp->flags;
+			}
 			spin_unlock_bh(&ipddp_route_lock);
 
 			if (rp) {
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/net/ethernet/hp/hp100.c linux-libre-4.9.130-gnu/drivers/net/ethernet/hp/hp100.c
--- linux-libre-4.9.129-gnu/drivers/net/ethernet/hp/hp100.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/net/ethernet/hp/hp100.c	2018-09-29 06:07:35.000000000 -0400
@@ -2636,7 +2636,7 @@ static int hp100_login_to_vg_hub(struct
 		/* Wait for link to drop */
 		time = jiffies + (HZ / 10);
 		do {
-			if (~(hp100_inb(VG_LAN_CFG_1) & HP100_LINK_UP_ST))
+			if (!(hp100_inb(VG_LAN_CFG_1) & HP100_LINK_UP_ST))
 				break;
 			if (!in_interrupt())
 				schedule_timeout_interruptible(1);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/net/xen-netfront.c linux-libre-4.9.130-gnu/drivers/net/xen-netfront.c
--- linux-libre-4.9.129-gnu/drivers/net/xen-netfront.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/net/xen-netfront.c	2018-09-29 06:07:35.000000000 -0400
@@ -906,7 +906,11 @@ static RING_IDX xennet_fill_frags(struct
 			BUG_ON(pull_to <= skb_headlen(skb));
 			__pskb_pull_tail(skb, pull_to - skb_headlen(skb));
 		}
-		BUG_ON(skb_shinfo(skb)->nr_frags >= MAX_SKB_FRAGS);
+		if (unlikely(skb_shinfo(skb)->nr_frags >= MAX_SKB_FRAGS)) {
+			queue->rx.rsp_cons = ++cons;
+			kfree_skb(nskb);
+			return ~0U;
+		}
 
 		skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
 				skb_frag_page(nfrag),
@@ -1043,6 +1047,8 @@ err:
 		skb->len += rx->status;
 
 		i = xennet_fill_frags(queue, skb, &tmpq);
+		if (unlikely(i == ~0U))
+			goto err;
 
 		if (rx->flags & XEN_NETRXF_csum_blank)
 			skb->ip_summed = CHECKSUM_PARTIAL;
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/pci/host/pci-aardvark.c linux-libre-4.9.130-gnu/drivers/pci/host/pci-aardvark.c
--- linux-libre-4.9.129-gnu/drivers/pci/host/pci-aardvark.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/pci/host/pci-aardvark.c	2018-09-29 06:07:35.000000000 -0400
@@ -976,6 +976,7 @@ static int advk_pcie_probe(struct platfo
 		return -ENOMEM;
 	}
 
+	pci_bus_size_bridges(bus);
 	pci_bus_assign_resources(bus);
 
 	list_for_each_entry(child, &bus->children, node)
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/pci/quirks.c linux-libre-4.9.130-gnu/drivers/pci/quirks.c
--- linux-libre-4.9.129-gnu/drivers/pci/quirks.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/pci/quirks.c	2018-09-29 06:07:35.000000000 -0400
@@ -4236,11 +4236,6 @@ static int pci_quirk_qcom_rp_acs(struct
  *
  * 0x9d10-0x9d1b PCI Express Root port #{1-12}
  *
- * The 300 series chipset suffers from the same bug so include those root
- * ports here as well.
- *
- * 0xa32c-0xa343 PCI Express Root port #{0-24}
- *
  * [1] http://www.intel.com/content/www/us/en/chipsets/100-series-chipset-datasheet-vol-2.html
  * [2] http://www.intel.com/content/www/us/en/chipsets/100-series-chipset-datasheet-vol-1.html
  * [3] http://www.intel.com/content/www/us/en/chipsets/100-series-chipset-spec-update.html
@@ -4258,7 +4253,6 @@ static bool pci_quirk_intel_spt_pch_acs_
 	case 0xa110 ... 0xa11f: case 0xa167 ... 0xa16a: /* Sunrise Point */
 	case 0xa290 ... 0xa29f: case 0xa2e7 ... 0xa2ee: /* Union Point */
 	case 0x9d10 ... 0x9d1b: /* 7th & 8th Gen Mobile */
-	case 0xa32c ... 0xa343:				/* 300 series */
 		return true;
 	}
 
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/platform/x86/alienware-wmi.c linux-libre-4.9.130-gnu/drivers/platform/x86/alienware-wmi.c
--- linux-libre-4.9.129-gnu/drivers/platform/x86/alienware-wmi.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/platform/x86/alienware-wmi.c	2018-09-29 06:07:35.000000000 -0400
@@ -518,6 +518,7 @@ static acpi_status alienware_wmax_comman
 		if (obj && obj->type == ACPI_TYPE_INTEGER)
 			*out_data = (u32) obj->integer.value;
 	}
+	kfree(output.pointer);
 	return status;
 
 }
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/target/iscsi/iscsi_target_auth.c linux-libre-4.9.130-gnu/drivers/target/iscsi/iscsi_target_auth.c
--- linux-libre-4.9.129-gnu/drivers/target/iscsi/iscsi_target_auth.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/target/iscsi/iscsi_target_auth.c	2018-09-29 06:07:35.000000000 -0400
@@ -26,18 +26,6 @@
 #include "iscsi_target_nego.h"
 #include "iscsi_target_auth.h"
 
-static int chap_string_to_hex(unsigned char *dst, unsigned char *src, int len)
-{
-	int j = DIV_ROUND_UP(len, 2), rc;
-
-	rc = hex2bin(dst, src, j);
-	if (rc < 0)
-		pr_debug("CHAP string contains non hex digit symbols\n");
-
-	dst[j] = '\0';
-	return j;
-}
-
 static void chap_binaryhex_to_asciihex(char *dst, char *src, int src_len)
 {
 	int i;
@@ -240,9 +228,16 @@ static int chap_server_compute_md5(
 		pr_err("Could not find CHAP_R.\n");
 		goto out;
 	}
+	if (strlen(chap_r) != MD5_SIGNATURE_SIZE * 2) {
+		pr_err("Malformed CHAP_R\n");
+		goto out;
+	}
+	if (hex2bin(client_digest, chap_r, MD5_SIGNATURE_SIZE) < 0) {
+		pr_err("Malformed CHAP_R\n");
+		goto out;
+	}
 
 	pr_debug("[server] Got CHAP_R=%s\n", chap_r);
-	chap_string_to_hex(client_digest, chap_r, strlen(chap_r));
 
 	tfm = crypto_alloc_shash("md5", 0, 0);
 	if (IS_ERR(tfm)) {
@@ -341,9 +336,7 @@ static int chap_server_compute_md5(
 		pr_err("Could not find CHAP_C.\n");
 		goto out;
 	}
-	pr_debug("[server] Got CHAP_C=%s\n", challenge);
-	challenge_len = chap_string_to_hex(challenge_binhex, challenge,
-				strlen(challenge));
+	challenge_len = DIV_ROUND_UP(strlen(challenge), 2);
 	if (!challenge_len) {
 		pr_err("Unable to convert incoming challenge\n");
 		goto out;
@@ -352,6 +345,11 @@ static int chap_server_compute_md5(
 		pr_err("CHAP_C exceeds maximum binary size of 1024 bytes\n");
 		goto out;
 	}
+	if (hex2bin(challenge_binhex, challenge, challenge_len) < 0) {
+		pr_err("Malformed CHAP_C\n");
+		goto out;
+	}
+	pr_debug("[server] Got CHAP_C=%s\n", challenge);
 	/*
 	 * During mutual authentication, the CHAP_C generated by the
 	 * initiator must not match the original CHAP_C generated by
diff -druNp --no-dereference linux-libre-4.9.129-gnu/drivers/tty/vt/vt_ioctl.c linux-libre-4.9.130-gnu/drivers/tty/vt/vt_ioctl.c
--- linux-libre-4.9.129-gnu/drivers/tty/vt/vt_ioctl.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/drivers/tty/vt/vt_ioctl.c	2018-09-29 06:07:35.000000000 -0400
@@ -31,6 +31,8 @@
 #include <asm/io.h>
 #include <asm/uaccess.h>
 
+#include <linux/nospec.h>
+
 #include <linux/kbd_kern.h>
 #include <linux/vt_kern.h>
 #include <linux/kbd_diacr.h>
@@ -703,6 +705,8 @@ int vt_ioctl(struct tty_struct *tty,
 		if (vsa.console == 0 || vsa.console > MAX_NR_CONSOLES)
 			ret = -ENXIO;
 		else {
+			vsa.console = array_index_nospec(vsa.console,
+							 MAX_NR_CONSOLES + 1);
 			vsa.console--;
 			console_lock();
 			ret = vc_allocate(vsa.console);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/fs/ext4/dir.c linux-libre-4.9.130-gnu/fs/ext4/dir.c
--- linux-libre-4.9.129-gnu/fs/ext4/dir.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/fs/ext4/dir.c	2018-09-29 06:07:35.000000000 -0400
@@ -74,7 +74,7 @@ int __ext4_check_dir_entry(const char *f
 	else if (unlikely(rlen < EXT4_DIR_REC_LEN(de->name_len)))
 		error_msg = "rec_len is too small for name_len";
 	else if (unlikely(((char *) de - buf) + rlen > size))
-		error_msg = "directory entry across range";
+		error_msg = "directory entry overrun";
 	else if (unlikely(le32_to_cpu(de->inode) >
 			le32_to_cpu(EXT4_SB(dir->i_sb)->s_es->s_inodes_count)))
 		error_msg = "inode out of bounds";
@@ -83,18 +83,16 @@ int __ext4_check_dir_entry(const char *f
 
 	if (filp)
 		ext4_error_file(filp, function, line, bh->b_blocknr,
-				"bad entry in directory: %s - offset=%u(%u), "
-				"inode=%u, rec_len=%d, name_len=%d",
-				error_msg, (unsigned) (offset % size),
-				offset, le32_to_cpu(de->inode),
-				rlen, de->name_len);
+				"bad entry in directory: %s - offset=%u, "
+				"inode=%u, rec_len=%d, name_len=%d, size=%d",
+				error_msg, offset, le32_to_cpu(de->inode),
+				rlen, de->name_len, size);
 	else
 		ext4_error_inode(dir, function, line, bh->b_blocknr,
-				"bad entry in directory: %s - offset=%u(%u), "
-				"inode=%u, rec_len=%d, name_len=%d",
-				error_msg, (unsigned) (offset % size),
-				offset, le32_to_cpu(de->inode),
-				rlen, de->name_len);
+				"bad entry in directory: %s - offset=%u, "
+				"inode=%u, rec_len=%d, name_len=%d, size=%d",
+				 error_msg, offset, le32_to_cpu(de->inode),
+				 rlen, de->name_len, size);
 
 	return 1;
 }
diff -druNp --no-dereference linux-libre-4.9.129-gnu/fs/ext4/inline.c linux-libre-4.9.130-gnu/fs/ext4/inline.c
--- linux-libre-4.9.129-gnu/fs/ext4/inline.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/fs/ext4/inline.c	2018-09-29 06:07:35.000000000 -0400
@@ -1754,6 +1754,7 @@ bool empty_inline_dir(struct inode *dir,
 {
 	int err, inline_size;
 	struct ext4_iloc iloc;
+	size_t inline_len;
 	void *inline_pos;
 	unsigned int offset;
 	struct ext4_dir_entry_2 *de;
@@ -1781,8 +1782,9 @@ bool empty_inline_dir(struct inode *dir,
 		goto out;
 	}
 
+	inline_len = ext4_get_inline_size(dir);
 	offset = EXT4_INLINE_DOTDOT_SIZE;
-	while (offset < dir->i_size) {
+	while (offset < inline_len) {
 		de = ext4_get_inline_entry(dir, &iloc, offset,
 					   &inline_pos, &inline_size);
 		if (ext4_check_dir_entry(dir, NULL, de,
diff -druNp --no-dereference linux-libre-4.9.129-gnu/fs/ext4/mmp.c linux-libre-4.9.130-gnu/fs/ext4/mmp.c
--- linux-libre-4.9.129-gnu/fs/ext4/mmp.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/fs/ext4/mmp.c	2018-09-29 06:07:35.000000000 -0400
@@ -48,7 +48,6 @@ static int write_mmp_block(struct super_
 	 */
 	sb_start_write(sb);
 	ext4_mmp_csum_set(sb, mmp);
-	mark_buffer_dirty(bh);
 	lock_buffer(bh);
 	bh->b_end_io = end_buffer_write_sync;
 	get_bh(bh);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/fs/ext4/namei.c linux-libre-4.9.130-gnu/fs/ext4/namei.c
--- linux-libre-4.9.129-gnu/fs/ext4/namei.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/fs/ext4/namei.c	2018-09-29 06:07:35.000000000 -0400
@@ -3527,6 +3527,12 @@ static int ext4_rename(struct inode *old
 	int credits;
 	u8 old_file_type;
 
+	if (new.inode && new.inode->i_nlink == 0) {
+		EXT4_ERROR_INODE(new.inode,
+				 "target of rename is already freed");
+		return -EFSCORRUPTED;
+	}
+
 	if ((ext4_test_inode_flag(new_dir, EXT4_INODE_PROJINHERIT)) &&
 	    (!projid_eq(EXT4_I(new_dir)->i_projid,
 			EXT4_I(old_dentry->d_inode)->i_projid)))
diff -druNp --no-dereference linux-libre-4.9.129-gnu/fs/ext4/resize.c linux-libre-4.9.130-gnu/fs/ext4/resize.c
--- linux-libre-4.9.129-gnu/fs/ext4/resize.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/fs/ext4/resize.c	2018-09-29 06:07:35.000000000 -0400
@@ -18,6 +18,7 @@
 
 int ext4_resize_begin(struct super_block *sb)
 {
+	struct ext4_sb_info *sbi = EXT4_SB(sb);
 	int ret = 0;
 
 	if (!capable(CAP_SYS_RESOURCE))
@@ -28,7 +29,7 @@ int ext4_resize_begin(struct super_block
          * because the user tools have no way of handling this.  Probably a
          * bad time to do it anyways.
          */
-	if (EXT4_SB(sb)->s_sbh->b_blocknr !=
+	if (EXT4_B2C(sbi, sbi->s_sbh->b_blocknr) !=
 	    le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block)) {
 		ext4_warning(sb, "won't resize using backup superblock at %llu",
 			(unsigned long long)EXT4_SB(sb)->s_sbh->b_blocknr);
@@ -1954,6 +1955,26 @@ retry:
 		}
 	}
 
+	/*
+	 * Make sure the last group has enough space so that it's
+	 * guaranteed to have enough space for all metadata blocks
+	 * that it might need to hold.  (We might not need to store
+	 * the inode table blocks in the last block group, but there
+	 * will be cases where this might be needed.)
+	 */
+	if ((ext4_group_first_block_no(sb, n_group) +
+	     ext4_group_overhead_blocks(sb, n_group) + 2 +
+	     sbi->s_itb_per_group + sbi->s_cluster_ratio) >= n_blocks_count) {
+		n_blocks_count = ext4_group_first_block_no(sb, n_group);
+		n_group--;
+		n_blocks_count_retry = 0;
+		if (resize_inode) {
+			iput(resize_inode);
+			resize_inode = NULL;
+		}
+		goto retry;
+	}
+
 	/* extend the last group */
 	if (n_group == o_group)
 		add = n_blocks_count - o_blocks_count;
diff -druNp --no-dereference linux-libre-4.9.129-gnu/fs/ext4/super.c linux-libre-4.9.130-gnu/fs/ext4/super.c
--- linux-libre-4.9.129-gnu/fs/ext4/super.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/fs/ext4/super.c	2018-09-29 06:07:35.000000000 -0400
@@ -2015,6 +2015,8 @@ static int _ext4_show_options(struct seq
 		SEQ_OPTS_PRINT("max_dir_size_kb=%u", sbi->s_max_dir_size_kb);
 	if (test_opt(sb, DATA_ERR_ABORT))
 		SEQ_OPTS_PUTS("data_err=abort");
+	if (DUMMY_ENCRYPTION_ENABLED(sbi))
+		SEQ_OPTS_PUTS("test_dummy_encryption");
 
 	ext4_show_quota_options(seq, sb);
 	return 0;
@@ -4187,11 +4189,13 @@ no_journal:
 	block = ext4_count_free_clusters(sb);
 	ext4_free_blocks_count_set(sbi->s_es, 
 				   EXT4_C2B(sbi, block));
+	ext4_superblock_csum_set(sb);
 	err = percpu_counter_init(&sbi->s_freeclusters_counter, block,
 				  GFP_KERNEL);
 	if (!err) {
 		unsigned long freei = ext4_count_free_inodes(sb);
 		sbi->s_es->s_free_inodes_count = cpu_to_le32(freei);
+		ext4_superblock_csum_set(sb);
 		err = percpu_counter_init(&sbi->s_freeinodes_counter, freei,
 					  GFP_KERNEL);
 	}
diff -druNp --no-dereference linux-libre-4.9.129-gnu/fs/ocfs2/buffer_head_io.c linux-libre-4.9.130-gnu/fs/ocfs2/buffer_head_io.c
--- linux-libre-4.9.129-gnu/fs/ocfs2/buffer_head_io.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/fs/ocfs2/buffer_head_io.c	2018-09-29 06:07:35.000000000 -0400
@@ -341,6 +341,7 @@ int ocfs2_read_blocks(struct ocfs2_cachi
 				 * for this bh as it's not marked locally
 				 * uptodate. */
 				status = -EIO;
+				clear_buffer_needs_validate(bh);
 				put_bh(bh);
 				bhs[i] = NULL;
 				continue;
diff -druNp --no-dereference linux-libre-4.9.129-gnu/include/net/nfc/hci.h linux-libre-4.9.130-gnu/include/net/nfc/hci.h
--- linux-libre-4.9.129-gnu/include/net/nfc/hci.h	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/include/net/nfc/hci.h	2018-09-29 06:07:35.000000000 -0400
@@ -87,7 +87,7 @@ struct nfc_hci_pipe {
  * According to specification 102 622 chapter 4.4 Pipes,
  * the pipe identifier is 7 bits long.
  */
-#define NFC_HCI_MAX_PIPES		127
+#define NFC_HCI_MAX_PIPES		128
 struct nfc_hci_init_data {
 	u8 gate_count;
 	struct nfc_hci_gate gates[NFC_HCI_MAX_CUSTOM_GATES];
diff -druNp --no-dereference linux-libre-4.9.129-gnu/kernel/sched/fair.c linux-libre-4.9.130-gnu/kernel/sched/fair.c
--- linux-libre-4.9.129-gnu/kernel/sched/fair.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/kernel/sched/fair.c	2018-09-29 06:07:35.000000000 -0400
@@ -8639,7 +8639,8 @@ static inline bool vruntime_normalized(s
 	 * - A task which has been woken up by try_to_wake_up() and
 	 *   waiting for actually being woken up by sched_ttwu_pending().
 	 */
-	if (!se->sum_exec_runtime || p->state == TASK_WAKING)
+	if (!se->sum_exec_runtime ||
+	    (p->state == TASK_WAKING && p->sched_remote_wakeup))
 		return true;
 
 	return false;
diff -druNp --no-dereference linux-libre-4.9.129-gnu/kernel/trace/ring_buffer.c linux-libre-4.9.130-gnu/kernel/trace/ring_buffer.c
--- linux-libre-4.9.129-gnu/kernel/trace/ring_buffer.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/kernel/trace/ring_buffer.c	2018-09-29 06:07:35.000000000 -0400
@@ -1504,6 +1504,8 @@ rb_remove_pages(struct ring_buffer_per_c
 	tmp_iter_page = first_page;
 
 	do {
+		cond_resched();
+
 		to_remove_page = tmp_iter_page;
 		rb_inc_page(cpu_buffer, &tmp_iter_page);
 
diff -druNp --no-dereference linux-libre-4.9.129-gnu/Makefile linux-libre-4.9.130-gnu/Makefile
--- linux-libre-4.9.129-gnu/Makefile	2018-09-26 12:31:12.000000000 -0400
+++ linux-libre-4.9.130-gnu/Makefile	2018-09-29 10:18:36.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 129
+SUBLEVEL = 130
 EXTRAVERSION = -gnu
 NAME = Roaring Lionus
 
diff -druNp --no-dereference linux-libre-4.9.129-gnu/mm/shmem.c linux-libre-4.9.130-gnu/mm/shmem.c
--- linux-libre-4.9.129-gnu/mm/shmem.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/mm/shmem.c	2018-09-29 06:07:35.000000000 -0400
@@ -2160,6 +2160,8 @@ static struct inode *shmem_get_inode(str
 			mpol_shared_policy_init(&info->policy, NULL);
 			break;
 		}
+
+		lockdep_annotate_inode_mutex_key(inode);
 	} else
 		shmem_free_inode(sb);
 	return inode;
diff -druNp --no-dereference linux-libre-4.9.129-gnu/net/core/neighbour.c linux-libre-4.9.130-gnu/net/core/neighbour.c
--- linux-libre-4.9.129-gnu/net/core/neighbour.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/net/core/neighbour.c	2018-09-29 06:07:35.000000000 -0400
@@ -1138,6 +1138,12 @@ int neigh_update(struct neighbour *neigh
 		lladdr = neigh->ha;
 	}
 
+	/* Update confirmed timestamp for neighbour entry after we
+	 * received ARP packet even if it doesn't change IP to MAC binding.
+	 */
+	if (new & NUD_CONNECTED)
+		neigh->confirmed = jiffies;
+
 	/* If entry was valid and address is not changed,
 	   do not change entry state, if new one is STALE.
 	 */
@@ -1159,15 +1165,12 @@ int neigh_update(struct neighbour *neigh
 		}
 	}
 
-	/* Update timestamps only once we know we will make a change to the
+	/* Update timestamp only once we know we will make a change to the
 	 * neighbour entry. Otherwise we risk to move the locktime window with
 	 * noop updates and ignore relevant ARP updates.
 	 */
-	if (new != old || lladdr != neigh->ha) {
-		if (new & NUD_CONNECTED)
-			neigh->confirmed = jiffies;
+	if (new != old || lladdr != neigh->ha)
 		neigh->updated = jiffies;
-	}
 
 	if (new != old) {
 		neigh_del_timer(neigh);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/net/ipv4/af_inet.c linux-libre-4.9.130-gnu/net/ipv4/af_inet.c
--- linux-libre-4.9.129-gnu/net/ipv4/af_inet.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/net/ipv4/af_inet.c	2018-09-29 06:07:35.000000000 -0400
@@ -1277,6 +1277,7 @@ struct sk_buff *inet_gso_segment(struct
 		if (encap)
 			skb_reset_inner_headers(skb);
 		skb->network_header = (u8 *)iph - skb->head;
+		skb_reset_mac_len(skb);
 	} while ((skb = skb->next));
 
 out:
diff -druNp --no-dereference linux-libre-4.9.129-gnu/net/ipv4/udp.c linux-libre-4.9.130-gnu/net/ipv4/udp.c
--- linux-libre-4.9.129-gnu/net/ipv4/udp.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/net/ipv4/udp.c	2018-09-29 06:07:35.000000000 -0400
@@ -1730,6 +1730,28 @@ static inline int udp4_csum_init(struct
 							 inet_compute_pseudo);
 }
 
+/* wrapper for udp_queue_rcv_skb tacking care of csum conversion and
+ * return code conversion for ip layer consumption
+ */
+static int udp_unicast_rcv_skb(struct sock *sk, struct sk_buff *skb,
+			       struct udphdr *uh)
+{
+	int ret;
+
+	if (inet_get_convert_csum(sk) && uh->check && !IS_UDPLITE(sk))
+		skb_checksum_try_convert(skb, IPPROTO_UDP, uh->check,
+					 inet_compute_pseudo);
+
+	ret = udp_queue_rcv_skb(sk, skb);
+
+	/* a return value > 0 means to resubmit the input, but
+	 * it wants the return to be -protocol, or 0
+	 */
+	if (ret > 0)
+		return -ret;
+	return 0;
+}
+
 /*
  *	All we need to do is get the socket, and then do a checksum.
  */
@@ -1776,14 +1798,9 @@ int __udp4_lib_rcv(struct sk_buff *skb,
 		if (unlikely(sk->sk_rx_dst != dst))
 			udp_sk_rx_dst_set(sk, dst);
 
-		ret = udp_queue_rcv_skb(sk, skb);
+		ret = udp_unicast_rcv_skb(sk, skb, uh);
 		sock_put(sk);
-		/* a return value > 0 means to resubmit the input, but
-		 * it wants the return to be -protocol, or 0
-		 */
-		if (ret > 0)
-			return -ret;
-		return 0;
+		return ret;
 	}
 
 	if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST))
@@ -1791,22 +1808,8 @@ int __udp4_lib_rcv(struct sk_buff *skb,
 						saddr, daddr, udptable, proto);
 
 	sk = __udp4_lib_lookup_skb(skb, uh->source, uh->dest, udptable);
-	if (sk) {
-		int ret;
-
-		if (inet_get_convert_csum(sk) && uh->check && !IS_UDPLITE(sk))
-			skb_checksum_try_convert(skb, IPPROTO_UDP, uh->check,
-						 inet_compute_pseudo);
-
-		ret = udp_queue_rcv_skb(sk, skb);
-
-		/* a return value > 0 means to resubmit the input, but
-		 * it wants the return to be -protocol, or 0
-		 */
-		if (ret > 0)
-			return -ret;
-		return 0;
-	}
+	if (sk)
+		return udp_unicast_rcv_skb(sk, skb, uh);
 
 	if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
 		goto drop;
diff -druNp --no-dereference linux-libre-4.9.129-gnu/net/ipv6/ip6_offload.c linux-libre-4.9.130-gnu/net/ipv6/ip6_offload.c
--- linux-libre-4.9.129-gnu/net/ipv6/ip6_offload.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/net/ipv6/ip6_offload.c	2018-09-29 06:07:35.000000000 -0400
@@ -113,6 +113,7 @@ static struct sk_buff *ipv6_gso_segment(
 			payload_len = skb->len - nhoff - sizeof(*ipv6h);
 		ipv6h->payload_len = htons(payload_len);
 		skb->network_header = (u8 *)ipv6h - skb->head;
+		skb_reset_mac_len(skb);
 
 		if (udpfrag) {
 			int err = ip6_find_1stfragopt(skb, &prevhdr);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/net/ipv6/ip6_output.c linux-libre-4.9.130-gnu/net/ipv6/ip6_output.c
--- linux-libre-4.9.129-gnu/net/ipv6/ip6_output.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/net/ipv6/ip6_output.c	2018-09-29 06:07:35.000000000 -0400
@@ -201,12 +201,10 @@ int ip6_xmit(const struct sock *sk, stru
 				kfree_skb(skb);
 				return -ENOBUFS;
 			}
+			if (skb->sk)
+				skb_set_owner_w(skb2, skb->sk);
 			consume_skb(skb);
 			skb = skb2;
-			/* skb_set_owner_w() changes sk->sk_wmem_alloc atomically,
-			 * it is safe to call in our context (socket lock not held)
-			 */
-			skb_set_owner_w(skb, (struct sock *)sk);
 		}
 		if (opt->opt_flen)
 			ipv6_push_frag_opts(skb, opt, &proto);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/net/nfc/hci/core.c linux-libre-4.9.130-gnu/net/nfc/hci/core.c
--- linux-libre-4.9.129-gnu/net/nfc/hci/core.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/net/nfc/hci/core.c	2018-09-29 06:07:35.000000000 -0400
@@ -209,6 +209,11 @@ void nfc_hci_cmd_received(struct nfc_hci
 		}
 		create_info = (struct hci_create_pipe_resp *)skb->data;
 
+		if (create_info->pipe >= NFC_HCI_MAX_PIPES) {
+			status = NFC_HCI_ANY_E_NOK;
+			goto exit;
+		}
+
 		/* Save the new created pipe and bind with local gate,
 		 * the description for skb->data[3] is destination gate id
 		 * but since we received this cmd from host controller, we
@@ -232,6 +237,11 @@ void nfc_hci_cmd_received(struct nfc_hci
 		}
 		delete_info = (struct hci_delete_pipe_noti *)skb->data;
 
+		if (delete_info->pipe >= NFC_HCI_MAX_PIPES) {
+			status = NFC_HCI_ANY_E_NOK;
+			goto exit;
+		}
+
 		hdev->pipes[delete_info->pipe].gate = NFC_HCI_INVALID_GATE;
 		hdev->pipes[delete_info->pipe].dest_host = NFC_HCI_INVALID_HOST;
 		break;
diff -druNp --no-dereference linux-libre-4.9.129-gnu/sound/firewire/bebob/bebob.c linux-libre-4.9.130-gnu/sound/firewire/bebob/bebob.c
--- linux-libre-4.9.129-gnu/sound/firewire/bebob/bebob.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/sound/firewire/bebob/bebob.c	2018-09-29 06:07:35.000000000 -0400
@@ -263,6 +263,8 @@ do_registration(struct work_struct *work
 error:
 	mutex_unlock(&devices_mutex);
 	snd_bebob_stream_destroy_duplex(bebob);
+	kfree(bebob->maudio_special_quirk);
+	bebob->maudio_special_quirk = NULL;
 	snd_card_free(bebob->card);
 	dev_info(&bebob->unit->device,
 		 "Sound card registration failed: %d\n", err);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/sound/firewire/bebob/bebob_maudio.c linux-libre-4.9.130-gnu/sound/firewire/bebob/bebob_maudio.c
--- linux-libre-4.9.129-gnu/sound/firewire/bebob/bebob_maudio.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/sound/firewire/bebob/bebob_maudio.c	2018-09-29 06:07:35.000000000 -0400
@@ -96,17 +96,13 @@ int snd_bebob_maudio_load_firmware(struc
 	struct fw_device *device = fw_parent_device(unit);
 	int err, rcode;
 	u64 date;
-	__le32 cues[3] = {
-		cpu_to_le32(MAUDIO_BOOTLOADER_CUE1),
-		cpu_to_le32(MAUDIO_BOOTLOADER_CUE2),
-		cpu_to_le32(MAUDIO_BOOTLOADER_CUE3)
-	};
+	__le32 *cues;
 
 	/* check date of software used to build */
 	err = snd_bebob_read_block(unit, INFO_OFFSET_SW_DATE,
 				   &date, sizeof(u64));
 	if (err < 0)
-		goto end;
+		return err;
 	/*
 	 * firmware version 5058 or later has date later than "20070401", but
 	 * 'date' is not null-terminated.
@@ -114,20 +110,28 @@ int snd_bebob_maudio_load_firmware(struc
 	if (date < 0x3230303730343031LL) {
 		dev_err(&unit->device,
 			"Use firmware version 5058 or later\n");
-		err = -ENOSYS;
-		goto end;
+		return -ENXIO;
 	}
 
+	cues = kmalloc_array(3, sizeof(*cues), GFP_KERNEL);
+	if (!cues)
+		return -ENOMEM;
+
+	cues[0] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE1);
+	cues[1] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE2);
+	cues[2] = cpu_to_le32(MAUDIO_BOOTLOADER_CUE3);
+
 	rcode = fw_run_transaction(device->card, TCODE_WRITE_BLOCK_REQUEST,
 				   device->node_id, device->generation,
 				   device->max_speed, BEBOB_ADDR_REG_REQ,
-				   cues, sizeof(cues));
+				   cues, 3 * sizeof(*cues));
+	kfree(cues);
 	if (rcode != RCODE_COMPLETE) {
 		dev_err(&unit->device,
 			"Failed to send a cue to load firmware\n");
 		err = -EIO;
 	}
-end:
+
 	return err;
 }
 
@@ -290,10 +294,6 @@ snd_bebob_maudio_special_discover(struct
 		bebob->midi_output_ports = 2;
 	}
 end:
-	if (err < 0) {
-		kfree(params);
-		bebob->maudio_special_quirk = NULL;
-	}
 	mutex_unlock(&bebob->mutex);
 	return err;
 }
diff -druNp --no-dereference linux-libre-4.9.129-gnu/sound/firewire/digi00x/digi00x.c linux-libre-4.9.130-gnu/sound/firewire/digi00x/digi00x.c
--- linux-libre-4.9.129-gnu/sound/firewire/digi00x/digi00x.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/sound/firewire/digi00x/digi00x.c	2018-09-29 06:07:35.000000000 -0400
@@ -49,6 +49,7 @@ static void dg00x_free(struct snd_dg00x
 	fw_unit_put(dg00x->unit);
 
 	mutex_destroy(&dg00x->mutex);
+	kfree(dg00x);
 }
 
 static void dg00x_card_free(struct snd_card *card)
diff -druNp --no-dereference linux-libre-4.9.129-gnu/sound/firewire/fireworks/fireworks.c linux-libre-4.9.130-gnu/sound/firewire/fireworks/fireworks.c
--- linux-libre-4.9.129-gnu/sound/firewire/fireworks/fireworks.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/sound/firewire/fireworks/fireworks.c	2018-09-29 06:07:35.000000000 -0400
@@ -301,6 +301,8 @@ error:
 	snd_efw_transaction_remove_instance(efw);
 	snd_efw_stream_destroy_duplex(efw);
 	snd_card_free(efw->card);
+	kfree(efw->resp_buf);
+	efw->resp_buf = NULL;
 	dev_info(&efw->unit->device,
 		 "Sound card registration failed: %d\n", err);
 }
diff -druNp --no-dereference linux-libre-4.9.129-gnu/sound/firewire/oxfw/oxfw.c linux-libre-4.9.130-gnu/sound/firewire/oxfw/oxfw.c
--- linux-libre-4.9.129-gnu/sound/firewire/oxfw/oxfw.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/sound/firewire/oxfw/oxfw.c	2018-09-29 06:07:35.000000000 -0400
@@ -135,6 +135,7 @@ static void oxfw_free(struct snd_oxfw *o
 
 	kfree(oxfw->spec);
 	mutex_destroy(&oxfw->mutex);
+	kfree(oxfw);
 }
 
 /*
@@ -212,6 +213,7 @@ static int detect_quirks(struct snd_oxfw
 static void do_registration(struct work_struct *work)
 {
 	struct snd_oxfw *oxfw = container_of(work, struct snd_oxfw, dwork.work);
+	int i;
 	int err;
 
 	if (oxfw->registered)
@@ -274,7 +276,15 @@ error:
 	snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream);
 	if (oxfw->has_output)
 		snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream);
+	for (i = 0; i < SND_OXFW_STREAM_FORMAT_ENTRIES; ++i) {
+		kfree(oxfw->tx_stream_formats[i]);
+		oxfw->tx_stream_formats[i] = NULL;
+		kfree(oxfw->rx_stream_formats[i]);
+		oxfw->rx_stream_formats[i] = NULL;
+	}
 	snd_card_free(oxfw->card);
+	kfree(oxfw->spec);
+	oxfw->spec = NULL;
 	dev_info(&oxfw->unit->device,
 		 "Sound card registration failed: %d\n", err);
 }
diff -druNp --no-dereference linux-libre-4.9.129-gnu/sound/firewire/tascam/tascam.c linux-libre-4.9.130-gnu/sound/firewire/tascam/tascam.c
--- linux-libre-4.9.129-gnu/sound/firewire/tascam/tascam.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/sound/firewire/tascam/tascam.c	2018-09-29 06:07:35.000000000 -0400
@@ -93,6 +93,7 @@ static void tscm_free(struct snd_tscm *t
 	fw_unit_put(tscm->unit);
 
 	mutex_destroy(&tscm->mutex);
+	kfree(tscm);
 }
 
 static void tscm_card_free(struct snd_card *card)
diff -druNp --no-dereference linux-libre-4.9.129-gnu/sound/pci/emu10k1/emufx.c linux-libre-4.9.130-gnu/sound/pci/emu10k1/emufx.c
--- linux-libre-4.9.129-gnu/sound/pci/emu10k1/emufx.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/sound/pci/emu10k1/emufx.c	2018-09-29 06:07:35.000000000 -0400
@@ -2520,7 +2520,7 @@ static int snd_emu10k1_fx8010_ioctl(stru
 		emu->support_tlv = 1;
 		return put_user(SNDRV_EMU10K1_VERSION, (int __user *)argp);
 	case SNDRV_EMU10K1_IOCTL_INFO:
-		info = kmalloc(sizeof(*info), GFP_KERNEL);
+		info = kzalloc(sizeof(*info), GFP_KERNEL);
 		if (!info)
 			return -ENOMEM;
 		snd_emu10k1_fx8010_info(emu, info);
diff -druNp --no-dereference linux-libre-4.9.129-gnu/sound/soc/codecs/cs4265.c linux-libre-4.9.130-gnu/sound/soc/codecs/cs4265.c
--- linux-libre-4.9.129-gnu/sound/soc/codecs/cs4265.c	2018-09-26 02:36:41.000000000 -0400
+++ linux-libre-4.9.130-gnu/sound/soc/codecs/cs4265.c	2018-09-29 06:07:35.000000000 -0400
@@ -157,8 +157,8 @@ static const struct snd_kcontrol_new cs4
 	SOC_SINGLE("Validity Bit Control Switch", CS4265_SPDIF_CTL2,
 				3, 1, 0),
 	SOC_ENUM("SPDIF Mono/Stereo", spdif_mono_stereo_enum),
-	SOC_SINGLE("MMTLR Data Switch", 0,
-				1, 1, 0),
+	SOC_SINGLE("MMTLR Data Switch", CS4265_SPDIF_CTL2,
+				0, 1, 0),
 	SOC_ENUM("Mono Channel Select", spdif_mono_select_enum),
 	SND_SOC_BYTES("C Data Buffer", CS4265_C_DATA_BUFF, 24),
 };
