diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/acpi/device_pm.c linux-libre-4.9.222-gnu/drivers/acpi/device_pm.c
--- linux-libre-4.9.221-gnu/drivers/acpi/device_pm.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/acpi/device_pm.c	2020-05-05 13:14:41.000000000 -0400
@@ -226,13 +226,13 @@ int acpi_device_set_power(struct acpi_de
  end:
 	if (result) {
 		dev_warn(&device->dev, "Failed to change power state to %s\n",
-			 acpi_power_state_string(state));
+			 acpi_power_state_string(target_state));
 	} else {
 		device->power.state = target_state;
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
 				  "Device [%s] transitioned to %s\n",
 				  device->pnp.bus_id,
-				  acpi_power_state_string(state)));
+				  acpi_power_state_string(target_state)));
 	}
 
 	return result;
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/dma/dmatest.c linux-libre-4.9.222-gnu/drivers/dma/dmatest.c
--- linux-libre-4.9.221-gnu/drivers/dma/dmatest.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/dma/dmatest.c	2020-05-05 13:14:41.000000000 -0400
@@ -505,8 +505,8 @@ static int dmatest_func(void *data)
 	flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT;
 
 	ktime = ktime_get();
-	while (!kthread_should_stop()
-	       && !(params->iterations && total_tests >= params->iterations)) {
+	while (!(kthread_should_stop() ||
+	       (params->iterations && total_tests >= params->iterations))) {
 		struct dma_async_tx_descriptor *tx = NULL;
 		struct dmaengine_unmap_data *um;
 		dma_addr_t srcs[src_cnt];
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/gpu/drm/drm_edid.c linux-libre-4.9.222-gnu/drivers/gpu/drm/drm_edid.c
--- linux-libre-4.9.221-gnu/drivers/gpu/drm/drm_edid.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/gpu/drm/drm_edid.c	2020-05-05 13:14:41.000000000 -0400
@@ -3970,7 +3970,7 @@ static struct drm_display_mode *drm_mode
 	struct drm_display_mode *mode;
 	unsigned pixel_clock = (timings->pixel_clock[0] |
 				(timings->pixel_clock[1] << 8) |
-				(timings->pixel_clock[2] << 16));
+				(timings->pixel_clock[2] << 16)) + 1;
 	unsigned hactive = (timings->hactive[0] | timings->hactive[1] << 8) + 1;
 	unsigned hblank = (timings->hblank[0] | timings->hblank[1] << 8) + 1;
 	unsigned hsync = (timings->hsync[0] | (timings->hsync[1] & 0x7f) << 8) + 1;
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/gpu/drm/qxl/qxl_cmd.c linux-libre-4.9.222-gnu/drivers/gpu/drm/qxl/qxl_cmd.c
--- linux-libre-4.9.221-gnu/drivers/gpu/drm/qxl/qxl_cmd.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/gpu/drm/qxl/qxl_cmd.c	2020-05-05 13:14:41.000000000 -0400
@@ -500,9 +500,10 @@ int qxl_hw_surface_alloc(struct qxl_devi
 		return ret;
 
 	ret = qxl_release_reserve_list(release, true);
-	if (ret)
+	if (ret) {
+		qxl_release_free(qdev, release);
 		return ret;
-
+	}
 	cmd = (struct qxl_surface_cmd *)qxl_release_map(qdev, release);
 	cmd->type = QXL_SURFACE_CMD_CREATE;
 	cmd->flags = QXL_SURF_FLAG_KEEP_DATA;
@@ -528,8 +529,8 @@ int qxl_hw_surface_alloc(struct qxl_devi
 	/* no need to add a release to the fence for this surface bo,
 	   since it is only released when we ask to destroy the surface
 	   and it would never signal otherwise */
-	qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);
 
 	surf->hw_surf_alloc = true;
 	spin_lock(&qdev->surf_id_idr_lock);
@@ -571,9 +572,8 @@ int qxl_hw_surface_dealloc(struct qxl_de
 	cmd->surface_id = id;
 	qxl_release_unmap(qdev, release, &cmd->release_info);
 
-	qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);
-
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_command_ring_release(qdev, release, QXL_CMD_SURFACE, false);
 
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/gpu/drm/qxl/qxl_display.c linux-libre-4.9.222-gnu/drivers/gpu/drm/qxl/qxl_display.c
--- linux-libre-4.9.221-gnu/drivers/gpu/drm/qxl/qxl_display.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/gpu/drm/qxl/qxl_display.c	2020-05-05 13:14:41.000000000 -0400
@@ -292,8 +292,8 @@ qxl_hide_cursor(struct qxl_device *qdev)
 	cmd->type = QXL_CURSOR_HIDE;
 	qxl_release_unmap(qdev, release, &cmd->release_info);
 
-	qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
 	return 0;
 }
 
@@ -333,8 +333,8 @@ static int qxl_crtc_apply_cursor(struct
 	cmd->u.set.visible = 1;
 	qxl_release_unmap(qdev, release, &cmd->release_info);
 
-	qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
 
 	return ret;
 
@@ -436,8 +436,8 @@ static int qxl_crtc_cursor_set2(struct d
 	cmd->u.set.visible = 1;
 	qxl_release_unmap(qdev, release, &cmd->release_info);
 
-	qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
 
 	/* finish with the userspace bo */
 	ret = qxl_bo_reserve(user_bo, false);
@@ -497,8 +497,8 @@ static int qxl_crtc_cursor_move(struct d
 	cmd->u.position.y = qcrtc->cur_y + qcrtc->hot_spot_y;
 	qxl_release_unmap(qdev, release, &cmd->release_info);
 
-	qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
 
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/gpu/drm/qxl/qxl_draw.c linux-libre-4.9.222-gnu/drivers/gpu/drm/qxl/qxl_draw.c
--- linux-libre-4.9.221-gnu/drivers/gpu/drm/qxl/qxl_draw.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/gpu/drm/qxl/qxl_draw.c	2020-05-05 13:14:41.000000000 -0400
@@ -241,8 +241,8 @@ void qxl_draw_opaque_fb(const struct qxl
 		qxl_bo_physical_address(qdev, dimage->bo, 0);
 	qxl_release_unmap(qdev, release, &drawable->release_info);
 
-	qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
 
 out_free_palette:
 	if (palette_bo)
@@ -348,9 +348,10 @@ void qxl_draw_dirty_fb(struct qxl_device
 		goto out_release_backoff;
 
 	rects = drawable_set_clipping(qdev, num_clips, clips_bo);
-	if (!rects)
+	if (!rects) {
+		ret = -EINVAL;
 		goto out_release_backoff;
-
+	}
 	drawable = (struct qxl_drawable *)qxl_release_map(qdev, release);
 
 	drawable->clip.type = SPICE_CLIP_TYPE_RECTS;
@@ -381,8 +382,8 @@ void qxl_draw_dirty_fb(struct qxl_device
 	}
 	qxl_bo_kunmap(clips_bo);
 
-	qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
 
 out_release_backoff:
 	if (ret)
@@ -432,8 +433,8 @@ void qxl_draw_copyarea(struct qxl_device
 	drawable->u.copy_bits.src_pos.y = sy;
 	qxl_release_unmap(qdev, release, &drawable->release_info);
 
-	qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
 
 out_free_release:
 	if (ret)
@@ -476,8 +477,8 @@ void qxl_draw_fill(struct qxl_draw_fill
 
 	qxl_release_unmap(qdev, release, &drawable->release_info);
 
-	qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
 	qxl_release_fence_buffer_objects(release);
+	qxl_push_command_ring_release(qdev, release, QXL_CMD_DRAW, false);
 
 out_free_release:
 	if (ret)
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/gpu/drm/qxl/qxl_ioctl.c linux-libre-4.9.222-gnu/drivers/gpu/drm/qxl/qxl_ioctl.c
--- linux-libre-4.9.221-gnu/drivers/gpu/drm/qxl/qxl_ioctl.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/gpu/drm/qxl/qxl_ioctl.c	2020-05-05 13:14:41.000000000 -0400
@@ -256,11 +256,8 @@ static int qxl_process_single_command(st
 			apply_surf_reloc(qdev, &reloc_info[i]);
 	}
 
+	qxl_release_fence_buffer_objects(release);
 	ret = qxl_push_command_ring_release(qdev, release, cmd->type, true);
-	if (ret)
-		qxl_release_backoff_reserve_list(release);
-	else
-		qxl_release_fence_buffer_objects(release);
 
 out_free_bos:
 out_free_release:
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/infiniband/hw/mlx4/main.c linux-libre-4.9.222-gnu/drivers/infiniband/hw/mlx4/main.c
--- linux-libre-4.9.221-gnu/drivers/infiniband/hw/mlx4/main.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/infiniband/hw/mlx4/main.c	2020-05-05 13:14:41.000000000 -0400
@@ -1589,8 +1589,9 @@ static int __mlx4_ib_create_default_rule
 	int i;
 
 	for (i = 0; i < ARRAY_SIZE(pdefault_rules->rules_create_list); i++) {
+		union ib_flow_spec ib_spec = {};
 		int ret;
-		union ib_flow_spec ib_spec;
+
 		switch (pdefault_rules->rules_create_list[i]) {
 		case 0:
 			/* no rule */
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/iommu/amd_iommu_init.c linux-libre-4.9.222-gnu/drivers/iommu/amd_iommu_init.c
--- linux-libre-4.9.221-gnu/drivers/iommu/amd_iommu_init.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/iommu/amd_iommu_init.c	2020-05-05 13:14:41.000000000 -0400
@@ -2574,7 +2574,7 @@ static int __init parse_amd_iommu_intr(c
 {
 	for (; *str; ++str) {
 		if (strncmp(str, "legacy", 6) == 0) {
-			amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY;
+			amd_iommu_guest_ir = AMD_IOMMU_GUEST_IR_LEGACY_GA;
 			break;
 		}
 		if (strncmp(str, "vapic", 5) == 0) {
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/md/dm-verity-fec.c linux-libre-4.9.222-gnu/drivers/md/dm-verity-fec.c
--- linux-libre-4.9.221-gnu/drivers/md/dm-verity-fec.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/md/dm-verity-fec.c	2020-05-05 13:14:41.000000000 -0400
@@ -447,7 +447,7 @@ int verity_fec_decode(struct dm_verity *
 	fio->level++;
 
 	if (type == DM_VERITY_BLOCK_TYPE_METADATA)
-		block += v->data_blocks;
+		block = block - v->hash_start + v->data_blocks;
 
 	/*
 	 * For RS(M, N), the continuous FEC data is divided into blocks of N
diff -druNp --no-dereference linux-libre-4.9.221-gnu/drivers/vfio/vfio_iommu_type1.c linux-libre-4.9.222-gnu/drivers/vfio/vfio_iommu_type1.c
--- linux-libre-4.9.221-gnu/drivers/vfio/vfio_iommu_type1.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/drivers/vfio/vfio_iommu_type1.c	2020-05-05 13:14:41.000000000 -0400
@@ -229,8 +229,8 @@ static int vaddr_get_pfn(unsigned long v
 	vma = find_vma_intersection(current->mm, vaddr, vaddr + 1);
 
 	if (vma && vma->vm_flags & VM_PFNMAP) {
-		*pfn = ((vaddr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
-		if (is_invalid_reserved_pfn(*pfn))
+		if (!follow_pfn(vma, vaddr, pfn) &&
+		    is_invalid_reserved_pfn(*pfn))
 			ret = 0;
 	}
 
diff -druNp --no-dereference linux-libre-4.9.221-gnu/fs/btrfs/extent-tree.c linux-libre-4.9.222-gnu/fs/btrfs/extent-tree.c
--- linux-libre-4.9.221-gnu/fs/btrfs/extent-tree.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/fs/btrfs/extent-tree.c	2020-05-05 13:14:41.000000000 -0400
@@ -10645,7 +10645,7 @@ int btrfs_remove_block_group(struct btrf
 	path = btrfs_alloc_path();
 	if (!path) {
 		ret = -ENOMEM;
-		goto out;
+		goto out_put_group;
 	}
 
 	/*
@@ -10684,7 +10684,7 @@ int btrfs_remove_block_group(struct btrf
 		ret = btrfs_orphan_add(trans, inode);
 		if (ret) {
 			btrfs_add_delayed_iput(inode);
-			goto out;
+			goto out_put_group;
 		}
 		clear_nlink(inode);
 		/* One for the block groups ref */
@@ -10707,13 +10707,13 @@ int btrfs_remove_block_group(struct btrf
 
 	ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1);
 	if (ret < 0)
-		goto out;
+		goto out_put_group;
 	if (ret > 0)
 		btrfs_release_path(path);
 	if (ret == 0) {
 		ret = btrfs_del_item(trans, tree_root, path);
 		if (ret)
-			goto out;
+			goto out_put_group;
 		btrfs_release_path(path);
 	}
 
@@ -10871,9 +10871,9 @@ int btrfs_remove_block_group(struct btrf
 
 	ret = remove_block_group_free_space(trans, root->fs_info, block_group);
 	if (ret)
-		goto out;
+		goto out_put_group;
 
-	btrfs_put_block_group(block_group);
+	/* Once for the block groups rbtree */
 	btrfs_put_block_group(block_group);
 
 	ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
@@ -10883,6 +10883,10 @@ int btrfs_remove_block_group(struct btrf
 		goto out;
 
 	ret = btrfs_del_item(trans, root, path);
+
+out_put_group:
+	/* Once for the lookup reference */
+	btrfs_put_block_group(block_group);
 out:
 	btrfs_free_path(path);
 	return ret;
diff -druNp --no-dereference linux-libre-4.9.221-gnu/fs/ext4/inode.c linux-libre-4.9.222-gnu/fs/ext4/inode.c
--- linux-libre-4.9.221-gnu/fs/ext4/inode.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/fs/ext4/inode.c	2020-05-05 13:14:41.000000000 -0400
@@ -4494,7 +4494,7 @@ struct inode *__ext4_iget(struct super_b
 	gid_t i_gid;
 	projid_t i_projid;
 
-	if (((flags & EXT4_IGET_NORMAL) &&
+	if ((!(flags & EXT4_IGET_SPECIAL) &&
 	     (ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO)) ||
 	    (ino < EXT4_ROOT_INO) ||
 	    (ino > le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count))) {
diff -druNp --no-dereference linux-libre-4.9.221-gnu/fs/nfs/nfs3acl.c linux-libre-4.9.222-gnu/fs/nfs/nfs3acl.c
--- linux-libre-4.9.221-gnu/fs/nfs/nfs3acl.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/fs/nfs/nfs3acl.c	2020-05-05 13:14:41.000000000 -0400
@@ -252,37 +252,45 @@ int nfs3_proc_setacls(struct inode *inod
 
 int nfs3_set_acl(struct inode *inode, struct posix_acl *acl, int type)
 {
-	struct posix_acl *alloc = NULL, *dfacl = NULL;
+	struct posix_acl *orig = acl, *dfacl = NULL, *alloc;
 	int status;
 
 	if (S_ISDIR(inode->i_mode)) {
 		switch(type) {
 		case ACL_TYPE_ACCESS:
-			alloc = dfacl = get_acl(inode, ACL_TYPE_DEFAULT);
+			alloc = get_acl(inode, ACL_TYPE_DEFAULT);
 			if (IS_ERR(alloc))
 				goto fail;
+			dfacl = alloc;
 			break;
 
 		case ACL_TYPE_DEFAULT:
-			dfacl = acl;
-			alloc = acl = get_acl(inode, ACL_TYPE_ACCESS);
+			alloc = get_acl(inode, ACL_TYPE_ACCESS);
 			if (IS_ERR(alloc))
 				goto fail;
+			dfacl = acl;
+			acl = alloc;
 			break;
 		}
 	}
 
 	if (acl == NULL) {
-		alloc = acl = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
+		alloc = posix_acl_from_mode(inode->i_mode, GFP_KERNEL);
 		if (IS_ERR(alloc))
 			goto fail;
+		acl = alloc;
 	}
 	status = __nfs3_proc_setacls(inode, acl, dfacl);
-	posix_acl_release(alloc);
+out:
+	if (acl != orig)
+		posix_acl_release(acl);
+	if (dfacl != orig)
+		posix_acl_release(dfacl);
 	return status;
 
 fail:
-	return PTR_ERR(alloc);
+	status = PTR_ERR(alloc);
+	goto out;
 }
 
 const struct xattr_handler *nfs3_xattr_handlers[] = {
diff -druNp --no-dereference linux-libre-4.9.221-gnu/kernel/power/hibernate.c linux-libre-4.9.222-gnu/kernel/power/hibernate.c
--- linux-libre-4.9.221-gnu/kernel/power/hibernate.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/kernel/power/hibernate.c	2020-05-05 13:14:41.000000000 -0400
@@ -892,6 +892,13 @@ static int software_resume(void)
 	error = freeze_processes();
 	if (error)
 		goto Close_Finish;
+
+	error = freeze_kernel_threads();
+	if (error) {
+		thaw_processes();
+		goto Close_Finish;
+	}
+
 	error = load_image_and_restore();
 	thaw_processes();
  Finish:
diff -druNp --no-dereference linux-libre-4.9.221-gnu/Makefile linux-libre-4.9.222-gnu/Makefile
--- linux-libre-4.9.221-gnu/Makefile	2020-05-03 09:09:55.000000000 -0400
+++ linux-libre-4.9.222-gnu/Makefile	2020-05-05 14:30:33.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 221
+SUBLEVEL = 222
 EXTRAVERSION = -gnu
 NAME = Roaring Lionus
 
diff -druNp --no-dereference linux-libre-4.9.221-gnu/security/selinux/hooks.c linux-libre-4.9.222-gnu/security/selinux/hooks.c
--- linux-libre-4.9.221-gnu/security/selinux/hooks.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/security/selinux/hooks.c	2020-05-05 13:14:41.000000000 -0400
@@ -5002,39 +5002,59 @@ static int selinux_tun_dev_open(void *se
 
 static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb)
 {
-	int err = 0;
-	u32 perm;
+	int rc = 0;
+	unsigned int msg_len;
+	unsigned int data_len = skb->len;
+	unsigned char *data = skb->data;
 	struct nlmsghdr *nlh;
 	struct sk_security_struct *sksec = sk->sk_security;
+	u16 sclass = sksec->sclass;
+	u32 perm;
 
-	if (skb->len < NLMSG_HDRLEN) {
-		err = -EINVAL;
-		goto out;
-	}
-	nlh = nlmsg_hdr(skb);
+	while (data_len >= nlmsg_total_size(0)) {
+		nlh = (struct nlmsghdr *)data;
 
-	err = selinux_nlmsg_lookup(sksec->sclass, nlh->nlmsg_type, &perm);
-	if (err) {
-		if (err == -EINVAL) {
+		/* NOTE: the nlmsg_len field isn't reliably set by some netlink
+		 *       users which means we can't reject skb's with bogus
+		 *       length fields; our solution is to follow what
+		 *       netlink_rcv_skb() does and simply skip processing at
+		 *       messages with length fields that are clearly junk
+		 */
+		if (nlh->nlmsg_len < NLMSG_HDRLEN || nlh->nlmsg_len > data_len)
+			return 0;
+
+		rc = selinux_nlmsg_lookup(sclass, nlh->nlmsg_type, &perm);
+		if (rc == 0) {
+			rc = sock_has_perm(current, sk, perm);
+			if (rc)
+				return rc;
+		} else if (rc == -EINVAL) {
+			/* -EINVAL is a missing msg/perm mapping */
 			pr_warn_ratelimited("SELinux: unrecognized netlink"
-			       " message: protocol=%hu nlmsg_type=%hu sclass=%s"
-			       " pig=%d comm=%s\n",
-			       sk->sk_protocol, nlh->nlmsg_type,
-			       secclass_map[sksec->sclass - 1].name,
-			       task_pid_nr(current), current->comm);
-			if (!selinux_enforcing || security_get_allow_unknown())
-				err = 0;
+				" message: protocol=%hu nlmsg_type=%hu sclass=%s"
+				" pid=%d comm=%s\n",
+				sk->sk_protocol, nlh->nlmsg_type,
+				secclass_map[sclass - 1].name,
+				task_pid_nr(current), current->comm);
+			if (selinux_enforcing && !security_get_allow_unknown())
+				return rc;
+			rc = 0;
+		} else if (rc == -ENOENT) {
+			/* -ENOENT is a missing socket/class mapping, ignore */
+			rc = 0;
+		} else {
+			return rc;
 		}
 
-		/* Ignore */
-		if (err == -ENOENT)
-			err = 0;
-		goto out;
+		/* move to the next message after applying netlink padding */
+		msg_len = NLMSG_ALIGN(nlh->nlmsg_len);
+		if (msg_len >= data_len)
+			return 0;
+		data_len -= msg_len;
+		data += msg_len;
 	}
 
-	err = sock_has_perm(current, sk, perm);
-out:
-	return err;
+	return rc;
 }
 
 #ifdef CONFIG_NETFILTER
diff -druNp --no-dereference linux-libre-4.9.221-gnu/sound/core/oss/pcm_plugin.c linux-libre-4.9.222-gnu/sound/core/oss/pcm_plugin.c
--- linux-libre-4.9.221-gnu/sound/core/oss/pcm_plugin.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/sound/core/oss/pcm_plugin.c	2020-05-05 13:14:41.000000000 -0400
@@ -211,21 +211,23 @@ static snd_pcm_sframes_t plug_client_siz
 	if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		plugin = snd_pcm_plug_last(plug);
 		while (plugin && drv_frames > 0) {
-			if (check_size && drv_frames > plugin->buf_frames)
-				drv_frames = plugin->buf_frames;
 			plugin_prev = plugin->prev;
 			if (plugin->src_frames)
 				drv_frames = plugin->src_frames(plugin, drv_frames);
+			if (check_size && plugin->buf_frames &&
+			    drv_frames > plugin->buf_frames)
+				drv_frames = plugin->buf_frames;
 			plugin = plugin_prev;
 		}
 	} else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
 		plugin = snd_pcm_plug_first(plug);
 		while (plugin && drv_frames > 0) {
 			plugin_next = plugin->next;
+			if (check_size && plugin->buf_frames &&
+			    drv_frames > plugin->buf_frames)
+				drv_frames = plugin->buf_frames;
 			if (plugin->dst_frames)
 				drv_frames = plugin->dst_frames(plugin, drv_frames);
-			if (check_size && drv_frames > plugin->buf_frames)
-				drv_frames = plugin->buf_frames;
 			plugin = plugin_next;
 		}
 	} else
@@ -251,26 +253,28 @@ static snd_pcm_sframes_t plug_slave_size
 		plugin = snd_pcm_plug_first(plug);
 		while (plugin && frames > 0) {
 			plugin_next = plugin->next;
+			if (check_size && plugin->buf_frames &&
+			    frames > plugin->buf_frames)
+				frames = plugin->buf_frames;
 			if (plugin->dst_frames) {
 				frames = plugin->dst_frames(plugin, frames);
 				if (frames < 0)
 					return frames;
 			}
-			if (check_size && frames > plugin->buf_frames)
-				frames = plugin->buf_frames;
 			plugin = plugin_next;
 		}
 	} else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
 		plugin = snd_pcm_plug_last(plug);
 		while (plugin) {
-			if (check_size && frames > plugin->buf_frames)
-				frames = plugin->buf_frames;
 			plugin_prev = plugin->prev;
 			if (plugin->src_frames) {
 				frames = plugin->src_frames(plugin, frames);
 				if (frames < 0)
 					return frames;
 			}
+			if (check_size && plugin->buf_frames &&
+			    frames > plugin->buf_frames)
+				frames = plugin->buf_frames;
 			plugin = plugin_prev;
 		}
 	} else
diff -druNp --no-dereference linux-libre-4.9.221-gnu/sound/isa/opti9xx/miro.c linux-libre-4.9.222-gnu/sound/isa/opti9xx/miro.c
--- linux-libre-4.9.221-gnu/sound/isa/opti9xx/miro.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/sound/isa/opti9xx/miro.c	2020-05-05 13:14:41.000000000 -0400
@@ -875,10 +875,13 @@ static void snd_miro_write(struct snd_mi
 	spin_unlock_irqrestore(&chip->lock, flags);
 }
 
+static inline void snd_miro_write_mask(struct snd_miro *chip,
+		unsigned char reg, unsigned char value, unsigned char mask)
+{
+	unsigned char oldval = snd_miro_read(chip, reg);
 
-#define snd_miro_write_mask(chip, reg, value, mask)	\
-	snd_miro_write(chip, reg,			\
-		(snd_miro_read(chip, reg) & ~(mask)) | ((value) & (mask)))
+	snd_miro_write(chip, reg, (oldval & ~mask) | (value & mask));
+}
 
 /*
  *  Proc Interface
diff -druNp --no-dereference linux-libre-4.9.221-gnu/sound/isa/opti9xx/opti92x-ad1848.c linux-libre-4.9.222-gnu/sound/isa/opti9xx/opti92x-ad1848.c
--- linux-libre-4.9.221-gnu/sound/isa/opti9xx/opti92x-ad1848.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/sound/isa/opti9xx/opti92x-ad1848.c	2020-05-05 13:14:41.000000000 -0400
@@ -327,10 +327,13 @@ static void snd_opti9xx_write(struct snd
 }
 
 
-#define snd_opti9xx_write_mask(chip, reg, value, mask)	\
-	snd_opti9xx_write(chip, reg,			\
-		(snd_opti9xx_read(chip, reg) & ~(mask)) | ((value) & (mask)))
+static inline void snd_opti9xx_write_mask(struct snd_opti9xx *chip,
+		unsigned char reg, unsigned char value, unsigned char mask)
+{
+	unsigned char oldval = snd_opti9xx_read(chip, reg);
 
+	snd_opti9xx_write(chip, reg, (oldval & ~mask) | (value & mask));
+}
 
 static int snd_opti9xx_configure(struct snd_opti9xx *chip,
 					   long port,
diff -druNp --no-dereference linux-libre-4.9.221-gnu/sound/pci/hda/patch_hdmi.c linux-libre-4.9.222-gnu/sound/pci/hda/patch_hdmi.c
--- linux-libre-4.9.221-gnu/sound/pci/hda/patch_hdmi.c	2020-05-02 11:23:20.000000000 -0400
+++ linux-libre-4.9.222-gnu/sound/pci/hda/patch_hdmi.c	2020-05-05 13:14:41.000000000 -0400
@@ -1699,8 +1699,10 @@ static bool check_non_pcm_per_cvt(struct
 	/* Add sanity check to pass klockwork check.
 	 * This should never happen.
 	 */
-	if (WARN_ON(spdif == NULL))
+	if (WARN_ON(spdif == NULL)) {
+		mutex_unlock(&codec->spdif_mutex);
 		return true;
+	}
 	non_pcm = !!(spdif->status & IEC958_AES0_NONAUDIO);
 	mutex_unlock(&codec->spdif_mutex);
 	return non_pcm;
