diff -druNp --no-dereference linux-libre-4.9.150-gnu/drivers/acpi/power.c linux-libre-4.9.151-gnu/drivers/acpi/power.c
--- linux-libre-4.9.150-gnu/drivers/acpi/power.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/drivers/acpi/power.c	2019-01-16 16:12:33.000000000 -0500
@@ -131,6 +131,23 @@ void acpi_power_resources_list_free(stru
 	}
 }
 
+static bool acpi_power_resource_is_dup(union acpi_object *package,
+				       unsigned int start, unsigned int i)
+{
+	acpi_handle rhandle, dup;
+	unsigned int j;
+
+	/* The caller is expected to check the package element types */
+	rhandle = package->package.elements[i].reference.handle;
+	for (j = start; j < i; j++) {
+		dup = package->package.elements[j].reference.handle;
+		if (dup == rhandle)
+			return true;
+	}
+
+	return false;
+}
+
 int acpi_extract_power_resources(union acpi_object *package, unsigned int start,
 				 struct list_head *list)
 {
@@ -150,6 +167,11 @@ int acpi_extract_power_resources(union a
 			err = -ENODEV;
 			break;
 		}
+
+		/* Some ACPI tables contain duplicate power resource references */
+		if (acpi_power_resource_is_dup(package, start, i))
+			continue;
+
 		err = acpi_add_power_resource(rhandle);
 		if (err)
 			break;
diff -druNp --no-dereference linux-libre-4.9.150-gnu/drivers/block/rbd.c linux-libre-4.9.151-gnu/drivers/block/rbd.c
--- linux-libre-4.9.150-gnu/drivers/block/rbd.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/drivers/block/rbd.c	2019-01-16 16:12:33.000000000 -0500
@@ -6346,7 +6346,6 @@ static ssize_t do_rbd_remove(struct bus_
 	struct list_head *tmp;
 	int dev_id;
 	char opt_buf[6];
-	bool already = false;
 	bool force = false;
 	int ret;
 
@@ -6379,13 +6378,13 @@ static ssize_t do_rbd_remove(struct bus_
 		spin_lock_irq(&rbd_dev->lock);
 		if (rbd_dev->open_count && !force)
 			ret = -EBUSY;
-		else
-			already = test_and_set_bit(RBD_DEV_FLAG_REMOVING,
-							&rbd_dev->flags);
+		else if (test_and_set_bit(RBD_DEV_FLAG_REMOVING,
+					  &rbd_dev->flags))
+			ret = -EINPROGRESS;
 		spin_unlock_irq(&rbd_dev->lock);
 	}
 	spin_unlock(&rbd_dev_list_lock);
-	if (ret < 0 || already)
+	if (ret)
 		return ret;
 
 	if (force) {
diff -druNp --no-dereference linux-libre-4.9.150-gnu/drivers/i2c/i2c-dev.c linux-libre-4.9.151-gnu/drivers/i2c/i2c-dev.c
--- linux-libre-4.9.150-gnu/drivers/i2c/i2c-dev.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/drivers/i2c/i2c-dev.c	2019-01-16 16:12:33.000000000 -0500
@@ -461,9 +461,15 @@ static long i2cdev_ioctl(struct file *fi
 		return i2cdev_ioctl_smbus(client, arg);
 
 	case I2C_RETRIES:
+		if (arg > INT_MAX)
+			return -EINVAL;
+
 		client->adapter->retries = arg;
 		break;
 	case I2C_TIMEOUT:
+		if (arg > INT_MAX)
+			return -EINVAL;
+
 		/* For historical reasons, user-space sets the timeout
 		 * value in units of 10 ms.
 		 */
diff -druNp --no-dereference linux-libre-4.9.150-gnu/drivers/usb/class/cdc-acm.c linux-libre-4.9.151-gnu/drivers/usb/class/cdc-acm.c
--- linux-libre-4.9.150-gnu/drivers/usb/class/cdc-acm.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/drivers/usb/class/cdc-acm.c	2019-01-16 16:12:33.000000000 -0500
@@ -1828,6 +1828,13 @@ static const struct usb_device_id acm_id
 	.driver_info = IGNORE_DEVICE,
 	},
 
+	{ USB_DEVICE(0x1bc7, 0x0021), /* Telit 3G ACM only composition */
+	.driver_info = SEND_ZERO_PACKET,
+	},
+	{ USB_DEVICE(0x1bc7, 0x0023), /* Telit 3G ACM + ECM composition */
+	.driver_info = SEND_ZERO_PACKET,
+	},
+
 	/* control interfaces without any protocol set */
 	{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
 		USB_CDC_PROTO_NONE) },
diff -druNp --no-dereference linux-libre-4.9.150-gnu/drivers/usb/core/quirks.c linux-libre-4.9.151-gnu/drivers/usb/core/quirks.c
--- linux-libre-4.9.150-gnu/drivers/usb/core/quirks.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/drivers/usb/core/quirks.c	2019-01-16 16:12:33.000000000 -0500
@@ -240,7 +240,8 @@ static const struct usb_device_id usb_qu
 			USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
 
 	/* Corsair K70 RGB */
-	{ USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT },
+	{ USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT |
+	  USB_QUIRK_DELAY_CTRL_MSG },
 
 	/* Corsair Strafe */
 	{ USB_DEVICE(0x1b1c, 0x1b15), .driver_info = USB_QUIRK_DELAY_INIT |
diff -druNp --no-dereference linux-libre-4.9.150-gnu/drivers/usb/storage/scsiglue.c linux-libre-4.9.151-gnu/drivers/usb/storage/scsiglue.c
--- linux-libre-4.9.150-gnu/drivers/usb/storage/scsiglue.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/drivers/usb/storage/scsiglue.c	2019-01-16 16:12:33.000000000 -0500
@@ -251,8 +251,12 @@ static int slave_configure(struct scsi_d
 		if (!(us->fflags & US_FL_NEEDS_CAP16))
 			sdev->try_rc_10_first = 1;
 
-		/* assume SPC3 or latter devices support sense size > 18 */
-		if (sdev->scsi_level > SCSI_SPC_2)
+		/*
+		 * assume SPC3 or latter devices support sense size > 18
+		 * unless US_FL_BAD_SENSE quirk is specified.
+		 */
+		if (sdev->scsi_level > SCSI_SPC_2 &&
+		    !(us->fflags & US_FL_BAD_SENSE))
 			us->fflags |= US_FL_SANE_SENSE;
 
 		/*
diff -druNp --no-dereference linux-libre-4.9.150-gnu/drivers/usb/storage/unusual_devs.h linux-libre-4.9.151-gnu/drivers/usb/storage/unusual_devs.h
--- linux-libre-4.9.150-gnu/drivers/usb/storage/unusual_devs.h	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/drivers/usb/storage/unusual_devs.h	2019-01-16 16:12:33.000000000 -0500
@@ -1285,6 +1285,18 @@ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xf
 		US_FL_FIX_CAPACITY ),
 
 /*
+ * Reported by Icenowy Zheng <icenowy@aosc.io>
+ * The SMI SM3350 USB-UFS bridge controller will enter a wrong state
+ * that do not process read/write command if a long sense is requested,
+ * so force to use 18-byte sense.
+ */
+UNUSUAL_DEV(  0x090c, 0x3350, 0x0000, 0xffff,
+		"SMI",
+		"SM3350 UFS-to-USB-Mass-Storage bridge",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_BAD_SENSE ),
+
+/*
  * Reported by Paul Hartman <paul.hartman+linux@gmail.com>
  * This card reader returns "Illegal Request, Logical Block Address
  * Out of Range" for the first READ(10) after a new card is inserted.
diff -druNp --no-dereference linux-libre-4.9.150-gnu/fs/cifs/file.c linux-libre-4.9.151-gnu/fs/cifs/file.c
--- linux-libre-4.9.150-gnu/fs/cifs/file.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/fs/cifs/file.c	2019-01-16 16:12:33.000000000 -0500
@@ -1118,10 +1118,10 @@ cifs_push_mandatory_locks(struct cifsFil
 
 	/*
 	 * Accessing maxBuf is racy with cifs_reconnect - need to store value
-	 * and check it for zero before using.
+	 * and check it before using.
 	 */
 	max_buf = tcon->ses->server->maxBuf;
-	if (!max_buf) {
+	if (max_buf < (sizeof(struct smb_hdr) + sizeof(LOCKING_ANDX_RANGE))) {
 		free_xid(xid);
 		return -EINVAL;
 	}
@@ -1456,10 +1456,10 @@ cifs_unlock_range(struct cifsFileInfo *c
 
 	/*
 	 * Accessing maxBuf is racy with cifs_reconnect - need to store value
-	 * and check it for zero before using.
+	 * and check it before using.
 	 */
 	max_buf = tcon->ses->server->maxBuf;
-	if (!max_buf)
+	if (max_buf < (sizeof(struct smb_hdr) + sizeof(LOCKING_ANDX_RANGE)))
 		return -EINVAL;
 
 	max_num = (max_buf - sizeof(struct smb_hdr)) /
diff -druNp --no-dereference linux-libre-4.9.150-gnu/fs/cifs/smb2file.c linux-libre-4.9.151-gnu/fs/cifs/smb2file.c
--- linux-libre-4.9.150-gnu/fs/cifs/smb2file.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/fs/cifs/smb2file.c	2019-01-16 16:12:33.000000000 -0500
@@ -123,10 +123,10 @@ smb2_unlock_range(struct cifsFileInfo *c
 
 	/*
 	 * Accessing maxBuf is racy with cifs_reconnect - need to store value
-	 * and check it for zero before using.
+	 * and check it before using.
 	 */
 	max_buf = tcon->ses->server->maxBuf;
-	if (!max_buf)
+	if (max_buf < sizeof(struct smb2_lock_element))
 		return -EINVAL;
 
 	max_num = max_buf / sizeof(struct smb2_lock_element);
diff -druNp --no-dereference linux-libre-4.9.150-gnu/fs/cifs/transport.c linux-libre-4.9.151-gnu/fs/cifs/transport.c
--- linux-libre-4.9.150-gnu/fs/cifs/transport.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/fs/cifs/transport.c	2019-01-16 16:12:33.000000000 -0500
@@ -301,7 +301,7 @@ uncork:
 	if (rc < 0 && rc != -EINTR)
 		cifs_dbg(VFS, "Error %d sending data on socket to server\n",
 			 rc);
-	else
+	else if (rc > 0)
 		rc = 0;
 
 	return rc;
diff -druNp --no-dereference linux-libre-4.9.150-gnu/fs/ext4/inline.c linux-libre-4.9.151-gnu/fs/ext4/inline.c
--- linux-libre-4.9.150-gnu/fs/ext4/inline.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/fs/ext4/inline.c	2019-01-16 16:12:33.000000000 -0500
@@ -1859,12 +1859,12 @@ int ext4_inline_data_fiemap(struct inode
 	physical += (char *)ext4_raw_inode(&iloc) - iloc.bh->b_data;
 	physical += offsetof(struct ext4_inode, i_block);
 
-	if (physical)
-		error = fiemap_fill_next_extent(fieinfo, start, physical,
-						inline_len, flags);
 	brelse(iloc.bh);
 out:
 	up_read(&EXT4_I(inode)->xattr_sem);
+	if (physical)
+		error = fiemap_fill_next_extent(fieinfo, start, physical,
+						inline_len, flags);
 	return (error < 0 ? error : 0);
 }
 
diff -druNp --no-dereference linux-libre-4.9.150-gnu/fs/ext4/inode.c linux-libre-4.9.151-gnu/fs/ext4/inode.c
--- linux-libre-4.9.150-gnu/fs/ext4/inode.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/fs/ext4/inode.c	2019-01-16 16:12:33.000000000 -0500
@@ -2698,7 +2698,8 @@ static int ext4_writepages(struct addres
 		 * We may need to convert up to one extent per block in
 		 * the page and we may dirty the inode.
 		 */
-		rsv_blocks = 1 + (PAGE_SIZE >> inode->i_blkbits);
+		rsv_blocks = 1 + ext4_chunk_trans_blocks(inode,
+						PAGE_SIZE >> inode->i_blkbits);
 	}
 
 	/*
diff -druNp --no-dereference linux-libre-4.9.150-gnu/fs/ext4/super.c linux-libre-4.9.151-gnu/fs/ext4/super.c
--- linux-libre-4.9.150-gnu/fs/ext4/super.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/fs/ext4/super.c	2019-01-16 16:12:33.000000000 -0500
@@ -4679,7 +4679,7 @@ static int ext4_commit_super(struct supe
 	ext4_superblock_csum_set(sb);
 	if (sync)
 		lock_buffer(sbh);
-	if (buffer_write_io_error(sbh)) {
+	if (buffer_write_io_error(sbh) || !buffer_uptodate(sbh)) {
 		/*
 		 * Oh, dear.  A previous attempt to write the
 		 * superblock failed.  This could happen because the
diff -druNp --no-dereference linux-libre-4.9.150-gnu/include/linux/sunrpc/svc.h linux-libre-4.9.151-gnu/include/linux/sunrpc/svc.h
--- linux-libre-4.9.150-gnu/include/linux/sunrpc/svc.h	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/include/linux/sunrpc/svc.h	2019-01-16 16:12:33.000000000 -0500
@@ -291,9 +291,12 @@ struct svc_rqst {
 	struct svc_cacherep *	rq_cacherep;	/* cache info */
 	struct task_struct	*rq_task;	/* service thread */
 	spinlock_t		rq_lock;	/* per-request lock */
+	struct net		*rq_bc_net;	/* pointer to backchannel's
+						 * net namespace
+						 */
 };
 
-#define SVC_NET(svc_rqst)	(svc_rqst->rq_xprt->xpt_net)
+#define SVC_NET(rqst) (rqst->rq_xprt ? rqst->rq_xprt->xpt_net : rqst->rq_bc_net)
 
 /*
  * Rigorous type checking on sockaddr type conversions
diff -druNp --no-dereference linux-libre-4.9.150-gnu/Makefile linux-libre-4.9.151-gnu/Makefile
--- linux-libre-4.9.150-gnu/Makefile	2019-01-13 18:08:18.000000000 -0500
+++ linux-libre-4.9.151-gnu/Makefile	2019-01-16 20:32:20.000000000 -0500
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 9
-SUBLEVEL = 150
+SUBLEVEL = 151
 EXTRAVERSION = -gnu
 NAME = Roaring Lionus
 
diff -druNp --no-dereference linux-libre-4.9.150-gnu/mm/slab.c linux-libre-4.9.151-gnu/mm/slab.c
--- linux-libre-4.9.150-gnu/mm/slab.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/mm/slab.c	2019-01-16 16:12:33.000000000 -0500
@@ -682,8 +682,10 @@ static struct alien_cache *__alloc_alien
 	struct alien_cache *alc = NULL;
 
 	alc = kmalloc_node(memsize, gfp, node);
-	init_arraycache(&alc->ac, entries, batch);
-	spin_lock_init(&alc->lock);
+	if (alc) {
+		init_arraycache(&alc->ac, entries, batch);
+		spin_lock_init(&alc->lock);
+	}
 	return alc;
 }
 
diff -druNp --no-dereference linux-libre-4.9.150-gnu/mm/util.c linux-libre-4.9.151-gnu/mm/util.c
--- linux-libre-4.9.150-gnu/mm/util.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/mm/util.c	2019-01-16 16:12:33.000000000 -0500
@@ -389,7 +389,7 @@ bool page_mapped(struct page *page)
 		return true;
 	if (PageHuge(page))
 		return false;
-	for (i = 0; i < hpage_nr_pages(page); i++) {
+	for (i = 0; i < (1 << compound_order(page)); i++) {
 		if (atomic_read(&page[i]._mapcount) >= 0)
 			return true;
 	}
diff -druNp --no-dereference linux-libre-4.9.150-gnu/net/sunrpc/svc.c linux-libre-4.9.151-gnu/net/sunrpc/svc.c
--- linux-libre-4.9.150-gnu/net/sunrpc/svc.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/net/sunrpc/svc.c	2019-01-16 16:12:33.000000000 -0500
@@ -1137,6 +1137,8 @@ void svc_printk(struct svc_rqst *rqstp,
 static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {}
 #endif
 
+extern void svc_tcp_prep_reply_hdr(struct svc_rqst *);
+
 /*
  * Common routine for processing the RPC request.
  */
@@ -1166,7 +1168,8 @@ svc_process_common(struct svc_rqst *rqst
 	clear_bit(RQ_DROPME, &rqstp->rq_flags);
 
 	/* Setup reply header */
-	rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp);
+	if (rqstp->rq_prot == IPPROTO_TCP)
+		svc_tcp_prep_reply_hdr(rqstp);
 
 	svc_putu32(resv, rqstp->rq_xid);
 
@@ -1312,7 +1315,7 @@ svc_process_common(struct svc_rqst *rqst
 	return 0;
 
  close:
-	if (test_bit(XPT_TEMP, &rqstp->rq_xprt->xpt_flags))
+	if (rqstp->rq_xprt && test_bit(XPT_TEMP, &rqstp->rq_xprt->xpt_flags))
 		svc_close_xprt(rqstp->rq_xprt);
 	dprintk("svc: svc_process close\n");
 	return 0;
@@ -1439,10 +1442,10 @@ bc_svc_process(struct svc_serv *serv, st
 	dprintk("svc: %s(%p)\n", __func__, req);
 
 	/* Build the svc_rqst used by the common processing routine */
-	rqstp->rq_xprt = serv->sv_bc_xprt;
 	rqstp->rq_xid = req->rq_xid;
 	rqstp->rq_prot = req->rq_xprt->prot;
 	rqstp->rq_server = serv;
+	rqstp->rq_bc_net = req->rq_xprt->xprt_net;
 
 	rqstp->rq_addrlen = sizeof(req->rq_xprt->addr);
 	memcpy(&rqstp->rq_addr, &req->rq_xprt->addr, rqstp->rq_addrlen);
diff -druNp --no-dereference linux-libre-4.9.150-gnu/net/sunrpc/svcsock.c linux-libre-4.9.151-gnu/net/sunrpc/svcsock.c
--- linux-libre-4.9.150-gnu/net/sunrpc/svcsock.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/net/sunrpc/svcsock.c	2019-01-16 16:12:33.000000000 -0500
@@ -1195,7 +1195,7 @@ static int svc_tcp_sendto(struct svc_rqs
 /*
  * Setup response header. TCP has a 4B record length field.
  */
-static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
+void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
 {
 	struct kvec *resv = &rqstp->rq_res.head[0];
 
diff -druNp --no-dereference linux-libre-4.9.150-gnu/net/sunrpc/svc_xprt.c linux-libre-4.9.151-gnu/net/sunrpc/svc_xprt.c
--- linux-libre-4.9.150-gnu/net/sunrpc/svc_xprt.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/net/sunrpc/svc_xprt.c	2019-01-16 16:12:33.000000000 -0500
@@ -510,10 +510,11 @@ out:
  */
 void svc_reserve(struct svc_rqst *rqstp, int space)
 {
+	struct svc_xprt *xprt = rqstp->rq_xprt;
+
 	space += rqstp->rq_res.head[0].iov_len;
 
-	if (space < rqstp->rq_reserved) {
-		struct svc_xprt *xprt = rqstp->rq_xprt;
+	if (xprt && space < rqstp->rq_reserved) {
 		atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved);
 		rqstp->rq_reserved = space;
 
diff -druNp --no-dereference linux-libre-4.9.150-gnu/sound/pci/hda/patch_realtek.c linux-libre-4.9.151-gnu/sound/pci/hda/patch_realtek.c
--- linux-libre-4.9.150-gnu/sound/pci/hda/patch_realtek.c	2019-01-13 04:03:55.000000000 -0500
+++ linux-libre-4.9.151-gnu/sound/pci/hda/patch_realtek.c	2019-01-16 16:12:33.000000000 -0500
@@ -4841,6 +4841,13 @@ static void alc280_fixup_hp_9480m(struct
 	}
 }
 
+static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
+				  const struct hda_fixup *fix, int action)
+{
+	if (action == HDA_FIXUP_ACT_PRE_PROBE)
+		snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
+}
+
 /* for hda_fixup_thinkpad_acpi() */
 #include "thinkpad_helper.c"
 
@@ -4947,6 +4954,7 @@ enum {
 	ALC293_FIXUP_LENOVO_SPK_NOISE,
 	ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
 	ALC255_FIXUP_DELL_SPK_NOISE,
+	ALC225_FIXUP_DISABLE_MIC_VREF,
 	ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
 	ALC295_FIXUP_DISABLE_DAC3,
 	ALC280_FIXUP_HP_HEADSET_MIC,
@@ -5605,6 +5613,12 @@ static const struct hda_fixup alc269_fix
 		.chained = true,
 		.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
 	},
+	[ALC225_FIXUP_DISABLE_MIC_VREF] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc_fixup_disable_mic_vref,
+		.chained = true,
+		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
+	},
 	[ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
 		.type = HDA_FIXUP_VERBS,
 		.v.verbs = (const struct hda_verb[]) {
@@ -5614,7 +5628,7 @@ static const struct hda_fixup alc269_fix
 			{}
 		},
 		.chained = true,
-		.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
+		.chain_id = ALC225_FIXUP_DISABLE_MIC_VREF
 	},
 	[ALC280_FIXUP_HP_HEADSET_MIC] = {
 		.type = HDA_FIXUP_FUNC,
