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

Commit 6a92ef08 authored by David S. Miller's avatar David S. Miller
Browse files

Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net

parents 9a95d9c6 ec0c9671
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5930,7 +5930,7 @@ F: Documentation/dev-tools/gcov.rst

GDB KERNEL DEBUGGING HELPER SCRIPTS
M:	Jan Kiszka <jan.kiszka@siemens.com>
M:	Kieran Bingham <kieran@bingham.xyz>
M:	Kieran Bingham <kbingham@kernel.org>
S:	Supported
F:	scripts/gdb/

+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@ config PARISC
	select ARCH_HAS_ELF_RANDOMIZE
	select ARCH_HAS_STRICT_KERNEL_RWX
	select ARCH_HAS_UBSAN_SANITIZE_ALL
	select ARCH_WANTS_UBSAN_NO_NULL
	select ARCH_SUPPORTS_MEMORY_FAILURE
	select RTC_CLASS
	select RTC_DRV_GENERIC
+0 −1
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@ config S390
	select ARCH_USE_BUILTIN_BSWAP
	select ARCH_USE_CMPXCHG_LOCKREF
	select ARCH_WANTS_DYNAMIC_TASK_STRUCT
	select ARCH_WANTS_UBSAN_NO_NULL
	select ARCH_WANT_IPC_PARSE_VERSION
	select BUILDTIME_EXTABLE_SORT
	select CLONE_BACKWARDS2
+14 −1
Original line number Diff line number Diff line
@@ -298,7 +298,8 @@ static void reset_bdev(struct zram *zram)
	zram->backing_dev = NULL;
	zram->old_block_size = 0;
	zram->bdev = NULL;

	zram->disk->queue->backing_dev_info->capabilities |=
				BDI_CAP_SYNCHRONOUS_IO;
	kvfree(zram->bitmap);
	zram->bitmap = NULL;
}
@@ -400,6 +401,18 @@ static ssize_t backing_dev_store(struct device *dev,
	zram->backing_dev = backing_dev;
	zram->bitmap = bitmap;
	zram->nr_pages = nr_pages;
	/*
	 * With writeback feature, zram does asynchronous IO so it's no longer
	 * synchronous device so let's remove synchronous io flag. Othewise,
	 * upper layer(e.g., swap) could wait IO completion rather than
	 * (submit and return), which will cause system sluggish.
	 * Furthermore, when the IO function returns(e.g., swap_readpage),
	 * upper layer expects IO was done so it could deallocate the page
	 * freely but in fact, IO is going on so finally could cause
	 * use-after-free when the IO is really done.
	 */
	zram->disk->queue->backing_dev_info->capabilities &=
			~BDI_CAP_SYNCHRONOUS_IO;
	up_write(&zram->init_lock);

	pr_info("setup backing device %s\n", file_name);
+28 −13
Original line number Diff line number Diff line
@@ -191,28 +191,43 @@ static void xlp9xx_i2c_drain_rx_fifo(struct xlp9xx_i2c_dev *priv)
	if (priv->len_recv) {
		/* read length byte */
		rlen = xlp9xx_read_i2c_reg(priv, XLP9XX_I2C_MRXFIFO);

		/*
		 * We expect at least 2 interrupts for I2C_M_RECV_LEN
		 * transactions. The length is updated during the first
		 * interrupt, and the buffer contents are only copied
		 * during subsequent interrupts. If in case the interrupts
		 * get merged we would complete the transaction without
		 * copying out the bytes from RX fifo. To avoid this now we
		 * drain the fifo as and when data is available.
		 * We drained the rlen byte already, decrement total length
		 * by one.
		 */

		len--;
		if (rlen > I2C_SMBUS_BLOCK_MAX || rlen == 0) {
			rlen = 0;	/*abort transfer */
			priv->msg_buf_remaining = 0;
			priv->msg_len = 0;
		} else {
			xlp9xx_i2c_update_rlen(priv);
			return;
		}

		*buf++ = rlen;
		if (priv->client_pec)
			++rlen; /* account for error check byte */
		/* update remaining bytes and message length */
		priv->msg_buf_remaining = rlen;
		priv->msg_len = rlen + 1;
		}
		xlp9xx_i2c_update_rlen(priv);
		priv->len_recv = false;
	} else {
	}

	len = min(priv->msg_buf_remaining, len);
	for (i = 0; i < len; i++, buf++)
		*buf = xlp9xx_read_i2c_reg(priv, XLP9XX_I2C_MRXFIFO);

	priv->msg_buf_remaining -= len;
	}

	priv->msg_buf = buf;

	if (priv->msg_buf_remaining)
Loading