Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f23a833 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 4.9.148 into android-4.9



Changes in 4.9.148
	block: break discard submissions into the user defined size
	block: fix infinite loop if the device loses discard capability
	ib_srpt: Fix a use-after-free in __srpt_close_all_ch()
	USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
	xhci: Don't prevent USB2 bus suspend in state check intended for USB3 only
	USB: serial: option: add GosunCn ZTE WeLink ME3630
	USB: serial: option: add HP lt4132
	USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode)
	USB: serial: option: add Fibocom NL668 series
	USB: serial: option: add Telit LN940 series
	mmc: core: Reset HPI enabled state during re-init and in case of errors
	mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support
	mmc: core: Use a minimum 1600ms timeout when enabling CACHE ctrl
	mmc: omap_hsmmc: fix DMA API warning
	gpio: max7301: fix driver for use with CONFIG_VMAP_STACK
	Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels
	x86/mtrr: Don't copy uninitialized gentry fields back to userspace
	x86/fpu: Disable bottom halves while loading FPU registers
	ubifs: Handle re-linking of inodes correctly while recovery
	panic: avoid deadlocks in re-entrant console drivers
	proc/sysctl: don't return ENOMEM on lookup when a table is unregistering
	drm/ioctl: Fix Spectre v1 vulnerabilities
	Linux 4.9.148

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents a2f9236e d9974886
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
VERSION = 4
PATCHLEVEL = 9
SUBLEVEL = 147
SUBLEVEL = 148
EXTRAVERSION =
NAME = Roaring Lionus

+2 −0
Original line number Diff line number Diff line
@@ -172,6 +172,8 @@ mtrr_ioctl(struct file *file, unsigned int cmd, unsigned long __arg)
	struct mtrr_gentry gentry;
	void __user *arg = (void __user *) __arg;

	memset(&gentry, 0, sizeof(gentry));

	switch (cmd) {
	case MTRRIOC_ADD_ENTRY:
	case MTRRIOC_SET_ENTRY:
+2 −2
Original line number Diff line number Diff line
@@ -342,10 +342,10 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)
			sanitize_restored_xstate(tsk, &env, xfeatures, fx_only);
		}

		local_bh_disable();
		fpu->fpstate_active = 1;
		preempt_disable();
		fpu__restore(fpu);
		preempt_enable();
		local_bh_enable();

		return err;
	} else {
+19 −3
Original line number Diff line number Diff line
@@ -63,10 +63,18 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
		unsigned int req_sects;
		sector_t end_sect, tmp;

		/* Make sure bi_size doesn't overflow */
		req_sects = min_t(sector_t, nr_sects, UINT_MAX >> 9);
		/*
		 * Issue in chunks of the user defined max discard setting,
		 * ensuring that bi_size doesn't overflow
		 */
		req_sects = min_t(sector_t, nr_sects,
					q->limits.max_discard_sectors);
		if (!req_sects)
			goto fail;
		if (req_sects > UINT_MAX >> 9)
			req_sects = UINT_MAX >> 9;

		/**
		/*
		 * If splitting a request, and the next starting sector would be
		 * misaligned, stop the discard at the previous aligned sector.
		 */
@@ -100,6 +108,14 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,

	*biop = bio;
	return 0;

fail:
	if (bio) {
		submit_bio_wait(bio);
		bio_put(bio);
	}
	*biop = NULL;
	return -EOPNOTSUPP;
}
EXPORT_SYMBOL(__blkdev_issue_discard);

+3 −9
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ static int max7301_spi_write(struct device *dev, unsigned int reg,
	struct spi_device *spi = to_spi_device(dev);
	u16 word = ((reg & 0x7F) << 8) | (val & 0xFF);

	return spi_write(spi, (const u8 *)&word, sizeof(word));
	return spi_write_then_read(spi, &word, sizeof(word), NULL, 0);
}

/* A read from the MAX7301 means two transfers; here, one message each */
@@ -37,14 +37,8 @@ static int max7301_spi_read(struct device *dev, unsigned int reg)
	struct spi_device *spi = to_spi_device(dev);

	word = 0x8000 | (reg << 8);
	ret = spi_write(spi, (const u8 *)&word, sizeof(word));
	if (ret)
		return ret;
	/*
	 * This relies on the fact, that a transfer with NULL tx_buf shifts out
	 * zero bytes (=NOOP for MAX7301)
	 */
	ret = spi_read(spi, (u8 *)&word, sizeof(word));
	ret = spi_write_then_read(spi, &word, sizeof(word), &word,
				  sizeof(word));
	if (ret)
		return ret;
	return word & 0xff;
Loading