diff -druNp --no-dereference linux-libre-4.4.146-gnu/drivers/i2c/busses/i2c-imx.c linux-libre-4.4.147-gnu/drivers/i2c/busses/i2c-imx.c
--- linux-libre-4.4.146-gnu/drivers/i2c/busses/i2c-imx.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/drivers/i2c/busses/i2c-imx.c	2018-08-09 06:19:28.000000000 -0400
@@ -382,6 +382,7 @@ static int i2c_imx_dma_xfer(struct imx_i
 		goto err_desc;
 	}
 
+	reinit_completion(&dma->cmd_complete);
 	txdesc->callback = i2c_imx_dma_callback;
 	txdesc->callback_param = i2c_imx;
 	if (dma_submit_error(dmaengine_submit(txdesc))) {
@@ -631,7 +632,6 @@ static int i2c_imx_dma_write(struct imx_
 	 * The first byte must be transmitted by the CPU.
 	 */
 	imx_i2c_write_reg(msgs->addr << 1, i2c_imx, IMX_I2C_I2DR);
-	reinit_completion(&i2c_imx->dma->cmd_complete);
 	time_left = wait_for_completion_timeout(
 				&i2c_imx->dma->cmd_complete,
 				msecs_to_jiffies(DMA_TIMEOUT));
@@ -690,7 +690,6 @@ static int i2c_imx_dma_read(struct imx_i
 	if (result)
 		return result;
 
-	reinit_completion(&i2c_imx->dma->cmd_complete);
 	time_left = wait_for_completion_timeout(
 				&i2c_imx->dma->cmd_complete,
 				msecs_to_jiffies(DMA_TIMEOUT));
diff -druNp --no-dereference linux-libre-4.4.146-gnu/drivers/pci/pci-acpi.c linux-libre-4.4.147-gnu/drivers/pci/pci-acpi.c
--- linux-libre-4.4.146-gnu/drivers/pci/pci-acpi.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/drivers/pci/pci-acpi.c	2018-08-09 06:19:28.000000000 -0400
@@ -543,7 +543,7 @@ void acpi_pci_add_bus(struct pci_bus *bu
 	union acpi_object *obj;
 	struct pci_host_bridge *bridge;
 
-	if (acpi_pci_disabled || !bus->bridge)
+	if (acpi_pci_disabled || !bus->bridge || !ACPI_HANDLE(bus->bridge))
 		return;
 
 	acpi_pci_slot_enumerate(bus);
diff -druNp --no-dereference linux-libre-4.4.146-gnu/drivers/scsi/qla2xxx/qla_init.c linux-libre-4.4.147-gnu/drivers/scsi/qla2xxx/qla_init.c
--- linux-libre-4.4.146-gnu/drivers/scsi/qla2xxx/qla_init.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/drivers/scsi/qla2xxx/qla_init.c	2018-08-09 06:19:28.000000000 -0400
@@ -325,11 +325,10 @@ qla2x00_async_tm_cmd(fc_port_t *fcport,
 
 	wait_for_completion(&tm_iocb->u.tmf.comp);
 
-	rval = tm_iocb->u.tmf.comp_status == CS_COMPLETE ?
-	    QLA_SUCCESS : QLA_FUNCTION_FAILED;
+	rval = tm_iocb->u.tmf.data;
 
-	if ((rval != QLA_SUCCESS) || tm_iocb->u.tmf.data) {
-		ql_dbg(ql_dbg_taskm, vha, 0x8030,
+	if (rval != QLA_SUCCESS) {
+		ql_log(ql_log_warn, vha, 0x8030,
 		    "TM IOCB failed (%x).\n", rval);
 	}
 
diff -druNp --no-dereference linux-libre-4.4.146-gnu/drivers/scsi/qla2xxx/qla_os.c linux-libre-4.4.147-gnu/drivers/scsi/qla2xxx/qla_os.c
--- linux-libre-4.4.146-gnu/drivers/scsi/qla2xxx/qla_os.c	2018-08-06 14:07:39.000000000 -0400
+++ linux-libre-4.4.147-gnu/drivers/scsi/qla2xxx/qla_os.c	2018-08-09 10:38:22.000000000 -0400
@@ -4938,8 +4938,9 @@ qla2x00_do_dpc(void *data)
 			}
 		}
 
-		if (test_and_clear_bit(ISP_ABORT_NEEDED,
-						&base_vha->dpc_flags)) {
+		if (test_and_clear_bit
+		    (ISP_ABORT_NEEDED, &base_vha->dpc_flags) &&
+		    !test_bit(UNLOADING, &base_vha->dpc_flags)) {
 
 			ql_dbg(ql_dbg_dpc, base_vha, 0x4007,
 			    "ISP abort scheduled.\n");
diff -druNp --no-dereference linux-libre-4.4.146-gnu/fs/ext4/super.c linux-libre-4.4.147-gnu/fs/ext4/super.c
--- linux-libre-4.4.146-gnu/fs/ext4/super.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/fs/ext4/super.c	2018-08-09 06:19:28.000000000 -0400
@@ -2102,7 +2102,7 @@ static int ext4_check_descriptors(struct
 	struct ext4_sb_info *sbi = EXT4_SB(sb);
 	ext4_fsblk_t first_block = le32_to_cpu(sbi->s_es->s_first_data_block);
 	ext4_fsblk_t last_block;
-	ext4_fsblk_t last_bg_block = sb_block + ext4_bg_num_gdb(sb, 0) + 1;
+	ext4_fsblk_t last_bg_block = sb_block + ext4_bg_num_gdb(sb, 0);
 	ext4_fsblk_t block_bitmap;
 	ext4_fsblk_t inode_bitmap;
 	ext4_fsblk_t inode_table;
@@ -3777,13 +3777,13 @@ static int ext4_fill_super(struct super_
 			goto failed_mount2;
 		}
 	}
+	sbi->s_gdb_count = db_count;
 	if (!ext4_check_descriptors(sb, logical_sb_block, &first_not_zeroed)) {
 		ext4_msg(sb, KERN_ERR, "group descriptors corrupted!");
 		ret = -EFSCORRUPTED;
 		goto failed_mount2;
 	}
 
-	sbi->s_gdb_count = db_count;
 	get_random_bytes(&sbi->s_next_generation, sizeof(u32));
 	spin_lock_init(&sbi->s_next_gen_lock);
 
diff -druNp --no-dereference linux-libre-4.4.146-gnu/fs/jfs/xattr.c linux-libre-4.4.147-gnu/fs/jfs/xattr.c
--- linux-libre-4.4.146-gnu/fs/jfs/xattr.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/fs/jfs/xattr.c	2018-08-09 06:19:28.000000000 -0400
@@ -493,15 +493,17 @@ static int ea_get(struct inode *inode, s
 	if (size > PSIZE) {
 		/*
 		 * To keep the rest of the code simple.  Allocate a
-		 * contiguous buffer to work with
+		 * contiguous buffer to work with. Make the buffer large
+		 * enough to make use of the whole extent.
 		 */
-		ea_buf->xattr = kmalloc(size, GFP_KERNEL);
+		ea_buf->max_size = (size + sb->s_blocksize - 1) &
+		    ~(sb->s_blocksize - 1);
+
+		ea_buf->xattr = kmalloc(ea_buf->max_size, GFP_KERNEL);
 		if (ea_buf->xattr == NULL)
 			return -ENOMEM;
 
 		ea_buf->flag = EA_MALLOC;
-		ea_buf->max_size = (size + sb->s_blocksize - 1) &
-		    ~(sb->s_blocksize - 1);
 
 		if (ea_size == 0)
 			return 0;
diff -druNp --no-dereference linux-libre-4.4.146-gnu/include/linux/ring_buffer.h linux-libre-4.4.147-gnu/include/linux/ring_buffer.h
--- linux-libre-4.4.146-gnu/include/linux/ring_buffer.h	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/include/linux/ring_buffer.h	2018-08-09 06:19:28.000000000 -0400
@@ -162,6 +162,7 @@ void ring_buffer_record_enable(struct ri
 void ring_buffer_record_off(struct ring_buffer *buffer);
 void ring_buffer_record_on(struct ring_buffer *buffer);
 int ring_buffer_record_is_on(struct ring_buffer *buffer);
+int ring_buffer_record_is_set_on(struct ring_buffer *buffer);
 void ring_buffer_record_disable_cpu(struct ring_buffer *buffer, int cpu);
 void ring_buffer_record_enable_cpu(struct ring_buffer *buffer, int cpu);
 
diff -druNp --no-dereference linux-libre-4.4.146-gnu/kernel/irq/manage.c linux-libre-4.4.147-gnu/kernel/irq/manage.c
--- linux-libre-4.4.146-gnu/kernel/irq/manage.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/kernel/irq/manage.c	2018-08-09 06:19:28.000000000 -0400
@@ -1012,6 +1012,13 @@ static int irq_setup_forced_threading(st
 	if (new->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT))
 		return 0;
 
+	/*
+	 * No further action required for interrupts which are requested as
+	 * threaded interrupts already
+	 */
+	if (new->handler == irq_default_primary_handler)
+		return 0;
+
 	new->flags |= IRQF_ONESHOT;
 
 	/*
@@ -1019,7 +1026,7 @@ static int irq_setup_forced_threading(st
 	 * thread handler. We force thread them as well by creating a
 	 * secondary action.
 	 */
-	if (new->handler != irq_default_primary_handler && new->thread_fn) {
+	if (new->handler && new->thread_fn) {
 		/* Allocate the secondary action */
 		new->secondary = kzalloc(sizeof(struct irqaction), GFP_KERNEL);
 		if (!new->secondary)
diff -druNp --no-dereference linux-libre-4.4.146-gnu/kernel/time/tick-sched.c linux-libre-4.4.147-gnu/kernel/time/tick-sched.c
--- linux-libre-4.4.146-gnu/kernel/time/tick-sched.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/kernel/time/tick-sched.c	2018-08-09 06:19:28.000000000 -0400
@@ -570,7 +570,7 @@ static void tick_nohz_restart(struct tic
 
 static inline bool local_timer_softirq_pending(void)
 {
-	return local_softirq_pending() & TIMER_SOFTIRQ;
+	return local_softirq_pending() & BIT(TIMER_SOFTIRQ);
 }
 
 static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
diff -druNp --no-dereference linux-libre-4.4.146-gnu/kernel/trace/ring_buffer.c linux-libre-4.4.147-gnu/kernel/trace/ring_buffer.c
--- linux-libre-4.4.146-gnu/kernel/trace/ring_buffer.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/kernel/trace/ring_buffer.c	2018-08-09 06:19:28.000000000 -0400
@@ -3142,6 +3142,22 @@ int ring_buffer_record_is_on(struct ring
 }
 
 /**
+ * ring_buffer_record_is_set_on - return true if the ring buffer is set writable
+ * @buffer: The ring buffer to see if write is set enabled
+ *
+ * Returns true if the ring buffer is set writable by ring_buffer_record_on().
+ * Note that this does NOT mean it is in a writable state.
+ *
+ * It may return true when the ring buffer has been disabled by
+ * ring_buffer_record_disable(), as that is a temporary disabling of
+ * the ring buffer.
+ */
+int ring_buffer_record_is_set_on(struct ring_buffer *buffer)
+{
+	return !(atomic_read(&buffer->record_disabled) & RB_BUFFER_OFF);
+}
+
+/**
  * ring_buffer_record_disable_cpu - stop all writes into the cpu_buffer
  * @buffer: The ring buffer to stop writes to.
  * @cpu: The CPU buffer to stop
diff -druNp --no-dereference linux-libre-4.4.146-gnu/kernel/trace/trace.c linux-libre-4.4.147-gnu/kernel/trace/trace.c
--- linux-libre-4.4.146-gnu/kernel/trace/trace.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/kernel/trace/trace.c	2018-08-09 06:19:28.000000000 -0400
@@ -1088,6 +1088,12 @@ update_max_tr(struct trace_array *tr, st
 
 	arch_spin_lock(&tr->max_lock);
 
+	/* Inherit the recordable setting from trace_buffer */
+	if (ring_buffer_record_is_set_on(tr->trace_buffer.buffer))
+		ring_buffer_record_on(tr->max_buffer.buffer);
+	else
+		ring_buffer_record_off(tr->max_buffer.buffer);
+
 	buf = tr->trace_buffer.buffer;
 	tr->trace_buffer.buffer = tr->max_buffer.buffer;
 	tr->max_buffer.buffer = buf;
diff -druNp --no-dereference linux-libre-4.4.146-gnu/Makefile linux-libre-4.4.147-gnu/Makefile
--- linux-libre-4.4.146-gnu/Makefile	2018-08-06 13:44:03.000000000 -0400
+++ linux-libre-4.4.147-gnu/Makefile	2018-08-09 10:11:39.000000000 -0400
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 146
+SUBLEVEL = 147
 EXTRAVERSION = -gnu
 NAME = Blurry Fish Butt
 
diff -druNp --no-dereference linux-libre-4.4.146-gnu/net/netlink/af_netlink.c linux-libre-4.4.147-gnu/net/netlink/af_netlink.c
--- linux-libre-4.4.146-gnu/net/netlink/af_netlink.c	2018-08-06 10:24:42.000000000 -0400
+++ linux-libre-4.4.147-gnu/net/netlink/af_netlink.c	2018-08-09 06:19:28.000000000 -0400
@@ -986,6 +986,11 @@ static int netlink_bind(struct socket *s
 			return err;
 	}
 
+	if (nlk->ngroups == 0)
+		groups = 0;
+	else if (nlk->ngroups < 8*sizeof(groups))
+		groups &= (1UL << nlk->ngroups) - 1;
+
 	bound = nlk->bound;
 	if (bound) {
 		/* Ensure nlk->portid is up-to-date. */
