Skip to contentSkip to conversation

4.19.89-stable review

PATCH In review Greg Kroah-Hartman 10 participants 277 messages Dec 11, 2019 – Dec 13, 2019 Page 2 of 2

Subsystems (5)
lore
Share & tools
lore
author maintainer
#184 lore raw

PATCH 173/243 MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible definition

In reply to Greg Kroah-Hartman

From: Aaro Koskinen <[email protected]>

[ Upstream commit 1c6121c39677175bd372076020948e184bad4b6b ]

cn58xx is compatible with cn50xx, so use the latter.

[[email protected]: s/cn52xx/cn50xx/ in commit message.]
Cc Ralf Baechle <[email protected]>
Cc James Hogan <[email protected]>
---
 arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c | 2 +-
 arch/mips/include/asm/octeon/cvmx-pko.h            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c +1 -1
index 8241fc6aa17d8..3839feba68f20 100644
@@ -266,7 +266,7 @@ int cvmx_cmd_queue_length(cvmx_cmd_queue_id_t queue_id)
 		} else {
 			union cvmx_pko_mem_debug8 debug8;
 			debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8);
-			return debug8.cn58xx.doorbell;
+			return debug8.cn50xx.doorbell;
 		}
 	case CVMX_CMD_QUEUE_ZIP:
 	case CVMX_CMD_QUEUE_DFA:
arch/mips/include/asm/octeon/cvmx-pko.h +1 -1
index 5f47f76ed510a..20eb9c46a75ab 100644
@@ -611,7 +611,7 @@ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear,
 		pko_reg_read_idx.s.index = cvmx_pko_get_base_queue(port_num);
 		cvmx_write_csr(CVMX_PKO_REG_READ_IDX, pko_reg_read_idx.u64);
 		debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8);
-		status->doorbell = debug8.cn58xx.doorbell;
+		status->doorbell = debug8.cn50xx.doorbell;
 	}
 }
 
Signature · 1 line
2.20.1
author maintainer
#185 lore raw

PATCH 174/243 nfsd: Return EPERM, not EACCES, in some SETATTR cases

In reply to Greg Kroah-Hartman

From: zhengbin <[email protected]>

[ Upstream commit 255fbca65137e25b12bced18ec9a014dc77ecda0 ]

As the man(2) page for utime/utimes states, EPERM is returned when the second parameter of utime or utimes is not NULL, the caller's effective UID does not match the owner of the file, and the caller is not privileged.

However, in a NFS directory mounted from knfsd, it will return EACCES (from nfsd_setattr-> fh_verify->nfsd_permission). This patch fixes that.

---
 fs/nfsd/vfs.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
fs/nfsd/vfs.c +15 -2
index b53e76391e525..4fe8db3149506 100644
@@ -396,10 +396,23 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
 	bool		get_write_count;
 	bool		size_change = (iap->ia_valid & ATTR_SIZE);
 
-	if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME | ATTR_SIZE))
+	if (iap->ia_valid & ATTR_SIZE) {
 		accmode |= NFSD_MAY_WRITE|NFSD_MAY_OWNER_OVERRIDE;
-	if (iap->ia_valid & ATTR_SIZE)
 		ftype = S_IFREG;
+	}
+
+	/*
+	 * If utimes(2) and friends are called with times not NULL, we should
+	 * not set NFSD_MAY_WRITE bit. Otherwise fh_verify->nfsd_permission
+	 * will return EACCESS, when the caller's effective UID does not match
+	 * the owner of the file, and the caller is not privileged. In this
+	 * situation, we should return EPERM(notify_change will return this).
+	 */
+	if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME)) {
+		accmode |= NFSD_MAY_OWNER_OVERRIDE;
+		if (!(iap->ia_valid & (ATTR_ATIME_SET | ATTR_MTIME_SET)))
+			accmode |= NFSD_MAY_WRITE;
+	}
 
 	/* Callers that do fh_verify should do the fh_want_write: */
 	get_write_count = !fhp->fh_dentry;
Signature · 1 line
2.20.1
author maintainer
#186 lore raw

PATCH 175/243 media: uvcvideo: Abstract streaming object lifetime

In reply to Greg Kroah-Hartman

From: Kieran Bingham <[email protected]>

[ Upstream commit ece41454c6a5ed8f301ef1c37710ab222e577823 ]

The streaming object is a key part of handling the UVC device. Although not critical, we are currently missing a call to destroy the mutex on clean up paths, and we are due to extend the objects complexity in the near future.

Facilitate easy management of a stream object by creating a pair of functions to handle creating and destroying the allocation. The new uvc_stream_delete() function also performs the missing mutex_destroy() operation.

Previously a failed streaming object allocation would cause uvc_parse_streaming() to return -EINVAL, which is inappropriate. If the constructor failes, we will instead return -ENOMEM.

While we're here, fix the trivial spelling error in the function banner of uvc_delete().

---
 drivers/media/usb/uvc/uvc_driver.c | 54 +++++++++++++++++++++---------
 1 file changed, 38 insertions(+), 16 deletions(-)
drivers/media/usb/uvc/uvc_driver.c +38 -16
index cf4feff2a48c1..063e229ead5ef 100644
@@ -390,6 +390,39 @@ static struct uvc_streaming *uvc_stream_by_id(struct uvc_device *dev, int id)
 	return NULL;
 }
 
+/* ------------------------------------------------------------------------
+ * Streaming Object Management
+ */
+
+static void uvc_stream_delete(struct uvc_streaming *stream)
+{
+	mutex_destroy(&stream->mutex);
+
+	usb_put_intf(stream->intf);
+
+	kfree(stream->format);
+	kfree(stream->header.bmaControls);
+	kfree(stream);
+}
+
+static struct uvc_streaming *uvc_stream_new(struct uvc_device *dev,
+					    struct usb_interface *intf)
+{
+	struct uvc_streaming *stream;
+
+	stream = kzalloc(sizeof(*stream), GFP_KERNEL);
+	if (stream == NULL)
+		return NULL;
+
+	mutex_init(&stream->mutex);
+
+	stream->dev = dev;
+	stream->intf = usb_get_intf(intf);
+	stream->intfnum = intf->cur_altsetting->desc.bInterfaceNumber;
+
+	return stream;
+}
+
 /* ------------------------------------------------------------------------
  * Descriptors parsing
  */
@@ -682,17 +715,12 @@ static int uvc_parse_streaming(struct uvc_device *dev,
 		return -EINVAL;
 	}
 
-	streaming = kzalloc(sizeof(*streaming), GFP_KERNEL);
+	streaming = uvc_stream_new(dev, intf);
 	if (streaming == NULL) {
 		usb_driver_release_interface(&uvc_driver.driver, intf);
-		return -EINVAL;
+		return -ENOMEM;
 	}
 
-	mutex_init(&streaming->mutex);
-	streaming->dev = dev;
-	streaming->intf = usb_get_intf(intf);
-	streaming->intfnum = intf->cur_altsetting->desc.bInterfaceNumber;
-
 	/* The Pico iMage webcam has its class-specific interface descriptors
 	 * after the endpoint descriptors.
 	 */
@@ -899,10 +927,7 @@ static int uvc_parse_streaming(struct uvc_device *dev,
 
 error:
 	usb_driver_release_interface(&uvc_driver.driver, intf);
-	usb_put_intf(intf);
-	kfree(streaming->format);
-	kfree(streaming->header.bmaControls);
-	kfree(streaming);
+	uvc_stream_delete(streaming);
 	return ret;
 }
 
@@ -1818,7 +1843,7 @@ static int uvc_scan_device(struct uvc_device *dev)
  * is released.
  *
  * As this function is called after or during disconnect(), all URBs have
- * already been canceled by the USB core. There is no need to kill the
+ * already been cancelled by the USB core. There is no need to kill the
  * interrupt URB manually.
  */
 static void uvc_delete(struct kref *kref)
@@ -1856,10 +1881,7 @@ static void uvc_delete(struct kref *kref)
 		streaming = list_entry(p, struct uvc_streaming, list);
 		usb_driver_release_interface(&uvc_driver.driver,
 			streaming->intf);
-		usb_put_intf(streaming->intf);
-		kfree(streaming->format);
-		kfree(streaming->header.bmaControls);
-		kfree(streaming);
+		uvc_stream_delete(streaming);
 	}
 
 	kfree(dev);
Signature · 1 line
2.20.1
author maintainer
#187 lore raw

PATCH 176/243 tty: serial: qcom_geni_serial: Fix softlock

In reply to Greg Kroah-Hartman

From: Ryan Case <[email protected]>

[ Upstream commit a1fee899e5bed457afc20a6a2ff3915a95cc5942 ]

Transfers were being divided into device FIFO sized (64 byte max) operations which would poll for completion within a spin_lock_irqsave / spin_unlock_irqrestore block. This both made things slow by waiting for the FIFO to completely drain before adding further data and would also result in softlocks on large transmissions.

This patch allows larger transfers with continuous FIFO additions as space becomes available and removes polling from the interrupt handler.

---
 drivers/tty/serial/qcom_geni_serial.c | 56 +++++++++++++++++++--------
 1 file changed, 39 insertions(+), 17 deletions(-)
drivers/tty/serial/qcom_geni_serial.c +39 -17
index 69b980bb8ac29..b3f7d1a1e97f8 100644
@@ -113,6 +113,8 @@ struct qcom_geni_serial_port {
 	u32 *rx_fifo;
 	u32 loopback;
 	bool brk;
+
+	unsigned int tx_remaining;
 };
 
 static const struct uart_ops qcom_geni_console_pops;
@@ -435,6 +437,7 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s,
 	struct qcom_geni_serial_port *port;
 	bool locked = true;
 	unsigned long flags;
+	u32 geni_status;
 
 	WARN_ON(co->index < 0 || co->index >= GENI_UART_CONS_PORTS);
 
@@ -448,6 +451,8 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s,
 	else
 		spin_lock_irqsave(&uport->lock, flags);
 
+	geni_status = readl_relaxed(uport->membase + SE_GENI_STATUS);
+
 	/* Cancel the current write to log the fault */
 	if (!locked) {
 		geni_se_cancel_m_cmd(&port->se);
@@ -461,9 +466,19 @@ static void qcom_geni_serial_console_write(struct console *co, const char *s,
 		}
 		writel_relaxed(M_CMD_CANCEL_EN, uport->membase +
 							SE_GENI_M_IRQ_CLEAR);
+	} else if ((geni_status & M_GENI_CMD_ACTIVE) && !port->tx_remaining) {
+		/*
+		 * It seems we can't interrupt existing transfers if all data
+		 * has been sent, in which case we need to look for done first.
+		 */
+		qcom_geni_serial_poll_tx_done(uport);
 	}
 
 	__qcom_geni_serial_console_write(uport, s, count);
+
+	if (port->tx_remaining)
+		qcom_geni_serial_setup_tx(uport, port->tx_remaining);
+
 	if (locked)
 		spin_unlock_irqrestore(&uport->lock, flags);
 }
@@ -694,40 +709,45 @@ static void qcom_geni_serial_handle_rx(struct uart_port *uport, bool drop)
 	port->handle_rx(uport, total_bytes, drop);
 }
 
-static void qcom_geni_serial_handle_tx(struct uart_port *uport)
+static void qcom_geni_serial_handle_tx(struct uart_port *uport, bool done,
+		bool active)
 {
 	struct qcom_geni_serial_port *port = to_dev_port(uport, uport);
 	struct circ_buf *xmit = &uport->state->xmit;
 	size_t avail;
 	size_t remaining;
+	size_t pending;
 	int i;
 	u32 status;
 	unsigned int chunk;
 	int tail;
-	u32 irq_en;
 
-	chunk = uart_circ_chars_pending(xmit);
 	status = readl_relaxed(uport->membase + SE_GENI_TX_FIFO_STATUS);
-	/* Both FIFO and framework buffer are drained */
-	if (!chunk && !status) {
+
+	/* Complete the current tx command before taking newly added data */
+	if (active)
+		pending = port->tx_remaining;
+	else
+		pending = uart_circ_chars_pending(xmit);
+
+	/* All data has been transmitted and acknowledged as received */
+	if (!pending && !status && done) {
 		qcom_geni_serial_stop_tx(uport);
 		goto out_write_wakeup;
 	}
 
-	if (!uart_console(uport)) {
-		irq_en = readl_relaxed(uport->membase + SE_GENI_M_IRQ_EN);
-		irq_en &= ~(M_TX_FIFO_WATERMARK_EN);
-		writel_relaxed(0, uport->membase + SE_GENI_TX_WATERMARK_REG);
-		writel_relaxed(irq_en, uport->membase + SE_GENI_M_IRQ_EN);
-	}
+	avail = port->tx_fifo_depth - (status & TX_FIFO_WC);
+	avail *= port->tx_bytes_pw;
 
-	avail = (port->tx_fifo_depth - port->tx_wm) * port->tx_bytes_pw;
 	tail = xmit->tail;
-	chunk = min3((size_t)chunk, (size_t)(UART_XMIT_SIZE - tail), avail);
+	chunk = min3(avail, pending, (size_t)(UART_XMIT_SIZE - tail));
 	if (!chunk)
 		goto out_write_wakeup;
 
-	qcom_geni_serial_setup_tx(uport, chunk);
+	if (!port->tx_remaining) {
+		qcom_geni_serial_setup_tx(uport, pending);
+		port->tx_remaining = pending;
+	}
 
 	remaining = chunk;
 	for (i = 0; i < chunk; ) {
@@ -746,11 +766,10 @@ static void qcom_geni_serial_handle_tx(struct uart_port *uport)
 		tail += tx_bytes;
 		uport->icount.tx += tx_bytes;
 		remaining -= tx_bytes;
+		port->tx_remaining -= tx_bytes;
 	}
 
 	xmit->tail = tail & (UART_XMIT_SIZE - 1);
-	if (uart_console(uport))
-		qcom_geni_serial_poll_tx_done(uport);
 out_write_wakeup:
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(uport);
@@ -760,6 +779,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev)
 {
 	unsigned int m_irq_status;
 	unsigned int s_irq_status;
+	unsigned int geni_status;
 	struct uart_port *uport = dev;
 	unsigned long flags;
 	unsigned int m_irq_en;
@@ -773,6 +793,7 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev)
 	spin_lock_irqsave(&uport->lock, flags);
 	m_irq_status = readl_relaxed(uport->membase + SE_GENI_M_IRQ_STATUS);
 	s_irq_status = readl_relaxed(uport->membase + SE_GENI_S_IRQ_STATUS);
+	geni_status = readl_relaxed(uport->membase + SE_GENI_STATUS);
 	m_irq_en = readl_relaxed(uport->membase + SE_GENI_M_IRQ_EN);
 	writel_relaxed(m_irq_status, uport->membase + SE_GENI_M_IRQ_CLEAR);
 	writel_relaxed(s_irq_status, uport->membase + SE_GENI_S_IRQ_CLEAR);
@@ -787,7 +808,8 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev)
 
 	if (m_irq_status & (M_TX_FIFO_WATERMARK_EN | M_CMD_DONE_EN) &&
 	    m_irq_en & (M_TX_FIFO_WATERMARK_EN | M_CMD_DONE_EN))
-		qcom_geni_serial_handle_tx(uport);
+		qcom_geni_serial_handle_tx(uport, m_irq_status & M_CMD_DONE_EN,
+					geni_status & M_GENI_CMD_ACTIVE);
 
 	if (s_irq_status & S_GP_IRQ_0_EN || s_irq_status & S_GP_IRQ_1_EN) {
 		if (s_irq_status & S_GP_IRQ_0_EN)
Signature · 1 line
2.20.1
author maintainer
#188 lore raw

PATCH 177/243 ARM: dts: sun8i: h3: Fix the system-control register range

In reply to Greg Kroah-Hartman

From: Paul Kocialkowski <[email protected]>

[ Upstream commit 925c5afd78c40169c7e0e6adec52d5119ff43751 ]

Unlike in previous generations, the system-control register range is not limited to a size of 0x30 on the H3. In particular, the EMAC clock configuration register (accessed through syscon) is at offset 0x30 in that range.

Extend the register size to its full range (0x1000) as a result.

---
 arch/arm/boot/dts/sun8i-h3.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h3.dtsi +1 -1
index 97de6ad133dc2..9233ba30a857c 100644
@@ -122,7 +122,7 @@
 	soc {
 		system-control@1c00000 {
 			compatible = "allwinner,sun8i-h3-system-control";
-			reg = <0x01c00000 0x30>;
+			reg = <0x01c00000 0x1000>;
 			#address-cells = <1>;
 			#size-cells = <1>;
 			ranges;
Signature · 1 line
2.20.1
author maintainer
#189 lore raw

PATCH 178/243 tty: Dont block on IO when ldisc change is pending

In reply to Greg Kroah-Hartman

From: Dmitry Safonov <[email protected]>

[ Upstream commit c96cf923a98d1b094df9f0cf97a83e118817e31b ]

There might be situations where tty_ldisc_lock() has blocked, but there is already IO on tty and it prevents line discipline changes. It might theoretically turn into dead-lock.

Basically, provide more priority to pending tty_ldisc_lock() than to servicing reads/writes over tty.

User-visible issue was reported by Mikulas where on pa-risc with Debian 5 reboot took either 80 seconds, 3 minutes or 3:25 after proper locking in tty_reopen().

---
 drivers/tty/n_hdlc.c    | 4 ++--
 drivers/tty/n_r3964.c   | 2 +-
 drivers/tty/n_tty.c     | 8 ++++----
 drivers/tty/tty_ldisc.c | 7 +++++++
 include/linux/tty.h     | 7 +++++++
 5 files changed, 21 insertions(+), 7 deletions(-)
drivers/tty/n_hdlc.c +2 -2
index c943716c019e4..0636e10c76c7f 100644
@@ -613,7 +613,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 		}
 			
 		/* no data */
-		if (file->f_flags & O_NONBLOCK) {
+		if (tty_io_nonblock(tty, file)) {
 			ret = -EAGAIN;
 			break;
 		}
@@ -680,7 +680,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 		if (tbuf)
 			break;
 
-		if (file->f_flags & O_NONBLOCK) {
+		if (tty_io_nonblock(tty, file)) {
 			error = -EAGAIN;
 			break;
 		}
drivers/tty/n_r3964.c +1 -1
index dbf1ab36758eb..a3969b773cbe4 100644
@@ -1078,7 +1078,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
 		pMsg = remove_msg(pInfo, pClient);
 		if (pMsg == NULL) {
 			/* no messages available. */
-			if (file->f_flags & O_NONBLOCK) {
+			if (tty_io_nonblock(tty, file)) {
 				ret = -EAGAIN;
 				goto unlock;
 			}
drivers/tty/n_tty.c +4 -4
index 3ad460219fd62..5dc9686697cfa 100644
@@ -1702,7 +1702,7 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
 
 	down_read(&tty->termios_rwsem);
 
-	while (1) {
+	do {
 		/*
 		 * When PARMRK is set, each input char may take up to 3 chars
 		 * in the read buf; reduce the buffer space avail by 3x
@@ -1744,7 +1744,7 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
 			fp += n;
 		count -= n;
 		rcvd += n;
-	}
+	} while (!test_bit(TTY_LDISC_CHANGING, &tty->flags));
 
 	tty->receive_room = room;
 
@@ -2211,7 +2211,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
 					break;
 				if (!timeout)
 					break;
-				if (file->f_flags & O_NONBLOCK) {
+				if (tty_io_nonblock(tty, file)) {
 					retval = -EAGAIN;
 					break;
 				}
@@ -2365,7 +2365,7 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
 		}
 		if (!nr)
 			break;
-		if (file->f_flags & O_NONBLOCK) {
+		if (tty_io_nonblock(tty, file)) {
 			retval = -EAGAIN;
 			break;
 		}
drivers/tty/tty_ldisc.c +7 -0
index 53bb6d4e9e8d9..245c9a51c2de2 100644
@@ -336,6 +336,11 @@ int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
 {
 	int ret;
 
+	/* Kindly asking blocked readers to release the read side */
+	set_bit(TTY_LDISC_CHANGING, &tty->flags);
+	wake_up_interruptible_all(&tty->read_wait);
+	wake_up_interruptible_all(&tty->write_wait);
+
 	ret = __tty_ldisc_lock(tty, timeout);
 	if (!ret)
 		return -EBUSY;
@@ -346,6 +351,8 @@ int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
 void tty_ldisc_unlock(struct tty_struct *tty)
 {
 	clear_bit(TTY_LDISC_HALTED, &tty->flags);
+	/* Can be cleared here - ldisc_unlock will wake up writers firstly */
+	clear_bit(TTY_LDISC_CHANGING, &tty->flags);
 	__tty_ldisc_unlock(tty);
 }
 
include/linux/tty.h +7 -0
index 808fbfe86f858..76db046f09ab6 100644
@@ -366,6 +366,7 @@ struct tty_file_private {
 #define TTY_NO_WRITE_SPLIT 	17	/* Preserve write boundaries to driver */
 #define TTY_HUPPED 		18	/* Post driver->hangup() */
 #define TTY_HUPPING		19	/* Hangup in progress */
+#define TTY_LDISC_CHANGING	20	/* Change pending - non-block IO */
 #define TTY_LDISC_HALTED	22	/* Line discipline is halted */
 
 /* Values for tty->flow_change */
@@ -383,6 +384,12 @@ static inline void tty_set_flow_change(struct tty_struct *tty, int val)
 	smp_mb();
 }
 
+static inline bool tty_io_nonblock(struct tty_struct *tty, struct file *file)
+{
+	return file->f_flags & O_NONBLOCK ||
+		test_bit(TTY_LDISC_CHANGING, &tty->flags);
+}
+
 static inline bool tty_io_error(struct tty_struct *tty)
 {
 	return test_bit(TTY_IO_ERROR, &tty->flags);
Signature · 1 line
2.20.1
author maintainer
#190 lore raw

PATCH 179/243 media: stkwebcam: Bugfix for wrong return values

In reply to Greg Kroah-Hartman

From: Andreas Pape <[email protected]>

[ Upstream commit 3c28b91380dd1183347d32d87d820818031ebecf ]

usb_control_msg returns in case of a successfully sent message the number of sent bytes as a positive number. Don't use this value as a return value for stk_camera_read_reg, as a non-zero return value is used as an error condition in some cases when stk_camera_read_reg is called.

---
 drivers/media/usb/stkwebcam/stk-webcam.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/media/usb/stkwebcam/stk-webcam.c +5 -1
index 6e3f234e790b8..e33fa78ef98dd 100644
@@ -164,7 +164,11 @@ int stk_camera_read_reg(struct stk_camera *dev, u16 index, u8 *value)
 		*value = *buf;
 
 	kfree(buf);
-	return ret;
+
+	if (ret < 0)
+		return ret;
+	else
+		return 0;
 }
 
 static int stk_start_stream(struct stk_camera *dev)
Signature · 1 line
2.20.1
author maintainer
#191 lore raw

PATCH 180/243 firmware: qcom: scm: fix compilation error when disabled

In reply to Greg Kroah-Hartman

From: Jonathan Marek <[email protected]>

[ Upstream commit 16ad9501b1f2edebe24f8cf3c09da0695871986b ]

This fixes the case when CONFIG_QCOM_SCM is not enabled, and linux/errno.h has not been included previously.

---
 include/linux/qcom_scm.h | 3 +++
 1 file changed, 3 insertions(+)
include/linux/qcom_scm.h +3 -0
index 5d65521260b3d..116b81ac442ad 100644
@@ -65,6 +65,9 @@ extern int qcom_scm_iommu_secure_ptbl_init(u64 addr, u32 size, u32 spare);
 extern int qcom_scm_io_readl(phys_addr_t addr, unsigned int *val);
 extern int qcom_scm_io_writel(phys_addr_t addr, unsigned int val);
 #else
+
+#include <linux/errno.h>
+
 static inline
 int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus)
 {
Signature · 1 line
2.20.1
author maintainer
#192 lore raw

PATCH 181/243 clk: qcom: gcc-msm8998: Disable halt check of UFS clocks

In reply to Greg Kroah-Hartman

From: Bjorn Andersson <[email protected]>

[ Upstream commit 2abf856202fd3e4883e4c518acaa9a023b0dbe54 ]

Drop the halt check of the UFS symbol clocks, in accordance with other platforms. This makes clk_disable_unused() happy and makes it possible to turn the clocks on again without an error.

---
 drivers/clk/qcom/gcc-msm8998.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/qcom/gcc-msm8998.c +3 -3
index 5fd6662a1beac..4e23973b6cd16 100644
@@ -2402,7 +2402,7 @@ static struct clk_branch gcc_ufs_phy_aux_clk = {
 
 static struct clk_branch gcc_ufs_rx_symbol_0_clk = {
 	.halt_reg = 0x75014,
-	.halt_check = BRANCH_HALT,
+	.halt_check = BRANCH_HALT_SKIP,
 	.clkr = {
 		.enable_reg = 0x75014,
 		.enable_mask = BIT(0),
@@ -2415,7 +2415,7 @@ static struct clk_branch gcc_ufs_rx_symbol_0_clk = {
 
 static struct clk_branch gcc_ufs_rx_symbol_1_clk = {
 	.halt_reg = 0x7605c,
-	.halt_check = BRANCH_HALT,
+	.halt_check = BRANCH_HALT_SKIP,
 	.clkr = {
 		.enable_reg = 0x7605c,
 		.enable_mask = BIT(0),
@@ -2428,7 +2428,7 @@ static struct clk_branch gcc_ufs_rx_symbol_1_clk = {
 
 static struct clk_branch gcc_ufs_tx_symbol_0_clk = {
 	.halt_reg = 0x75010,
-	.halt_check = BRANCH_HALT,
+	.halt_check = BRANCH_HALT_SKIP,
 	.clkr = {
 		.enable_reg = 0x75010,
 		.enable_mask = BIT(0),
Signature · 1 line
2.20.1
author maintainer
#193 lore raw

PATCH 182/243 sctp: frag_point sanity check

In reply to Greg Kroah-Hartman

From: Jakub Audykowicz <[email protected]>

[ Upstream commit afd0a8006e98b1890908f81746c94ca5dae29d7c ]

If for some reason an association's fragmentation point is zero, sctp_datamsg_from_user will try to endlessly try to divide a message into zero-sized chunks. This eventually causes kernel panic due to running out of memory.

Although this situation is quite unlikely, it has occurred before as reported. I propose to add this simple last-ditch sanity check due to the severity of the potential consequences.

---
 include/net/sctp/sctp.h | 5 +++++
 net/sctp/chunk.c        | 6 ++++++
 net/sctp/socket.c       | 3 +--
 3 files changed, 12 insertions(+), 2 deletions(-)
include/net/sctp/sctp.h +5 -0
index ab9242e51d9e0..2abbc15824af9 100644
@@ -620,4 +620,9 @@ static inline bool sctp_transport_pmtu_check(struct sctp_transport *t)
 	return false;
 }
 
+static inline __u32 sctp_min_frag_point(struct sctp_sock *sp, __u16 datasize)
+{
+	return sctp_mtu_payload(sp, SCTP_DEFAULT_MINSEGMENT, datasize);
+}
+
 #endif /* __net_sctp_h__ */
net/sctp/chunk.c +6 -0
index ce8087846f059..d2048de86e7c2 100644
@@ -191,6 +191,12 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc,
 	 * the packet
 	 */
 	max_data = asoc->frag_point;
+	if (unlikely(!max_data)) {
+		max_data = sctp_min_frag_point(sctp_sk(asoc->base.sk),
+					       sctp_datachk_len(&asoc->stream));
+		pr_warn_ratelimited("%s: asoc:%p frag_point is zero, forcing max_data to default minimum (%Zu)",
+				    __func__, asoc, max_data);
+	}
 
 	/* If the the peer requested that we authenticate DATA chunks
 	 * we need to account for bundling of the AUTH chunks along with
net/sctp/socket.c +1 -2
index e7a11cd7633f5..95f9068b85497 100644
@@ -3328,8 +3328,7 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
 		__u16 datasize = asoc ? sctp_datachk_len(&asoc->stream) :
 				 sizeof(struct sctp_data_chunk);
 
-		min_len = sctp_mtu_payload(sp, SCTP_DEFAULT_MINSEGMENT,
-					   datasize);
+		min_len = sctp_min_frag_point(sp, datasize);
 		max_len = SCTP_MAX_CHUNK_LEN - datasize;
 
 		if (val < min_len || val > max_len)
Signature · 1 line
2.20.1
author maintainer
#194 lore raw

PATCH 183/243 soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B}

In reply to Greg Kroah-Hartman

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit b0d7fbf8b174168c580bb310964c3c809e5569a9 ]

The workaround for the wrong hierarchy of the 3DG-{A,B} power domains on R-Car E3 ES1.0 corrected the parent domains. However, the 3DG-{A,B} power domains were still initialized and powered in the wrong order, causing 3DG operation to fail.

Fix this by changing the order in the table at runtime, when running on an affected SoC.

Fixes 086b399965a7ee7e ("soc: renesas: r8a77990-sysc: Add workaround for 3DG-{A,B}")
---
 drivers/soc/renesas/r8a77990-sysc.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)
drivers/soc/renesas/r8a77990-sysc.c +4 -19
index 15579ebc5ed20..664b244eb1dd9 100644
@@ -28,19 +28,6 @@ static struct rcar_sysc_area r8a77990_areas[] __initdata = {
 	{ "3dg-b",	0x100, 1, R8A77990_PD_3DG_B,	R8A77990_PD_3DG_A },
 };
 
-static void __init rcar_sysc_fix_parent(struct rcar_sysc_area *areas,
-					unsigned int num_areas, u8 id,
-					int new_parent)
-{
-	unsigned int i;
-
-	for (i = 0; i < num_areas; i++)
-		if (areas[i].isr_bit == id) {
-			areas[i].parent = new_parent;
-			return;
-		}
-}
-
 /* Fixups for R-Car E3 ES1.0 revision */
 static const struct soc_device_attribute r8a77990[] __initconst = {
 	{ .soc_id = "r8a77990", .revision = "ES1.0" },
@@ -50,12 +37,10 @@ static const struct soc_device_attribute r8a77990[] __initconst = {
 static int __init r8a77990_sysc_init(void)
 {
 	if (soc_device_match(r8a77990)) {
-		rcar_sysc_fix_parent(r8a77990_areas,
-				     ARRAY_SIZE(r8a77990_areas),
-				     R8A77990_PD_3DG_A, R8A77990_PD_3DG_B);
-		rcar_sysc_fix_parent(r8a77990_areas,
-				     ARRAY_SIZE(r8a77990_areas),
-				     R8A77990_PD_3DG_B, R8A77990_PD_ALWAYS_ON);
+		/* Fix incorrect 3DG hierarchy */
+		swap(r8a77990_areas[7], r8a77990_areas[8]);
+		r8a77990_areas[7].parent = R8A77990_PD_ALWAYS_ON;
+		r8a77990_areas[8].parent = R8A77990_PD_3DG_B;
 	}
 
 	return 0;
Signature · 1 line
2.20.1
author maintainer
#195 lore raw

PATCH 184/243 mlxsw: spectrum_router: Relax GRE decap matching check

In reply to Greg Kroah-Hartman

From: Nir Dotan <[email protected]>

[ Upstream commit da93d2913fdf43d5cde3c5a53ac9cc29684d5c7c ]

GRE decap offload is configured when local routes prefix correspond to the local address of one of the offloaded GRE tunnels. The matching check was found to be too strict, such that for a flat GRE configuration, in which the overlay and underlay traffic share the same non-default VRF, decap flow was not offloaded.

Relax the check for decap flow offloading. A match occurs if the local address of the tunnel matches the local route address while both share the same VRF table.

Fixes 4607f6d26950 ("mlxsw: spectrum_router: Support IPv4 underlay decap")
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +1 -4
index 3f54b3ca38bad..44b6c2ac5961d 100644
@@ -1215,15 +1215,12 @@ mlxsw_sp_ipip_entry_matches_decap(struct mlxsw_sp *mlxsw_sp,
 {
 	u32 ul_tb_id = l3mdev_fib_table(ul_dev) ? : RT_TABLE_MAIN;
 	enum mlxsw_sp_ipip_type ipipt = ipip_entry->ipipt;
-	struct net_device *ipip_ul_dev;
 
 	if (mlxsw_sp->router->ipip_ops_arr[ipipt]->ul_proto != ul_proto)
 		return false;
 
-	ipip_ul_dev = __mlxsw_sp_ipip_netdev_ul_dev_get(ipip_entry->ol_dev);
 	return mlxsw_sp_ipip_entry_saddr_matches(mlxsw_sp, ul_proto, ul_dip,
-						 ul_tb_id, ipip_entry) &&
-	       (!ipip_ul_dev || ipip_ul_dev == ul_dev);
+						 ul_tb_id, ipip_entry);
 }
 
 /* Given decap parameters, find the corresponding IPIP entry. */
Signature · 1 line
2.20.1
author maintainer
#196 lore raw

PATCH 185/243 ARM: dts: sun8i: a23/a33: Fix up RTC device node

In reply to Greg Kroah-Hartman

From: Chen-Yu Tsai <[email protected]>

[ Upstream commit f6f4422532ad9ec9380a9936ed16b30922066a50 ]

The RTC module on the A23 was claimed to be the same as on the A31, when in fact it is not. The A31 does not have an RTC external clock output, and its internal RC oscillator's average clock rate is not in the same range. The A33's RTC is the same as the A23.

This patch fixes the compatible string and clock properties to conform to the updated bindings. The register range is also fixed.

---
 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/sun8i-a23-a33.dtsi +3 -3
index c16ffcc4db7da..5616333c0e0e3 100644
@@ -565,11 +565,11 @@
 		};
 
 		rtc: rtc@1f00000 {
-			compatible = "allwinner,sun6i-a31-rtc";
-			reg = <0x01f00000 0x54>;
+			compatible = "allwinner,sun8i-a23-rtc";
+			reg = <0x01f00000 0x400>;
 			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
-			clock-output-names = "osc32k";
+			clock-output-names = "osc32k", "osc32k-out";
 			clocks = <&ext_osc32k>;
 			#clock-cells = <1>;
 		};
Signature · 1 line
2.20.1
#197 lore raw

Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node

Hi!

Quoted 7 lines

The RTC module on the A23 was claimed to be the same as on the A31, when in fact it is not. The A31 does not have an RTC external clock output, and its internal RC oscillator's average clock rate is not in the same range. The A33's RTC is the same as the A23.

This patch fixes the compatible string and clock properties to conform to the updated bindings. The register range is also fixed.

No, this is not okay for v4.19. New compatible is not in ./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.

Best regards,
Pavel

Quoted 16 lines

+++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi

arch/arm/boot/dts/sun8i-a23-a33.dtsi +3 -3
@@ -565,11 +565,11 @@
 		};
 
 		rtc: rtc@1f00000 {
-			compatible = "allwinner,sun6i-a31-rtc";
-			reg = <0x01f00000 0x54>;
+			compatible = "allwinner,sun8i-a23-rtc";
+			reg = <0x01f00000 0x400>;
 			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
 				     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
-			clock-output-names = "osc32k";
+			clock-output-names = "osc32k", "osc32k-out";
 			clocks = <&ext_osc32k>;
 			#clock-cells = <1>;
 		};
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
author maintainer
#198 lore raw

Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node

Quoted 7 lines · Pavel Machek

Hi!

Quoted 5 lines

The RTC module on the A23 was claimed to be the same as on the A31, when in fact it is not. The A31 does not have an RTC external clock output, and its internal RC oscillator's average clock rate is not in the same range. The A33's RTC is the same as the A23.

Quoted 5 lines
Quoted 2 lines

This patch fixes the compatible string and clock properties to conform to the updated bindings. The register range is also fixed.

No, this is not okay for v4.19. New compatible is not in ./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.

Good catch, I would have thought both of those would happen at the same time.

Now dropped, thanks.

greg k-h

#199 lore raw

Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node

Quoted 9 lines · Greg Kroah-Hartman
Quoted 7 lines · Pavel Machek

Hi!

Quoted 5 lines

The RTC module on the A23 was claimed to be the same as on the A31, when in fact it is not. The A31 does not have an RTC external clock output, and its internal RC oscillator's average clock rate is not in the same range. The A33's RTC is the same as the A23.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This patch fixes the compatible string and clock properties to conform to the updated bindings. The register range is also fixed.

No, this is not okay for v4.19. New compatible is not in ./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.

Good catch, I would have thought both of those would happen at the same time.

(Fixed Maxime's email)

Neither were marked for stable. I guess Sasha's auto selection bot is at work here. Is there anything we can do to prevent them from being selected? For sunxi, we pretty much don't expect things to be backported, unless something critical was fixed.

Thanks

ChenYu

Quoted 3 lines

Now dropped, thanks.

greg k-h

author maintainer
#200 lore raw

Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node

Quoted 20 lines · Chen-Yu Tsai
Quoted 9 lines · Greg Kroah-Hartman
Quoted 7 lines · Pavel Machek

Hi!

Quoted 5 lines

The RTC module on the A23 was claimed to be the same as on the A31, when in fact it is not. The A31 does not have an RTC external clock output, and its internal RC oscillator's average clock rate is not in the same range. The A33's RTC is the same as the A23.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This patch fixes the compatible string and clock properties to conform to the updated bindings. The register range is also fixed.

No, this is not okay for v4.19. New compatible is not in ./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.

Good catch, I would have thought both of those would happen at the same time.

Quoted 6 lines

(Fixed Maxime's email)

Neither were marked for stable. I guess Sasha's auto selection bot is at work here. Is there anything we can do to prevent them from being selected? For sunxi, we pretty much don't expect things to be backported, unless something critical was fixed.

Sasha can add any files to the bot to ignore, just let him know what ones to mark that way.

thanks,

greg k-h

#201 lore raw

Re: [PATCH 4.19 185/243] ARM: dts: sun8i: a23/a33: Fix up RTC device node

In reply to Greg Kroah-Hartman
Quoted 8 lines · Greg Kroah-Hartman
Quoted 7 lines · Pavel Machek

Hi!

Quoted 5 lines

The RTC module on the A23 was claimed to be the same as on the A31, when in fact it is not. The A31 does not have an RTC external clock output, and its internal RC oscillator's average clock rate is not in the same range. The A33's RTC is the same as the A23.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

This patch fixes the compatible string and clock properties to conform to the updated bindings. The register range is also fixed.

No, this is not okay for v4.19. New compatible is not in ./drivers/rtc/rtc-sun6i.c, so this will completely break rtc support.

Good catch, I would have thought both of those would happen at the same time.

That's not normally how it works for dts changes. Drivers and dts very often have different maintainers, so there is preference for them to go in separately.

Best regards,
Pavel

Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
author maintainer
#202 lore raw

PATCH 186/243 IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state

In reply to Greg Kroah-Hartman

From: Kaike Wan <[email protected]>

[ Upstream commit c1a797c0818e0122c7ec8422edd971cfec9b15ea ]

When it is requested to change its physical state back to Offline while in the process to go up, DC8051 will set the ERROR field in the DC8051_DBG_ERR_INFO_SET_BY_8051 register. This ERROR field will remain until the next time when DC8051 transitions from Offline to Polling. Subsequently, when the host requests DC8051 to change its physical state to Polling again, it may receive a DC8051 interrupt with the stale ERROR field still in DC8051_DBG_ERR_INFO_SET_BY_8051. If the host link state has been changed to Polling, this stale ERROR will force the host to transition to Offline state, resulting in a vicious cycle of Polling ->Offline->Polling->Offline. On the other hand, if the host link state is still Offline when the stale ERROR is received, the stale ERROR will be ignored, and the link will come up correctly. This patch implements the correct behavior by changing host link state to Polling only after DC8051 changes its physical state to Polling.

---
 drivers/infiniband/hw/hfi1/chip.c | 47 ++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)
drivers/infiniband/hw/hfi1/chip.c +46 -1
index 6aa5a8a242ffd..6b89353611333 100644
@@ -1074,6 +1074,8 @@ static void log_state_transition(struct hfi1_pportdata *ppd, u32 state);
 static void log_physical_state(struct hfi1_pportdata *ppd, u32 state);
 static int wait_physical_linkstate(struct hfi1_pportdata *ppd, u32 state,
 				   int msecs);
+static int wait_phys_link_out_of_offline(struct hfi1_pportdata *ppd,
+					 int msecs);
 static void read_planned_down_reason_code(struct hfi1_devdata *dd, u8 *pdrrc);
 static void read_link_down_reason(struct hfi1_devdata *dd, u8 *ldr);
 static void handle_temp_err(struct hfi1_devdata *dd);
@@ -10769,13 +10771,15 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)
 			break;
 
 		ppd->port_error_action = 0;
-		ppd->host_link_state = HLS_DN_POLL;
 
 		if (quick_linkup) {
 			/* quick linkup does not go into polling */
 			ret = do_quick_linkup(dd);
 		} else {
 			ret1 = set_physical_link_state(dd, PLS_POLLING);
+			if (!ret1)
+				ret1 = wait_phys_link_out_of_offline(ppd,
+								     3000);
 			if (ret1 != HCMD_SUCCESS) {
 				dd_dev_err(dd,
 					   "Failed to transition to Polling link state, return 0x%x\n",
@@ -10783,6 +10787,14 @@ int set_link_state(struct hfi1_pportdata *ppd, u32 state)
 				ret = -EINVAL;
 			}
 		}
+
+		/*
+		 * Change the host link state after requesting DC8051 to
+		 * change its physical state so that we can ignore any
+		 * interrupt with stale LNI(XX) error, which will not be
+		 * cleared until DC8051 transitions to Polling state.
+		 */
+		ppd->host_link_state = HLS_DN_POLL;
 		ppd->offline_disabled_reason =
 			HFI1_ODR_MASK(OPA_LINKDOWN_REASON_NONE);
 		/*
@@ -12914,6 +12926,39 @@ static int wait_phys_link_offline_substates(struct hfi1_pportdata *ppd,
 	return read_state;
 }
 
+/*
+ * wait_phys_link_out_of_offline - wait for any out of offline state
+ * @ppd: port device
+ * @msecs: the number of milliseconds to wait
+ *
+ * Wait up to msecs milliseconds for any out of offline physical link
+ * state change to occur.
+ * Returns 0 if at least one state is reached, otherwise -ETIMEDOUT.
+ */
+static int wait_phys_link_out_of_offline(struct hfi1_pportdata *ppd,
+					 int msecs)
+{
+	u32 read_state;
+	unsigned long timeout;
+
+	timeout = jiffies + msecs_to_jiffies(msecs);
+	while (1) {
+		read_state = read_physical_state(ppd->dd);
+		if ((read_state & 0xF0) != PLS_OFFLINE)
+			break;
+		if (time_after(jiffies, timeout)) {
+			dd_dev_err(ppd->dd,
+				   "timeout waiting for phy link out of offline. Read state 0x%x, %dms\n",
+				   read_state, msecs);
+			return -ETIMEDOUT;
+		}
+		usleep_range(1950, 2050); /* sleep 2ms-ish */
+	}
+
+	log_state_transition(ppd, read_state);
+	return read_state;
+}
+
 #define CLEAR_STATIC_RATE_CONTROL_SMASK(r) \
 (r &= ~SEND_CTXT_CHECK_ENABLE_DISALLOW_PBC_STATIC_RATE_CONTROL_SMASK)
 
Signature · 1 line
2.20.1
author maintainer
#203 lore raw

PATCH 187/243 IB/hfi1: Close VNIC sdma_progress sleep window

In reply to Greg Kroah-Hartman

From: Mike Marciniszyn <[email protected]>

[ Upstream commit 18912c4524385dd6532c682cb9d4f6aa39ba8d47 ]

The call to sdma_progress() is called outside the wait lock.

In this case, there is a race condition where sdma_progress() can return false and the sdma_engine can idle. If that happens, there will be no more sdma interrupts to cause the wakeup and the vnic_sdma xmit will hang.

Fix by moving the lock to enclose the sdma_progress() call.

Also, delete the tx_retry. The need for this was removed by:
commit bcad29137a97 ("IB/hfi1: Serve the most starved iowait entry first")

---
 drivers/infiniband/hw/hfi1/vnic_sdma.c | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/infiniband/hw/hfi1/vnic_sdma.c +5 -10
index c3c96c5869ed4..718dcdef946ee 100644
@@ -57,7 +57,6 @@
 
 #define HFI1_VNIC_TXREQ_NAME_LEN   32
 #define HFI1_VNIC_SDMA_DESC_WTRMRK 64
-#define HFI1_VNIC_SDMA_RETRY_COUNT 1
 
 /*
  * struct vnic_txreq - VNIC transmit descriptor
@@ -67,7 +66,6 @@
  * @pad: pad buffer
  * @plen: pad length
  * @pbc_val: pbc value
- * @retry_count: tx retry count
  */
 struct vnic_txreq {
 	struct sdma_txreq       txreq;
@@ -77,8 +75,6 @@ struct vnic_txreq {
 	unsigned char           pad[HFI1_VNIC_MAX_PAD];
 	u16                     plen;
 	__le64                  pbc_val;
-
-	u32                     retry_count;
 };
 
 static void vnic_sdma_complete(struct sdma_txreq *txreq,
@@ -196,7 +192,6 @@ int hfi1_vnic_send_dma(struct hfi1_devdata *dd, u8 q_idx,
 	ret = build_vnic_tx_desc(sde, tx, pbc);
 	if (unlikely(ret))
 		goto free_desc;
-	tx->retry_count = 0;
 
 	ret = sdma_send_txreq(sde, &vnic_sdma->wait, &tx->txreq,
 			      vnic_sdma->pkts_sent);
@@ -238,14 +233,14 @@ static int hfi1_vnic_sdma_sleep(struct sdma_engine *sde,
 	struct hfi1_vnic_sdma *vnic_sdma =
 		container_of(wait, struct hfi1_vnic_sdma, wait);
 	struct hfi1_ibdev *dev = &vnic_sdma->dd->verbs_dev;
-	struct vnic_txreq *tx = container_of(txreq, struct vnic_txreq, txreq);
 
-	if (sdma_progress(sde, seq, txreq))
-		if (tx->retry_count++ < HFI1_VNIC_SDMA_RETRY_COUNT)
-			return -EAGAIN;
+	write_seqlock(&dev->iowait_lock);
+	if (sdma_progress(sde, seq, txreq)) {
+		write_sequnlock(&dev->iowait_lock);
+		return -EAGAIN;
+	}
 
 	vnic_sdma->state = HFI1_VNIC_SDMA_Q_DEFERRED;
-	write_seqlock(&dev->iowait_lock);
 	if (list_empty(&vnic_sdma->wait.list))
 		iowait_queue(pkts_sent, wait, &sde->dmawait);
 	write_sequnlock(&dev->iowait_lock);
Signature · 1 line
2.20.1
author maintainer
#204 lore raw

PATCH 188/243 mlx4: Use snprintf instead of complicated strcpy

In reply to Greg Kroah-Hartman

From: Qian Cai <[email protected]>

[ Upstream commit 0fbc9b8b4ea3f688a5da141a64f97aa33ad02ae9 ]

This fixes a compilation warning in sysfs.c

drivers/infiniband/hw/mlx4/sysfs.c:360:2: warning: 'strncpy' output may be truncated copying 8 bytes from a string of length 31 [-Wstringop-truncation]

By eliminating the temporary stack buffer.

---
 drivers/infiniband/hw/mlx4/sysfs.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/infiniband/hw/mlx4/sysfs.c +4 -8
index e219093d27645..d2da28d613f2c 100644
@@ -353,16 +353,12 @@ err:
 
 static void get_name(struct mlx4_ib_dev *dev, char *name, int i, int max)
 {
-	char base_name[9];
-
-	/* pci_name format is: bus:dev:func -> xxxx:yy:zz.n */
-	strlcpy(name, pci_name(dev->dev->persist->pdev), max);
-	strncpy(base_name, name, 8); /*till xxxx:yy:*/
-	base_name[8] = '\0';
-	/* with no ARI only 3 last bits are used so when the fn is higher than 8
+	/* pci_name format is: bus:dev:func -> xxxx:yy:zz.n
+	 * with no ARI only 3 last bits are used so when the fn is higher than 8
 	 * need to add it to the dev num, so count in the last number will be
 	 * modulo 8 */
-	sprintf(name, "%s%.2d.%d", base_name, (i/8), (i%8));
+	snprintf(name, max, "%.8s%.2d.%d", pci_name(dev->dev->persist->pdev),
+		 i / 8, i % 8);
 }
 
 struct mlx4_port {
Signature · 1 line
2.20.1
author maintainer
#205 lore raw

PATCH 189/243 usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler

In reply to Greg Kroah-Hartman

From: YueHaibing <[email protected]>

[ Upstream commit f770e3bc236ee954a3b4052bdf55739e26ee25db ]

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/usb/mtu3/mtu3_qmu.c: In function 'qmu_tx_zlp_error_handler':
drivers/usb/mtu3/mtu3_qmu.c:385:22: warning:
variable 'req' set but not used [-Wunused-but-set-variable]

It seems dbginfo original intention is print 'req' other than 'mreq'

---
 drivers/usb/mtu3/mtu3_qmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/mtu3/mtu3_qmu.c +1 -1
index ff62ba2321779..326b40747128c 100644
@@ -427,7 +427,7 @@ static void qmu_tx_zlp_error_handler(struct mtu3 *mtu, u8 epnum)
 		return;
 	}
 
-	dev_dbg(mtu->dev, "%s send ZLP for req=%p\n", __func__, mreq);
+	dev_dbg(mtu->dev, "%s send ZLP for req=%p\n", __func__, req);
 
 	mtu3_clrbits(mbase, MU3D_EP_TXCR0(mep->epnum), TX_DMAREQEN);
 
Signature · 1 line
2.20.1
author maintainer
#206 lore raw

PATCH 190/243 clk: renesas: rcar-gen3: Set state when registering SD clocks

In reply to Greg Kroah-Hartman

From: Niklas Söderlund <[email protected]>

[ Upstream commit ecda0a09fa9933bcd67e33c952f778f0872392ed ]

The driver tries to figure out which state a SD clock is in when the clock is registered, instead of setting a known state. This can be problematic for two reasons.

1. If the clock driver can't figure out the state of the clock, registration of the clock fails, and setting of a known state by a clock user is not possible.

2. The state of the clock depends on if and how the bootloader configured it. The driver only checks that the rate is known, not if the clock is stopped or not for example.

Fix this by setting a known state and making sure the clock is stopped.

---
 drivers/clk/renesas/rcar-gen3-cpg.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/clk/renesas/rcar-gen3-cpg.c +4 -12
index 628b63b85d3f0..9ace7d39cd1b5 100644
@@ -361,7 +361,7 @@ static struct clk * __init cpg_sd_clk_register(const struct cpg_core_clk *core,
 	struct sd_clock *clock;
 	struct clk *clk;
 	unsigned int i;
-	u32 sd_fc;
+	u32 val;
 
 	clock = kzalloc(sizeof(*clock), GFP_KERNEL);
 	if (!clock)
@@ -378,17 +378,9 @@ static struct clk * __init cpg_sd_clk_register(const struct cpg_core_clk *core,
 	clock->div_table = cpg_sd_div_table;
 	clock->div_num = ARRAY_SIZE(cpg_sd_div_table);
 
-	sd_fc = readl(clock->csn.reg) & CPG_SD_FC_MASK;
-	for (i = 0; i < clock->div_num; i++)
-		if (sd_fc == (clock->div_table[i].val & CPG_SD_FC_MASK))
-			break;
-
-	if (WARN_ON(i >= clock->div_num)) {
-		kfree(clock);
-		return ERR_PTR(-EINVAL);
-	}
-
-	clock->cur_div_idx = i;
+	val = readl(clock->csn.reg) & ~CPG_SD_FC_MASK;
+	val |= CPG_SD_STP_MASK | (clock->div_table[0].val & CPG_SD_FC_MASK);
+	writel(val, clock->csn.reg);
 
 	clock->div_max = clock->div_table[0].div;
 	clock->div_min = clock->div_max;
Signature · 1 line
2.20.1
author maintainer
#207 lore raw

PATCH 191/243 ASoC: max9867: Fix power management

In reply to Greg Kroah-Hartman

From: Ladislav Michl <[email protected]>

[ Upstream commit 29f58ff06795a923407d011d4721eaf3e8d39acc ]

Implement set_bias_level to drive shutdown bit, so device is put to sleep when unused.

---
 sound/soc/codecs/max9867.c | 72 ++++++++++++++++++++++++--------------
 sound/soc/codecs/max9867.h |  2 +-
 2 files changed, 46 insertions(+), 28 deletions(-)
sound/soc/codecs/max9867.c +45 -27
index 4ea3287162ad2..e51143df4702a 100644
@@ -248,17 +248,6 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static int max9867_prepare(struct snd_pcm_substream *substream,
-			 struct snd_soc_dai *dai)
-{
-	struct snd_soc_component *component = dai->component;
-	struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component);
-
-	regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
-		MAX9867_SHTDOWN_MASK, MAX9867_SHTDOWN_MASK);
-	return 0;
-}
-
 static int max9867_mute(struct snd_soc_dai *dai, int mute)
 {
 	struct snd_soc_component *component = dai->component;
@@ -361,7 +350,6 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai,
 static const struct snd_soc_dai_ops max9867_dai_ops = {
 	.set_fmt = max9867_dai_set_fmt,
 	.set_sysclk	= max9867_set_dai_sysclk,
-	.prepare	= max9867_prepare,
 	.digital_mute	= max9867_mute,
 	.hw_params = max9867_dai_hw_params,
 };
@@ -392,27 +380,59 @@ static struct snd_soc_dai_driver max9867_dai[] = {
 	}
 };
 
-#ifdef CONFIG_PM_SLEEP
-static int max9867_suspend(struct device *dev)
+#ifdef CONFIG_PM
+static int max9867_suspend(struct snd_soc_component *component)
 {
-	struct max9867_priv *max9867 = dev_get_drvdata(dev);
+	snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF);
 
-	/* Drop down to power saving mode when system is suspended */
-	regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
-		MAX9867_SHTDOWN_MASK, ~MAX9867_SHTDOWN_MASK);
 	return 0;
 }
 
-static int max9867_resume(struct device *dev)
+static int max9867_resume(struct snd_soc_component *component)
 {
-	struct max9867_priv *max9867 = dev_get_drvdata(dev);
+	snd_soc_component_force_bias_level(component, SND_SOC_BIAS_STANDBY);
 
-	regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
-		MAX9867_SHTDOWN_MASK, MAX9867_SHTDOWN_MASK);
 	return 0;
 }
+#else
+#define max9867_suspend	NULL
+#define max9867_resume	NULL
 #endif
 
+static int max9867_set_bias_level(struct snd_soc_component *component,
+				  enum snd_soc_bias_level level)
+{
+	int err;
+	struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component);
+
+	switch (level) {
+	case SND_SOC_BIAS_STANDBY:
+		if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) {
+			err = regcache_sync(max9867->regmap);
+			if (err)
+				return err;
+
+			err = regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
+						 MAX9867_SHTDOWN, MAX9867_SHTDOWN);
+			if (err)
+				return err;
+		}
+		break;
+	case SND_SOC_BIAS_OFF:
+		err = regmap_update_bits(max9867->regmap, MAX9867_PWRMAN,
+					 MAX9867_SHTDOWN, 0);
+		if (err)
+			return err;
+
+		regcache_mark_dirty(max9867->regmap);
+		break;
+	default:
+		break;
+	}
+
+	return 0;
+}
+
 static const struct snd_soc_component_driver max9867_component = {
 	.controls		= max9867_snd_controls,
 	.num_controls		= ARRAY_SIZE(max9867_snd_controls),
@@ -420,6 +440,9 @@ static const struct snd_soc_component_driver max9867_component = {
 	.num_dapm_routes	= ARRAY_SIZE(max9867_audio_map),
 	.dapm_widgets		= max9867_dapm_widgets,
 	.num_dapm_widgets	= ARRAY_SIZE(max9867_dapm_widgets),
+	.suspend		= max9867_suspend,
+	.resume			= max9867_resume,
+	.set_bias_level		= max9867_set_bias_level,
 	.idle_bias_on		= 1,
 	.use_pmdown_time	= 1,
 	.endianness		= 1,
@@ -518,15 +541,10 @@ static const struct of_device_id max9867_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, max9867_of_match);
 
-static const struct dev_pm_ops max9867_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(max9867_suspend, max9867_resume)
-};
-
 static struct i2c_driver max9867_i2c_driver = {
 	.driver = {
 		.name = "max9867",
 		.of_match_table = of_match_ptr(max9867_of_match),
-		.pm = &max9867_pm_ops,
 	},
 	.probe  = max9867_i2c_probe,
 	.id_table = max9867_i2c_id,
sound/soc/codecs/max9867.h +1 -1
index 55cd9976ff47d..d9170850c96ea 100644
@@ -67,7 +67,7 @@
 #define MAX9867_MICCONFIG    0x15
 #define MAX9867_MODECONFIG   0x16
 #define MAX9867_PWRMAN       0x17
-#define MAX9867_SHTDOWN_MASK (1<<7)
+#define MAX9867_SHTDOWN      0x80
 #define MAX9867_REVISION     0xff
 
 #define MAX9867_CACHEREGNUM 10
Signature · 1 line
2.20.1
author maintainer
#208 lore raw

PATCH 192/243 ARM: dts: sunxi: Fix PMU compatible strings

In reply to Greg Kroah-Hartman

From: Rob Herring <[email protected]>

[ Upstream commit 5719ac19fc32d892434939c1756c2f9a8322e6ef ]

"arm,cortex-a15-pmu" is not a valid fallback compatible string for an Cortex-A7 PMU, so drop it.

---
 arch/arm/boot/dts/sun6i-a31.dtsi | 2 +-
 arch/arm/boot/dts/sun7i-a20.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/sun6i-a31.dtsi +1 -1
index debc0bf22ea3b..76924fa42bbc3 100644
@@ -201,7 +201,7 @@
 	};
 
 	pmu {
-		compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
+		compatible = "arm,cortex-a7-pmu";
 		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
 			     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
 			     <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
arch/arm/boot/dts/sun7i-a20.dtsi +1 -1
index 73e789a133de1..355619dce7994 100644
@@ -183,7 +183,7 @@
 	};
 
 	pmu {
-		compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
+		compatible = "arm,cortex-a7-pmu";
 		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
 			     <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
 	};
Signature · 1 line
2.20.1
author maintainer
#209 lore raw

PATCH 193/243 ARM: dts: am335x-pdu001: Fix polarity of card detection input

In reply to Greg Kroah-Hartman

From: Felix Brack <[email protected]>

[ Upstream commit 5760367298a37c459ef0b1364463d70fd9a1f972 ]

When a micro SD card is inserted in the PDU001 card cage, the card detection switch is opened and the corresponding GPIO input is driven by a pull-up. Hence change the active level of the card detection input from low to high.

---
 arch/arm/boot/dts/am335x-pdu001.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/am335x-pdu001.dts +1 -1
index 34fb63ef420f5..f56798efddff3 100644
@@ -577,7 +577,7 @@
 	bus-width = <4>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc2_pins>;
-	cd-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+	cd-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
 };
 
 &sham {
Signature · 1 line
2.20.1
author maintainer
#210 lore raw

PATCH 194/243 media: vimc: fix start stream when link is disabled

In reply to Greg Kroah-Hartman

From: Helen Fornazier <[email protected]>

[ Upstream commit e159b6074c82fe31b79aad672e02fa204dbbc6d8 ]

If link is disabled, media_entity_remote_pad returns NULL, causing a NULL pointer deference.
Ignore links that are not enabled instead.

---
 drivers/media/platform/vimc/vimc-common.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/media/platform/vimc/vimc-common.c +2 -0
index 204aa6f554e4d..fa8435ac2b1ae 100644
@@ -241,6 +241,8 @@ int vimc_pipeline_s_stream(struct media_entity *ent, int enable)
 
 		/* Start the stream in the subdevice direct connected */
 		pad = media_entity_remote_pad(&ent->pads[i]);
+		if (!pad)
+			continue;
 
 		if (!is_media_entity_v4l2_subdev(pad->entity))
 			return -EINVAL;
Signature · 1 line
2.20.1
author maintainer
#211 lore raw

PATCH 195/243 net: aquantia: fix RSS table and key sizes

In reply to Greg Kroah-Hartman

From: Dmitry Bogdanov <[email protected]>

[ Upstream commit 474fb1150d40780e71f0b569aeac4f375df3af3d ]

Set RSS indirection table and RSS hash key sizes to their real size.

---
 drivers/net/ethernet/aquantia/atlantic/aq_cfg.h | 4 ++--
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/aquantia/atlantic/aq_cfg.h +2 -2
index 91eb8910b1c99..90a0e1d0d6221 100644
@@ -42,8 +42,8 @@
 #define AQ_CFG_IS_LRO_DEF           1U
 
 /* RSS */
-#define AQ_CFG_RSS_INDIRECTION_TABLE_MAX  128U
-#define AQ_CFG_RSS_HASHKEY_SIZE           320U
+#define AQ_CFG_RSS_INDIRECTION_TABLE_MAX  64U
+#define AQ_CFG_RSS_HASHKEY_SIZE           40U
 
 #define AQ_CFG_IS_RSS_DEF           1U
 #define AQ_CFG_NUM_RSS_QUEUES_DEF   AQ_CFG_VECS_DEF
drivers/net/ethernet/aquantia/atlantic/aq_nic.c +1 -1
index 4f34808f1e064..8cc34b0bedc3a 100644
@@ -44,7 +44,7 @@ static void aq_nic_rss_init(struct aq_nic_s *self, unsigned int num_rss_queues)
 	struct aq_rss_parameters *rss_params = &cfg->aq_rss;
 	int i = 0;
 
-	static u8 rss_key[40] = {
+	static u8 rss_key[AQ_CFG_RSS_HASHKEY_SIZE] = {
 		0x1e, 0xad, 0x71, 0x87, 0x65, 0xfc, 0x26, 0x7d,
 		0x0d, 0x45, 0x67, 0x74, 0xcd, 0x06, 0x1a, 0x18,
 		0xb6, 0xc1, 0xf0, 0xc7, 0xbb, 0x18, 0xbe, 0xf8,
Signature · 1 line
2.20.1
author maintainer
#212 lore raw

PATCH 196/243 sched/fair: Scale bandwidth quota and period without losing quota/period ratio precision

In reply to Greg Kroah-Hartman

From: Xuewei Zhang <[email protected]>

commit 4929a4e6faa0f13289a67cae98139e727f0d4a97 upstream.

The quota/period ratio is used to ensure a child task group won't get more bandwidth than the parent task group, and is calculated as:

normalized_cfs_quota() = [(quota_us << 20) / period_us]

If the quota/period ratio was changed during this scaling due to precision loss, it will cause inconsistency between parent and child task groups.

See below example:

A userspace container manager (kubelet) does three operations:

1) Create a parent cgroup, set quota to 1,000us and period to 10,000us.
2) Create a few children cgroups.
3) Set quota to 1,000us and period to 10,000us on a child cgroup.

These operations are expected to succeed. However, if the scaling of 147/128 happens before step 3, quota and period of the parent cgroup will be changed:

new_quota: 1148437ns, 1148us
new_period: 11484375ns, 11484us

And when step 3 comes in, the ratio of the child cgroup will be 104857, which will be larger than the parent cgroup ratio (104821), and will fail.

Scaling them by a factor of 2 will fix the problem.

Cc Anton Blanchard <[email protected]>
Cc Ben Segall <[email protected]>
Cc Dietmar Eggemann <[email protected]>
Cc Juri Lelli <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vincent Guittot <[email protected]>
Fixes 2e8e19226398 ("sched/fair: Limit sched_cfs_period_timer() loop to avoid hard lockup")
---
 kernel/sched/fair.c |   34 +++++++++++++++++++++-------------
 1 file changed, 21 insertions(+), 13 deletions(-)
kernel/sched/fair.c +21 -13
@@ -4868,20 +4868,28 @@ static enum hrtimer_restart sched_cfs_pe
 		if (++count > 3) {
 			u64 new, old = ktime_to_ns(cfs_b->period);
 
-			new = (old * 147) / 128; /* ~115% */
-			new = min(new, max_cfs_quota_period);
+			/*
+			 * Grow period by a factor of 2 to avoid losing precision.
+			 * Precision loss in the quota/period ratio can cause __cfs_schedulable
+			 * to fail.
+			 */
+			new = old * 2;
+			if (new < max_cfs_quota_period) {
+				cfs_b->period = ns_to_ktime(new);
+				cfs_b->quota *= 2;
 
-			cfs_b->period = ns_to_ktime(new);
-
-			/* since max is 1s, this is limited to 1e9^2, which fits in u64 */
-			cfs_b->quota *= new;
-			cfs_b->quota = div64_u64(cfs_b->quota, old);
-
-			pr_warn_ratelimited(
-        "cfs_period_timer[cpu%d]: period too short, scaling up (new cfs_period_us %lld, cfs_quota_us = %lld)\n",
-	                        smp_processor_id(),
-	                        div_u64(new, NSEC_PER_USEC),
-                                div_u64(cfs_b->quota, NSEC_PER_USEC));
+				pr_warn_ratelimited(
+	"cfs_period_timer[cpu%d]: period too short, scaling up (new cfs_period_us = %lld, cfs_quota_us = %lld)\n",
+					smp_processor_id(),
+					div_u64(new, NSEC_PER_USEC),
+					div_u64(cfs_b->quota, NSEC_PER_USEC));
+			} else {
+				pr_warn_ratelimited(
+	"cfs_period_timer[cpu%d]: period too short, but cannot scale up without losing precision (cfs_period_us = %lld, cfs_quota_us = %lld)\n",
+					smp_processor_id(),
+					div_u64(old, NSEC_PER_USEC),
+					div_u64(cfs_b->quota, NSEC_PER_USEC));
+			}
 
 			/* reset count so we don't come right back in here */
 			count = 0;
author maintainer
#213 lore raw

PATCH 197/243 fuse: verify nlink

In reply to Greg Kroah-Hartman

From: Miklos Szeredi <[email protected]>

commit c634da718db9b2fac201df2ae1b1b095344ce5eb upstream.

When adding a new hard link, make sure that i_nlink doesn't overflow.

Fixes ac45d61357e8 ("fuse: fix nlink after unlink")
Cc <[email protected]> # v3.4
---
 fs/fuse/dir.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/fuse/dir.c +2 -1
@@ -837,7 +837,8 @@ static int fuse_link(struct dentry *entr
 
 		spin_lock(&fc->lock);
 		fi->attr_version = ++fc->attr_version;
-		inc_nlink(inode);
+		if (likely(inode->i_nlink < UINT_MAX))
+			inc_nlink(inode);
 		spin_unlock(&fc->lock);
 		fuse_invalidate_attr(inode);
 		fuse_update_ctime(inode);
author maintainer
#214 lore raw

PATCH 198/243 fuse: verify attributes

In reply to Greg Kroah-Hartman

From: Miklos Szeredi <[email protected]>

commit eb59bd17d2fa6e5e84fba61a5ebdea984222e6d5 upstream.

If a filesystem returns negative inode sizes, future reads on the file were causing the cpu to spin on truncate_pagecache.

Create a helper to validate the attributes. This now does two things:

- check the file mode
- check if the file size fits in i_size without overflowing

Fixes d8a5ba45457e ("[PATCH] FUSE - core")
Cc <[email protected]> # v2.6.14
---
 fs/fuse/dir.c    |   24 +++++++++++++++++-------
 fs/fuse/fuse_i.h |    2 ++
 2 files changed, 19 insertions(+), 7 deletions(-)
fs/fuse/dir.c +17 -7
@@ -234,7 +234,8 @@ static int fuse_dentry_revalidate(struct
 		kfree(forget);
 		if (ret == -ENOMEM)
 			goto out;
-		if (ret || (outarg.attr.mode ^ inode->i_mode) & S_IFMT)
+		if (ret || fuse_invalid_attr(&outarg.attr) ||
+		    (outarg.attr.mode ^ inode->i_mode) & S_IFMT)
 			goto invalid;
 
 		forget_all_cached_acls(inode);
@@ -297,6 +298,12 @@ int fuse_valid_type(int m)
 		S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m);
 }
 
+bool fuse_invalid_attr(struct fuse_attr *attr)
+{
+	return !fuse_valid_type(attr->mode) ||
+		attr->size > LLONG_MAX;
+}
+
 int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name,
 		     struct fuse_entry_out *outarg, struct inode **inode)
 {
@@ -328,7 +335,7 @@ int fuse_lookup_name(struct super_block
 	err = -EIO;
 	if (!outarg->nodeid)
 		goto out_put_forget;
-	if (!fuse_valid_type(outarg->attr.mode))
+	if (fuse_invalid_attr(&outarg->attr))
 		goto out_put_forget;
 
 	*inode = fuse_iget(sb, outarg->nodeid, outarg->generation,
@@ -451,7 +458,8 @@ static int fuse_create_open(struct inode
 		goto out_free_ff;
 
 	err = -EIO;
-	if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid))
+	if (!S_ISREG(outentry.attr.mode) || invalid_nodeid(outentry.nodeid) ||
+	    fuse_invalid_attr(&outentry.attr))
 		goto out_free_ff;
 
 	ff->fh = outopen.fh;
@@ -558,7 +566,7 @@ static int create_new_entry(struct fuse_
 		goto out_put_forget_req;
 
 	err = -EIO;
-	if (invalid_nodeid(outarg.nodeid))
+	if (invalid_nodeid(outarg.nodeid) || fuse_invalid_attr(&outarg.attr))
 		goto out_put_forget_req;
 
 	if ((outarg.attr.mode ^ mode) & S_IFMT)
@@ -918,7 +926,8 @@ static int fuse_do_getattr(struct inode
 	args.out.args[0].value = &outarg;
 	err = fuse_simple_request(fc, &args);
 	if (!err) {
-		if ((inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
+		if (fuse_invalid_attr(&outarg.attr) ||
+		    (inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
 			make_bad_inode(inode);
 			err = -EIO;
 		} else {
@@ -1230,7 +1239,7 @@ static int fuse_direntplus_link(struct f
 
 	if (invalid_nodeid(o->nodeid))
 		return -EIO;
-	if (!fuse_valid_type(o->attr.mode))
+	if (fuse_invalid_attr(&o->attr))
 		return -EIO;
 
 	fc = get_fuse_conn(dir);
@@ -1707,7 +1716,8 @@ int fuse_do_setattr(struct dentry *dentr
 		goto error;
 	}
 
-	if ((inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
+	if (fuse_invalid_attr(&outarg.attr) ||
+	    (inode->i_mode ^ outarg.attr.mode) & S_IFMT) {
 		make_bad_inode(inode);
 		err = -EIO;
 		goto error;
fs/fuse/fuse_i.h +2 -0
@@ -909,6 +909,8 @@ void fuse_ctl_remove_conn(struct fuse_co
  */
 int fuse_valid_type(int m);
 
+bool fuse_invalid_attr(struct fuse_attr *attr);
+
 /**
  * Is current process allowed to perform filesystem operation?
  */
author maintainer
#215 lore raw

PATCH 199/243 ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC

In reply to Greg Kroah-Hartman

From: Jian-Hong Pan <[email protected]>

commit 436e25505f3458cc92c7f3c985e9cbc198a98209 upstream.

Laptops like ASUS UX431FLC and UX431FL can share the same audio quirks. But UX431FLC needs one more step to enable the internal speaker: Pull the GPIO from CODEC to initialize the AMP.

Fixes 60083f9e94b2 ("ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL")
---
 sound/pci/hda/patch_realtek.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
sound/pci/hda/patch_realtek.c +9 -1
@@ -5701,6 +5701,7 @@ enum {
 	ALC299_FIXUP_PREDATOR_SPK,
 	ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC,
 	ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE,
+	ALC294_FIXUP_ASUS_INTSPK_GPIO,
 };
 
 static const struct hda_fixup alc269_fixups[] = {
@@ -6764,6 +6765,13 @@ static const struct hda_fixup alc269_fix
 		.chained = true,
 		.chain_id = ALC256_FIXUP_ASUS_HEADSET_MODE
 	},
+	[ALC294_FIXUP_ASUS_INTSPK_GPIO] = {
+		.type = HDA_FIXUP_FUNC,
+		/* The GPIO must be pulled to initialize the AMP */
+		.v.func = alc_fixup_gpio4,
+		.chained = true,
+		.chain_id = ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC
+	},
 };
 
 static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -6923,7 +6931,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK),
 	SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A),
 	SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC),
-	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC),
+	SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_INTSPK_GPIO),
 	SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
 	SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
author maintainer
#216 lore raw

PATCH 200/243 ALSA: hda/realtek - Enable the headset-mic on a Xiaomis laptop

In reply to Greg Kroah-Hartman

From: Hui Wang <[email protected]>

commit 695d1ec3994f9de2cefae80ee2087c95d2e5a2f3 upstream.

The headset on this machine is not defined, after applying the quirk ALC256_FIXUP_ASUS_HEADSET_MIC, the headset-mic works well

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -7038,6 +7038,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
 	SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MBXP", ALC256_FIXUP_HUAWEI_MBXP_PINS),
 	SND_PCI_QUIRK(0x1b7d, 0xa831, "Ordissimo EVE2 ", ALC269VB_FIXUP_ORDISSIMO_EVE2), /* Also known as Malata PC-B1303 */
+	SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
 	SND_PCI_QUIRK(0x10ec, 0x118c, "Medion EE4254 MD62100", ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE),
 
 #if 0
author maintainer
#217 lore raw

PATCH 201/243 ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236

In reply to Greg Kroah-Hartman

From: Kailang Yang <[email protected]>

commit e1e8c1fdce8b00fce08784d9d738c60ebf598ebc upstream.

headphone have noise even the volume is very small. Let it fill up pcbeep hidden register to default value. The issue was gone.

Fixes 4344aec84bd8 ("ALSA: hda/realtek - New codec support for ALC256")
Fixes 736f20a70608 ("ALSA: hda/realtek - Add support for ALC236/ALC3204")
---
 sound/pci/hda/patch_realtek.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +5 -2
@@ -379,9 +379,7 @@ static void alc_fill_eapd_coef(struct hd
 	case 0x10ec0215:
 	case 0x10ec0233:
 	case 0x10ec0235:
-	case 0x10ec0236:
 	case 0x10ec0255:
-	case 0x10ec0256:
 	case 0x10ec0257:
 	case 0x10ec0282:
 	case 0x10ec0283:
@@ -393,6 +391,11 @@ static void alc_fill_eapd_coef(struct hd
 	case 0x10ec0300:
 		alc_update_coef_idx(codec, 0x10, 1<<9, 0);
 		break;
+	case 0x10ec0236:
+	case 0x10ec0256:
+		alc_write_coef_idx(codec, 0x36, 0x5757);
+		alc_update_coef_idx(codec, 0x10, 1<<9, 0);
+		break;
 	case 0x10ec0275:
 		alc_update_coef_idx(codec, 0xe, 0, 1<<0);
 		break;
author maintainer
#218 lore raw

PATCH 202/243 ALSA: pcm: oss: Avoid potential buffer overflows

In reply to Greg Kroah-Hartman

From: Takashi Iwai <[email protected]>

commit 4cc8d6505ab82db3357613d36e6c58a297f57f7c upstream.

syzkaller reported an invalid access in PCM OSS read, and this seems to be an overflow of the internal buffer allocated for a plugin. Since the rate plugin adjusts its transfer size dynamically, the calculation for the chained plugin might be bigger than the given buffer size in some extreme cases, which lead to such an buffer overflow as caught by KASAN.

Fix it by limiting the max transfer size properly by checking against the destination size in each plugin transfer callback.

---
 sound/core/oss/linear.c |    2 ++
 sound/core/oss/mulaw.c  |    2 ++
 sound/core/oss/route.c  |    2 ++
 3 files changed, 6 insertions(+)
sound/core/oss/linear.c +2 -0
@@ -107,6 +107,8 @@ static snd_pcm_sframes_t linear_transfer
 		}
 	}
 #endif
+	if (frames > dst_channels[0].frames)
+		frames = dst_channels[0].frames;
 	convert(plugin, src_channels, dst_channels, frames);
 	return frames;
 }
sound/core/oss/mulaw.c +2 -0
@@ -269,6 +269,8 @@ static snd_pcm_sframes_t mulaw_transfer(
 		}
 	}
 #endif
+	if (frames > dst_channels[0].frames)
+		frames = dst_channels[0].frames;
 	data = (struct mulaw_priv *)plugin->extra_data;
 	data->func(plugin, src_channels, dst_channels, frames);
 	return frames;
sound/core/oss/route.c +2 -0
@@ -57,6 +57,8 @@ static snd_pcm_sframes_t route_transfer(
 		return -ENXIO;
 	if (frames == 0)
 		return 0;
+	if (frames > dst_channels[0].frames)
+		frames = dst_channels[0].frames;
 
 	nsrcs = plugin->src_format.channels;
 	ndsts = plugin->dst_format.channels;
author maintainer
#219 lore raw

PATCH 203/243 ALSA: hda - Add mute led support for HP ProBook 645 G4

In reply to Greg Kroah-Hartman

From: Kai-Heng Feng <[email protected]>

commit e190de6941db14813032af87873f5550ad5764fe upstream.

Mic mute led does not work on HP ProBook 645 G4. We can use CXT_FIXUP_MUTE_LED_GPIO fixup to support it.

---
 sound/pci/hda/patch_conexant.c |    1 +
 1 file changed, 1 insertion(+)
sound/pci/hda/patch_conexant.c +1 -0
@@ -923,6 +923,7 @@ static const struct snd_pci_quirk cxt506
 	SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO),
 	SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
+	SND_PCI_QUIRK(0x103c, 0x8402, "HP ProBook 645 G4", CXT_FIXUP_MUTE_LED_GPIO),
 	SND_PCI_QUIRK(0x103c, 0x8455, "HP Z2 G4", CXT_FIXUP_HP_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x8456, "HP Z2 G4 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x8457, "HP Z2 G4 mini", CXT_FIXUP_HP_MIC_NO_PRESENCE),
author maintainer
#220 lore raw

PATCH 204/243 Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus

In reply to Greg Kroah-Hartman

From: Hans Verkuil <[email protected]>

commit fc1156f373e3927e0dcf06678906c367588bfdd6 upstream.

Some Lenovo X1 Carbon Gen 6 laptops report LEN0091. Add this to the smbus_pnp_ids list.

---
 drivers/input/mouse/synaptics.c |    1 +
 1 file changed, 1 insertion(+)
drivers/input/mouse/synaptics.c +1 -0
@@ -175,6 +175,7 @@ static const char * const smbus_pnp_ids[
 	"LEN0071", /* T480 */
 	"LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
 	"LEN0073", /* X1 Carbon G5 (Elantech) */
+	"LEN0091", /* X1 Carbon 6 */
 	"LEN0092", /* X1 Carbon 6 */
 	"LEN0093", /* T480 */
 	"LEN0096", /* X280 */
author maintainer
#221 lore raw

PATCH 205/243 Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash

In reply to Greg Kroah-Hartman

From: Lucas Stach <[email protected]>

commit 86bcd3a12999447faad60ec59c2d64d18d8e61ac upstream.

F34 is a bit special as it reinitializes the device and related driver structs during the firmware update. This clears the fn_irq_mask which will then prevent F34 from receiving further interrupts, leading to timeouts during the firmware update. Make sure to reinitialize the IRQ enables at the appropriate times.

The issue is in F34 code, but the commit in the fixes tag exposed the issue, as before this commit things would work by accident.

Fixes 363c53875aef (Input: synaptics-rmi4 - avoid processing unknown IRQs)
---
 drivers/input/rmi4/rmi_f34v7.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/input/rmi4/rmi_f34v7.c +3 -0
@@ -1192,6 +1192,9 @@ int rmi_f34v7_do_reflash(struct f34_data
 {
 	int ret;
 
+	f34->fn->rmi_dev->driver->set_irq_bits(f34->fn->rmi_dev,
+					       f34->fn->irq_mask);
+
 	rmi_f34v7_read_queries_bl_version(f34);
 
 	f34->v7.image = fw->data;
author maintainer
#222 lore raw

PATCH 206/243 Input: synaptics-rmi4 - dont increment rmiaddr for SMBus transfers

In reply to Greg Kroah-Hartman

From: Hans Verkuil <[email protected]>

commit a284e11c371e446371675668d8c8120a27227339 upstream.

This increment of rmi_smbus in rmi_smb_read/write_block() causes garbage to be read/written.

The first read of SMB_MAX_COUNT bytes is fine, but after that it is nonsense. Trial-and-error showed that by dropping the increment of rmiaddr everything is fine and the F54 function properly works.

I tried a hack with rmi_smb_write_block() as well (writing to the same F54 touchpad data area, then reading it back), and that suggests that there too the rmiaddr increment has to be dropped. It makes sense that if it has to be dropped for read, then it has to be dropped for write as well.

It looks like the initial work with F54 was done using i2c, not smbus, and it seems nobody ever tested F54 with smbus. The other functions all read/write less than SMB_MAX_COUNT as far as I can tell, so this issue was never noticed with non-F54 functions.

With this change I can read out the touchpad data correctly on my Lenovo X1 Carbon 6th Gen laptop.

---
 drivers/input/rmi4/rmi_smbus.c |    2 --
 1 file changed, 2 deletions(-)
drivers/input/rmi4/rmi_smbus.c +0 -2
@@ -166,7 +166,6 @@ static int rmi_smb_write_block(struct rm
 		/* prepare to write next block of bytes */
 		cur_len -= SMB_MAX_COUNT;
 		databuff += SMB_MAX_COUNT;
-		rmiaddr += SMB_MAX_COUNT;
 	}
 exit:
 	mutex_unlock(&rmi_smb->page_mutex);
@@ -218,7 +217,6 @@ static int rmi_smb_read_block(struct rmi
 		/* prepare to read next block of bytes */
 		cur_len -= SMB_MAX_COUNT;
 		databuff += SMB_MAX_COUNT;
-		rmiaddr += SMB_MAX_COUNT;
 	}
 
 	retval = 0;
author maintainer
#223 lore raw

PATCH 207/243 Input: goodix - add upside-down quirk for Teclast X89 tablet

In reply to Greg Kroah-Hartman

From: Hans de Goede <[email protected]>

commit df5b5e555b356662a5e4a23c6774fdfce8547d54 upstream.

The touchscreen on the Teclast X89 is mounted upside down in relation to the display orientation (the touchscreen itself is mounted upright, but the display is mounted upside-down). Add a quirk for this so that we send coordinates which match the display orientation.

---
 drivers/input/touchscreen/goodix.c |    9 +++++++++
 1 file changed, 9 insertions(+)
drivers/input/touchscreen/goodix.c +9 -0
@@ -128,6 +128,15 @@ static const unsigned long goodix_irq_fl
 static const struct dmi_system_id rotated_screen[] = {
 #if defined(CONFIG_DMI) && defined(CONFIG_X86)
 	{
+		.ident = "Teclast X89",
+		.matches = {
+			/* tPAD is too generic, also match on bios date */
+			DMI_MATCH(DMI_BOARD_VENDOR, "TECLAST"),
+			DMI_MATCH(DMI_BOARD_NAME, "tPAD"),
+			DMI_MATCH(DMI_BIOS_DATE, "12/19/2014"),
+		},
+	},
+	{
 		.ident = "WinBook TW100",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "WinBook"),
author maintainer
#224 lore raw

PATCH 208/243 coresight: etm4x: Fix input validation for sysfs.

In reply to Greg Kroah-Hartman

From: Mike Leach <[email protected]>

commit 2fe6899e36aa174abefd017887f9cfe0cb60c43a upstream.

A number of issues are fixed relating to sysfs input validation:-

1) bb_ctrl_store() - incorrect compare of bit select field to absolute value. Reworked per ETMv4 specification.
2) seq_event_store() - incorrect mask value - register has two event values.
3) cyc_threshold_store() - must mask with max before checking min otherwise wrapped values can set illegal value below min.
4) res_ctrl_store() - update to mask off all res0 bits.

Fixes a77de2637c9eb ("coresight: etm4x: moving sysFS entries to a dedicated file")
Cc stable <[email protected]> # 4.9+
---
 drivers/hwtracing/coresight/coresight-etm4x-sysfs.c |   21 ++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)
drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +13 -8
@@ -655,10 +655,13 @@ static ssize_t cyc_threshold_store(struc
 
 	if (kstrtoul(buf, 16, &val))
 		return -EINVAL;
+
+	/* mask off max threshold before checking min value */
+	val &= ETM_CYC_THRESHOLD_MASK;
 	if (val < drvdata->ccitmin)
 		return -EINVAL;
 
-	config->ccctlr = val & ETM_CYC_THRESHOLD_MASK;
+	config->ccctlr = val;
 	return size;
 }
 static DEVICE_ATTR_RW(cyc_threshold);
@@ -689,14 +692,16 @@ static ssize_t bb_ctrl_store(struct devi
 		return -EINVAL;
 	if (!drvdata->nr_addr_cmp)
 		return -EINVAL;
+
 	/*
-	 * Bit[7:0] selects which address range comparator is used for
-	 * branch broadcast control.
+	 * Bit[8] controls include(1) / exclude(0), bits[0-7] select
+	 * individual range comparators. If include then at least 1
+	 * range must be selected.
 	 */
-	if (BMVAL(val, 0, 7) > drvdata->nr_addr_cmp)
+	if ((val & BIT(8)) && (BMVAL(val, 0, 7) == 0))
 		return -EINVAL;
 
-	config->bb_ctrl = val;
+	config->bb_ctrl = val & GENMASK(8, 0);
 	return size;
 }
 static DEVICE_ATTR_RW(bb_ctrl);
@@ -1329,8 +1334,8 @@ static ssize_t seq_event_store(struct de
 
 	spin_lock(&drvdata->spinlock);
 	idx = config->seq_idx;
-	/* RST, bits[7:0] */
-	config->seq_ctrl[idx] = val & 0xFF;
+	/* Seq control has two masks B[15:8] F[7:0] */
+	config->seq_ctrl[idx] = val & 0xFFFF;
 	spin_unlock(&drvdata->spinlock);
 	return size;
 }
@@ -1585,7 +1590,7 @@ static ssize_t res_ctrl_store(struct dev
 	if (idx % 2 != 0)
 		/* PAIRINV, bit[21] */
 		val &= ~BIT(21);
-	config->res_ctrl[idx] = val;
+	config->res_ctrl[idx] = val & GENMASK(21, 0);
 	spin_unlock(&drvdata->spinlock);
 	return size;
 }
author maintainer
#225 lore raw

PATCH 209/243 Input: Fix memory leak in psxpad_spi_probe

In reply to Greg Kroah-Hartman

From: Navid Emamdoost <[email protected]>

In the implementation of psxpad_spi_probe() the allocated memory for pdev is leaked if psxpad_spi_init_ff() or input_register_polled_device() fail. The solution is using device managed allocation, like the one used for pad. Perform the allocation using devm_input_allocate_polled_device().

Fixes 8be193c7b1f4 ("Input: add support for PlayStation 1/2 joypads connected via SPI")
---
 drivers/input/joystick/psxpad-spi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/psxpad-spi.c +1 -1
@@ -292,7 +292,7 @@ static int psxpad_spi_probe(struct spi_d
 	if (!pad)
 		return -ENOMEM;
 
-	pdev = input_allocate_polled_device();
+	pdev = devm_input_allocate_polled_device(&spi->dev);
 	if (!pdev) {
 		dev_err(&spi->dev, "failed to allocate input device\n");
 		return -ENOMEM;
author maintainer
#226 lore raw

PATCH 210/243 x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all()

In reply to Greg Kroah-Hartman

From: Joerg Roedel <[email protected]>

commit 9a62d20027da3164a22244d9f022c0c987261687 upstream.

The job of vmalloc_sync_all() is to help the lazy freeing of vmalloc()
ranges: before such vmap ranges are reused we make sure that they are unmapped from every task's page tables.

This is really easy on pagetable setups where the kernel page tables are shared between all tasks - this is the case on 32-bit kernels with SHARED_KERNEL_PMD = 1.

But on !SHARED_KERNEL_PMD 32-bit kernels this involves iterating over the pgd_list and clearing all pmd entries in the pgds that are cleared in the init_mm.pgd, which is the reference pagetable that the vmalloc() code uses.

In that context the current practice of vmalloc_sync_all() iterating until FIX_ADDR_TOP is buggy:

        for (address = VMALLOC_START & PMD_MASK;
             address >= TASK_SIZE_MAX && address < FIXADDR_TOP;
             address += PMD_SIZE) {
                struct page *page;

Because iterating up to FIXADDR_TOP will involve a lot of non-vmalloc address ranges:

	VMALLOC -> PKMAP -> LDT -> CPU_ENTRY_AREA -> FIX_ADDR

This is mostly harmless for the FIX_ADDR and CPU_ENTRY_AREA ranges that don't clear their pmds, but it's lethal for the LDT range, which relies on having different mappings in different processes, and 'synchronizing' them in the vmalloc sense corrupts those pagetable entries (clearing them).

This got particularly prominent with PTI, which turns SHARED_KERNEL_PMD off and makes this the dominant mapping mode on 32-bit.

To make LDT working again vmalloc_sync_all() must only iterate over the volatile parts of the kernel address range that are identical between all processes.

So the correct check in vmalloc_sync_all() is "address < VMALLOC_END" to make sure the VMALLOC areas are synchronized and the LDT mapping is not falsely overwritten.

The CPU_ENTRY_AREA and the FIXMAP area are no longer synced either, but this is not really a proplem since their PMDs get established during bootup and never change.

This change fixes the ldt_gdt selftest in my setup.

[ mingo: Fixed up the changelog to explain the logic and modified the
copying to only happen up until VMALLOC_END. ]

Cc Andy Lutomirski <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Fixes 7757d607c6b3: ("x86/pti: Allow CONFIG_PAGE_TABLE_ISOLATION for x86_32")
---
 arch/x86/mm/fault.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/fault.c +1 -1
@@ -281,7 +281,7 @@ void vmalloc_sync_all(void)
 		return;
 
 	for (address = VMALLOC_START & PMD_MASK;
-	     address >= TASK_SIZE_MAX && address < FIXADDR_TOP;
+	     address >= TASK_SIZE_MAX && address < VMALLOC_END;
 	     address += PMD_SIZE) {
 		struct page *page;
 
author maintainer
#227 lore raw

PATCH 211/243 x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect

In reply to Greg Kroah-Hartman

From: Kai-Heng Feng <[email protected]>

commit 7e8ce0e2b036dbc6617184317983aea4f2c52099 upstream.

The AMD FCH USB XHCI Controller advertises support for generating PME# while in D0. When in D0, it does signal PME# for USB 3.0 connect events, but not for USB 2.0 or USB 1.1 connect events, which means the controller doesn't wake correctly for those events.

00:10.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:7914] (rev 20) (prog-if 30 [XHCI])
Subsystem: Dell FCH USB XHCI Controller [1028:087e]
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)

Clear PCI_PM_CAP_PME_D0 in dev->pme_support to indicate the device will not assert PME# from D0 so we don't rely on it.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203673

---
 arch/x86/pci/fixup.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
arch/x86/pci/fixup.c +11 -0
@@ -589,6 +589,17 @@ static void pci_fixup_amd_ehci_pme(struc
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x7808, pci_fixup_amd_ehci_pme);
 
 /*
+ * Device [1022:7914]
+ * When in D0, PME# doesn't get asserted when plugging USB 2.0 device.
+ */
+static void pci_fixup_amd_fch_xhci_pme(struct pci_dev *dev)
+{
+	dev_info(&dev->dev, "PME# does not work under D0, disabling it\n");
+	dev->pme_support &= ~(PCI_PM_CAP_PME_D0 >> PCI_PM_CAP_PME_SHIFT);
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x7914, pci_fixup_amd_fch_xhci_pme);
+
+/*
  * Apple MacBook Pro: Avoid [mem 0x7fa00000-0x7fbfffff]
  *
  * Using the [mem 0x7fa00000-0x7fbfffff] region, e.g., by assigning it to
author maintainer
#228 lore raw

PATCH 212/243 xfrm interface: fix memory leak on creation

In reply to Greg Kroah-Hartman

From: Nicolas Dichtel <[email protected]>

commit 56c5ee1a5823e9cf5288b84ae6364cb4112f8225 upstream.

The following commands produce a backtrace and return an error but the xfrm interface is created (in the wrong netns):

$ ip netns add foo
$ ip netns add bar
$ ip -n foo netns set bar 0
$ ip -n foo link add xfrmi0 link-netnsid 0 type xfrm dev lo if_id 23
RTNETLINK answers: Invalid argument
$ ip -n bar link ls xfrmi0
2: xfrmi0@lo: <NOARP,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 00:00:00:00:00:00 brd 00:00:00:00:00:00

Here is the backtrace:

[   79.879174] WARNING: CPU: 0 PID: 1178 at net/core/dev.c:8172 rollback_registered_many+0x86/0x3c1
[   79.880260] Modules linked in: xfrm_interface nfsv3 nfs_acl auth_rpcgss nfsv4 nfs lockd grace sunrpc fscache button parport_pc parport serio_raw evdev pcspkr loop ext4 crc16 mbcache jbd2 crc32c_generic ide_cd_mod ide_gd_mod cdrom ata_$
eneric ata_piix libata scsi_mod 8139too piix psmouse i2c_piix4 ide_core 8139cp mii i2c_core floppy
[   79.883698] CPU: 0 PID: 1178 Comm: ip Not tainted 5.2.0-rc6+ #106
[   79.884462] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[   79.885447] RIP: 0010:rollback_registered_many+0x86/0x3c1
[   79.886120] Code: 01 e8 d7 7d c6 ff 0f 0b 48 8b 45 00 4c 8b 20 48 8d 58 90 49 83 ec 70 48 8d 7b 70 48 39 ef 74 44 8a 83 d0 04 00 00 84 c0 75 1f <0f> 0b e8 61 cd ff ff 48 b8 00 01 00 00 00 00 ad de 48 89 43 70 66
[   79.888667] RSP: 0018:ffffc900015ab740 EFLAGS: 00010246
[   79.889339] RAX: ffff8882353e5700 RBX: ffff8882353e56a0 RCX: ffff8882353e5710
[   79.890174] RDX: ffffc900015ab7e0 RSI: ffffc900015ab7e0 RDI: ffff8882353e5710
[   79.891029] RBP: ffffc900015ab7e0 R08: ffffc900015ab7e0 R09: ffffc900015ab7e0
[   79.891866] R10: ffffc900015ab7a0 R11: ffffffff82233fec R12: ffffc900015ab770
[   79.892728] R13: ffffffff81eb7ec0 R14: ffff88822ed6cf00 R15: 00000000ffffffea
[   79.893557] FS:  00007ff350f31740(0000) GS:ffff888237a00000(0000) knlGS:0000000000000000
[   79.894581] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   79.895317] CR2: 00000000006c8580 CR3: 000000022c272000 CR4: 00000000000006f0
[   79.896137] Call Trace:
[   79.896464]  unregister_netdevice_many+0x12/0x6c
[   79.896998]  __rtnl_newlink+0x6e2/0x73b
[   79.897446]  ? __kmalloc_node_track_caller+0x15e/0x185
[   79.898039]  ? pskb_expand_head+0x5f/0x1fe
[   79.898556]  ? stack_access_ok+0xd/0x2c
[   79.899009]  ? deref_stack_reg+0x12/0x20
[   79.899462]  ? stack_access_ok+0xd/0x2c
[   79.899927]  ? stack_access_ok+0xd/0x2c
[   79.900404]  ? __module_text_address+0x9/0x4f
[   79.900910]  ? is_bpf_text_address+0x5/0xc
[   79.901390]  ? kernel_text_address+0x67/0x7b
[   79.901884]  ? __kernel_text_address+0x1a/0x25
[   79.902397]  ? unwind_get_return_address+0x12/0x23
[   79.903122]  ? __cmpxchg_double_slab.isra.37+0x46/0x77
[   79.903772]  rtnl_newlink+0x43/0x56
[   79.904217]  rtnetlink_rcv_msg+0x200/0x24c

In fact, each time a xfrm interface was created, a netdev was allocated by __rtnl_newlink()/rtnl_create_link() and then another one by xfrmi_newlink()/xfrmi_create(). Only the second one was registered, it's why the previous commands produce a backtrace: dev_change_net_namespace() was called on a netdev with reg_state set to NETREG_UNINITIALIZED (the first one).

CC Lorenzo Colitti <[email protected]>
CC Benedict Wong <[email protected]>
CC Steffen Klassert <[email protected]>
CC Shannon Nelson <[email protected]>
CC Antony Antony <[email protected]>
CC Eyal Birger <[email protected]>
Fixes f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
---
 net/xfrm/xfrm_interface.c |   98 +++++++++++++---------------------------------
 1 file changed, 28 insertions(+), 70 deletions(-)
net/xfrm/xfrm_interface.c +28 -70
@@ -133,7 +133,7 @@ static void xfrmi_dev_free(struct net_de
 	free_percpu(dev->tstats);
 }
 
-static int xfrmi_create2(struct net_device *dev)
+static int xfrmi_create(struct net_device *dev)
 {
 	struct xfrm_if *xi = netdev_priv(dev);
 	struct net *net = dev_net(dev);
@@ -156,54 +156,7 @@ out:
 	return err;
 }
 
-static struct xfrm_if *xfrmi_create(struct net *net, struct xfrm_if_parms *p)
-{
-	struct net_device *dev;
-	struct xfrm_if *xi;
-	char name[IFNAMSIZ];
-	int err;
-
-	if (p->name[0]) {
-		strlcpy(name, p->name, IFNAMSIZ);
-	} else {
-		err = -EINVAL;
-		goto failed;
-	}
-
-	dev = alloc_netdev(sizeof(*xi), name, NET_NAME_UNKNOWN, xfrmi_dev_setup);
-	if (!dev) {
-		err = -EAGAIN;
-		goto failed;
-	}
-
-	dev_net_set(dev, net);
-
-	xi = netdev_priv(dev);
-	xi->p = *p;
-	xi->net = net;
-	xi->dev = dev;
-	xi->phydev = dev_get_by_index(net, p->link);
-	if (!xi->phydev) {
-		err = -ENODEV;
-		goto failed_free;
-	}
-
-	err = xfrmi_create2(dev);
-	if (err < 0)
-		goto failed_dev_put;
-
-	return xi;
-
-failed_dev_put:
-	dev_put(xi->phydev);
-failed_free:
-	free_netdev(dev);
-failed:
-	return ERR_PTR(err);
-}
-
-static struct xfrm_if *xfrmi_locate(struct net *net, struct xfrm_if_parms *p,
-				   int create)
+static struct xfrm_if *xfrmi_locate(struct net *net, struct xfrm_if_parms *p)
 {
 	struct xfrm_if __rcu **xip;
 	struct xfrm_if *xi;
@@ -211,17 +164,11 @@ static struct xfrm_if *xfrmi_locate(stru
 
 	for (xip = &xfrmn->xfrmi[0];
 	     (xi = rtnl_dereference(*xip)) != NULL;
-	     xip = &xi->next) {
-		if (xi->p.if_id == p->if_id) {
-			if (create)
-				return ERR_PTR(-EEXIST);
-
+	     xip = &xi->next)
+		if (xi->p.if_id == p->if_id)
 			return xi;
-		}
-	}
-	if (!create)
-		return ERR_PTR(-ENODEV);
-	return xfrmi_create(net, p);
+
+	return NULL;
 }
 
 static void xfrmi_dev_uninit(struct net_device *dev)
@@ -689,21 +636,33 @@ static int xfrmi_newlink(struct net *src
 			struct netlink_ext_ack *extack)
 {
 	struct net *net = dev_net(dev);
-	struct xfrm_if_parms *p;
+	struct xfrm_if_parms p;
 	struct xfrm_if *xi;
+	int err;
 
-	xi = netdev_priv(dev);
-	p = &xi->p;
-
-	xfrmi_netlink_parms(data, p);
+	xfrmi_netlink_parms(data, &p);
 
 	if (!tb[IFLA_IFNAME])
 		return -EINVAL;
 
-	nla_strlcpy(p->name, tb[IFLA_IFNAME], IFNAMSIZ);
+	nla_strlcpy(p.name, tb[IFLA_IFNAME], IFNAMSIZ);
 
-	xi = xfrmi_locate(net, p, 1);
-	return PTR_ERR_OR_ZERO(xi);
+	xi = xfrmi_locate(net, &p);
+	if (xi)
+		return -EEXIST;
+
+	xi = netdev_priv(dev);
+	xi->p = p;
+	xi->net = net;
+	xi->dev = dev;
+	xi->phydev = dev_get_by_index(net, p.link);
+	if (!xi->phydev)
+		return -ENODEV;
+
+	err = xfrmi_create(dev);
+	if (err < 0)
+		dev_put(xi->phydev);
+	return err;
 }
 
 static void xfrmi_dellink(struct net_device *dev, struct list_head *head)
@@ -720,9 +679,8 @@ static int xfrmi_changelink(struct net_d
 
 	xfrmi_netlink_parms(data, &xi->p);
 
-	xi = xfrmi_locate(net, &xi->p, 0);
-
-	if (IS_ERR_OR_NULL(xi)) {
+	xi = xfrmi_locate(net, &xi->p);
+	if (!xi) {
 		xi = netdev_priv(dev);
 	} else {
 		if (xi->dev != dev)
author maintainer
#229 lore raw

PATCH 213/243 xfrm interface: avoid corruption on changelink

In reply to Greg Kroah-Hartman

From: Nicolas Dichtel <[email protected]>

commit e9e7e85d75f3731079ffd77c1a66f037aef04fe7 upstream.

The new parameters must not be stored in the netdev_priv() before validation, it may corrupt the interface. Note also that if data is NULL, only a memset() is done.

$ ip link add xfrm1 type xfrm dev lo if_id 1
$ ip link add xfrm2 type xfrm dev lo if_id 2
$ ip link set xfrm1 type xfrm dev lo if_id 2
RTNETLINK answers: File exists
$ ip -d link list dev xfrm1
5: xfrm1@lo: <NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 minmtu 68 maxmtu 1500
    xfrm if_id 0x2 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

=> "if_id 0x2"

Fixes f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
---
 net/xfrm/xfrm_interface.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
net/xfrm/xfrm_interface.c +5 -5
@@ -674,12 +674,12 @@ static int xfrmi_changelink(struct net_d
 			   struct nlattr *data[],
 			   struct netlink_ext_ack *extack)
 {
-	struct xfrm_if *xi = netdev_priv(dev);
 	struct net *net = dev_net(dev);
+	struct xfrm_if_parms p;
+	struct xfrm_if *xi;
 
-	xfrmi_netlink_parms(data, &xi->p);
-
-	xi = xfrmi_locate(net, &xi->p);
+	xfrmi_netlink_parms(data, &p);
+	xi = xfrmi_locate(net, &p);
 	if (!xi) {
 		xi = netdev_priv(dev);
 	} else {
@@ -687,7 +687,7 @@ static int xfrmi_changelink(struct net_d
 			return -EEXIST;
 	}
 
-	return xfrmi_update(xi, &xi->p);
+	return xfrmi_update(xi, &p);
 }
 
 static size_t xfrmi_get_size(const struct net_device *dev)
author maintainer
#230 lore raw

PATCH 214/243 xfrm interface: fix list corruption for x-netns

In reply to Greg Kroah-Hartman

From: Nicolas Dichtel <[email protected]>

commit c5d1030f23002430c2a336b2b629b9d6f72b3564 upstream.

dev_net(dev) is the netns of the device and xi->net is the link netns, where the device has been linked.
changelink() must operate in the link netns to avoid a corruption of the xfrm lists.

Note that xi->net and dev_net(xi->physdev) are always the same.

Before the patch, the xfrmi lists may be corrupted and can later trigger a kernel panic.

Fixes f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
---
 net/xfrm/xfrm_interface.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
net/xfrm/xfrm_interface.c +4 -4
@@ -505,7 +505,7 @@ static int xfrmi_change(struct xfrm_if *
 
 static int xfrmi_update(struct xfrm_if *xi, struct xfrm_if_parms *p)
 {
-	struct net *net = dev_net(xi->dev);
+	struct net *net = xi->net;
 	struct xfrmi_net *xfrmn = net_generic(net, xfrmi_net_id);
 	int err;
 
@@ -674,9 +674,9 @@ static int xfrmi_changelink(struct net_d
 			   struct nlattr *data[],
 			   struct netlink_ext_ack *extack)
 {
-	struct net *net = dev_net(dev);
+	struct xfrm_if *xi = netdev_priv(dev);
+	struct net *net = xi->net;
 	struct xfrm_if_parms p;
-	struct xfrm_if *xi;
 
 	xfrmi_netlink_parms(data, &p);
 	xi = xfrmi_locate(net, &p);
@@ -718,7 +718,7 @@ struct net *xfrmi_get_link_net(const str
 {
 	struct xfrm_if *xi = netdev_priv(dev);
 
-	return dev_net(xi->phydev);
+	return xi->net;
 }
 
 static const struct nla_policy xfrmi_policy[IFLA_XFRM_MAX + 1] = {
author maintainer
#231 lore raw

PATCH 215/243 xfrm interface: fix management of phydev

In reply to Greg Kroah-Hartman

From: Nicolas Dichtel <[email protected]>

commit 22d6552f827ef76ade3edf6bbb3f05048a0a7d8b upstream.

With the current implementation, phydev cannot be removed:

$ ip link add dummy type dummy
$ ip link add xfrm1 type xfrm dev dummy if_id 1
$ ip l d dummy
 kernel:[77938.465445] unregister_netdevice: waiting for dummy to become free. Usage count = 1

Manage it like in ip tunnels, ie just keep the ifindex. Not that the side effect, is that the phydev is now optional.

Fixes f203b76d7809 ("xfrm: Add virtual xfrm interfaces")
---
 include/net/xfrm.h        |    1 -
 net/xfrm/xfrm_interface.c |   34 ++++++++++++++++++----------------
 2 files changed, 18 insertions(+), 17 deletions(-)
include/net/xfrm.h +0 -1
@@ -1062,7 +1062,6 @@ struct xfrm_if_parms {
 struct xfrm_if {
 	struct xfrm_if __rcu *next;	/* next interface in list */
 	struct net_device *dev;		/* virtual device associated with interface */
-	struct net_device *phydev;	/* physical device */
 	struct net *net;		/* netns for packet i/o */
 	struct xfrm_if_parms p;		/* interface parms */
 
net/xfrm/xfrm_interface.c +18 -16
@@ -177,7 +177,6 @@ static void xfrmi_dev_uninit(struct net_
 	struct xfrmi_net *xfrmn = net_generic(xi->net, xfrmi_net_id);
 
 	xfrmi_unlink(xfrmn, xi);
-	dev_put(xi->phydev);
 	dev_put(dev);
 }
 
@@ -364,7 +363,7 @@ static netdev_tx_t xfrmi_xmit(struct sk_
 		goto tx_err;
 	}
 
-	fl.flowi_oif = xi->phydev->ifindex;
+	fl.flowi_oif = xi->p.link;
 
 	ret = xfrmi_xmit2(skb, dev, &fl);
 	if (ret < 0)
@@ -553,7 +552,7 @@ static int xfrmi_get_iflink(const struct
 {
 	struct xfrm_if *xi = netdev_priv(dev);
 
-	return xi->phydev->ifindex;
+	return xi->p.link;
 }
 
 
@@ -579,12 +578,14 @@ static void xfrmi_dev_setup(struct net_d
 	dev->needs_free_netdev	= true;
 	dev->priv_destructor	= xfrmi_dev_free;
 	netif_keep_dst(dev);
+
+	eth_broadcast_addr(dev->broadcast);
 }
 
 static int xfrmi_dev_init(struct net_device *dev)
 {
 	struct xfrm_if *xi = netdev_priv(dev);
-	struct net_device *phydev = xi->phydev;
+	struct net_device *phydev = __dev_get_by_index(xi->net, xi->p.link);
 	int err;
 
 	dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
@@ -599,13 +600,19 @@ static int xfrmi_dev_init(struct net_dev
 
 	dev->features |= NETIF_F_LLTX;
 
-	dev->needed_headroom = phydev->needed_headroom;
-	dev->needed_tailroom = phydev->needed_tailroom;
-
-	if (is_zero_ether_addr(dev->dev_addr))
-		eth_hw_addr_inherit(dev, phydev);
-	if (is_zero_ether_addr(dev->broadcast))
-		memcpy(dev->broadcast, phydev->broadcast, dev->addr_len);
+	if (phydev) {
+		dev->needed_headroom = phydev->needed_headroom;
+		dev->needed_tailroom = phydev->needed_tailroom;
+
+		if (is_zero_ether_addr(dev->dev_addr))
+			eth_hw_addr_inherit(dev, phydev);
+		if (is_zero_ether_addr(dev->broadcast))
+			memcpy(dev->broadcast, phydev->broadcast,
+			       dev->addr_len);
+	} else {
+		eth_hw_addr_random(dev);
+		eth_broadcast_addr(dev->broadcast);
+	}
 
 	return 0;
 }
@@ -655,13 +662,8 @@ static int xfrmi_newlink(struct net *src
 	xi->p = p;
 	xi->net = net;
 	xi->dev = dev;
-	xi->phydev = dev_get_by_index(net, p.link);
-	if (!xi->phydev)
-		return -ENODEV;
 
 	err = xfrmi_create(dev);
-	if (err < 0)
-		dev_put(xi->phydev);
 	return err;
 }
 
author maintainer
#232 lore raw

PATCH 216/243 CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks

In reply to Greg Kroah-Hartman

From: Pavel Shilovsky <[email protected]>

commit 6f582b273ec23332074d970a7fb25bef835df71f upstream.

Currently when the client creates a cifsFileInfo structure for a newly opened file, it allocates a list of byte-range locks with a pointer to the new cfile and attaches this list to the inode's lock list. The latter happens before initializing all other fields, e.g. cfile->tlink. Thus a partially initialized cifsFileInfo structure becomes available to other threads that walk through the inode's lock list. One example of such a thread may be an oplock break worker thread that tries to push all cached byte-range locks. This causes NULL-pointer dereference in smb2_push_mandatory_locks() when accessing cfile->tlink:

[598428.945633] BUG: kernel NULL pointer dereference, address: 0000000000000038
...
[598428.945749] Workqueue: cifsoplockd cifs_oplock_break [cifs]
[598428.945793] RIP: 0010:smb2_push_mandatory_locks+0xd6/0x5a0 [cifs]
...
[598428.945834] Call Trace:
[598428.945870]  ? cifs_revalidate_mapping+0x45/0x90 [cifs]
[598428.945901]  cifs_oplock_break+0x13d/0x450 [cifs]
[598428.945909]  process_one_work+0x1db/0x380
[598428.945914]  worker_thread+0x4d/0x400
[598428.945921]  kthread+0x104/0x140
[598428.945925]  ? process_one_work+0x380/0x380
[598428.945931]  ? kthread_park+0x80/0x80
[598428.945937]  ret_from_fork+0x35/0x40

Fix this by reordering initialization steps of the cifsFileInfo
structure: initialize all the fields first and then add the new byte-range lock list to the inode's lock list.

---
 fs/cifs/file.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
fs/cifs/file.c +4 -3
@@ -312,9 +312,6 @@ cifs_new_fileinfo(struct cifs_fid *fid,
 	INIT_LIST_HEAD(&fdlocks->locks);
 	fdlocks->cfile = cfile;
 	cfile->llist = fdlocks;
-	cifs_down_write(&cinode->lock_sem);
-	list_add(&fdlocks->llist, &cinode->llist);
-	up_write(&cinode->lock_sem);
 
 	cfile->count = 1;
 	cfile->pid = current->tgid;
@@ -338,6 +335,10 @@ cifs_new_fileinfo(struct cifs_fid *fid,
 		oplock = 0;
 	}
 
+	cifs_down_write(&cinode->lock_sem);
+	list_add(&fdlocks->llist, &cinode->llist);
+	up_write(&cinode->lock_sem);
+
 	spin_lock(&tcon->open_file_lock);
 	if (fid->pending_open->oplock != CIFS_OPLOCK_NO_CHANGE && oplock)
 		oplock = fid->pending_open->oplock;
author maintainer
#233 lore raw

PATCH 217/243 CIFS: Fix SMB2 oplock break processing

In reply to Greg Kroah-Hartman

From: Pavel Shilovsky <[email protected]>

commit fa9c2362497fbd64788063288dc4e74daf977ebb upstream.

Even when mounting modern protocol version the server may be configured without supporting SMB2.1 leases and the client uses SMB2 oplock to optimize IO performance through local caching.

However there is a problem in oplock break handling that leads to missing a break notification on the client who has a file opened. It latter causes big latencies to other clients that are trying to open the same file.

The problem reproduces when there are multiple shares from the same server mounted on the client. The processing code tries to match persistent and volatile file ids from the break notification with an open file but it skips all share besides the first one. Fix this by looking up in all shares belonging to the server that issued the oplock break.

---
 fs/cifs/smb2misc.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
fs/cifs/smb2misc.c +3 -4
@@ -673,10 +673,10 @@ smb2_is_valid_oplock_break(char *buffer,
 	spin_lock(&cifs_tcp_ses_lock);
 	list_for_each(tmp, &server->smb_ses_list) {
 		ses = list_entry(tmp, struct cifs_ses, smb_ses_list);
+
 		list_for_each(tmp1, &ses->tcon_list) {
 			tcon = list_entry(tmp1, struct cifs_tcon, tcon_list);
 
-			cifs_stats_inc(&tcon->stats.cifs_stats.num_oplock_brks);
 			spin_lock(&tcon->open_file_lock);
 			list_for_each(tmp2, &tcon->openFileList) {
 				cfile = list_entry(tmp2, struct cifsFileInfo,
@@ -688,6 +688,8 @@ smb2_is_valid_oplock_break(char *buffer,
 					continue;
 
 				cifs_dbg(FYI, "file id match, oplock break\n");
+				cifs_stats_inc(
+				    &tcon->stats.cifs_stats.num_oplock_brks);
 				cinode = CIFS_I(d_inode(cfile->dentry));
 				spin_lock(&cfile->file_info_lock);
 				if (!CIFS_CACHE_WRITE(cinode) &&
@@ -720,9 +722,6 @@ smb2_is_valid_oplock_break(char *buffer,
 				return true;
 			}
 			spin_unlock(&tcon->open_file_lock);
-			spin_unlock(&cifs_tcp_ses_lock);
-			cifs_dbg(FYI, "No matching file for oplock break\n");
-			return true;
 		}
 	}
 	spin_unlock(&cifs_tcp_ses_lock);
author maintainer
#234 lore raw

PATCH 218/243 tty: vt: keyboard: reject invalid keycodes

In reply to Greg Kroah-Hartman

From: Dmitry Torokhov <[email protected]>

commit b2b2dd71e0859436d4e05b2f61f86140250ed3f8 upstream.

Do not try to handle keycodes that are too big, otherwise we risk doing out-of-bounds writes:

BUG: KASAN: global-out-of-bounds in clear_bit include/asm-generic/bitops-instrumented.h:56 [inline]
BUG: KASAN: global-out-of-bounds in kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline]
BUG: KASAN: global-out-of-bounds in kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495
Write of size 8 at addr ffffffff89a1b2d8 by task syz-executor108/1722
...
 kbd_keycode drivers/tty/vt/keyboard.c:1411 [inline]
 kbd_event+0xe6b/0x3790 drivers/tty/vt/keyboard.c:1495
 input_to_handler+0x3b6/0x4c0 drivers/input/input.c:118
 input_pass_values.part.0+0x2e3/0x720 drivers/input/input.c:145
 input_pass_values drivers/input/input.c:949 [inline]
 input_set_keycode+0x290/0x320 drivers/input/input.c:954
 evdev_handle_set_keycode_v2+0xc4/0x120 drivers/input/evdev.c:882
 evdev_do_ioctl drivers/input/evdev.c:1150 [inline]

In this case we were dealing with a fuzzed HID device that declared over 12K buttons, and while HID layer should not be reporting to us such big keycodes, we should also be defensive and reject invalid data ourselves as well.

---
 drivers/tty/vt/keyboard.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/vt/keyboard.c +1 -1
@@ -1491,7 +1491,7 @@ static void kbd_event(struct input_handl
 
 	if (event_type == EV_MSC && event_code == MSC_RAW && HW_RAW(handle->dev))
 		kbd_rawcode(value);
-	if (event_type == EV_KEY)
+	if (event_type == EV_KEY && event_code <= KEY_MAX)
 		kbd_keycode(event_code, value, HW_RAW(handle->dev));
 
 	spin_unlock(&kbd_event_lock);
author maintainer
#235 lore raw

PATCH 219/243 can: slcan: Fix use-after-free Read in slcan_open

In reply to Greg Kroah-Hartman

From: Jouni Hogander <[email protected]>

commit 9ebd796e24008f33f06ebea5a5e6aceb68b51794 upstream.

Slcan_open doesn't clean-up device which registration failed from the slcan_devs device list. On next open this list is iterated and freed device is accessed. Fix this by calling slc_free_netdev in error path.

Driver/net/can/slcan.c is derived from slip.c. Use-after-free error was identified in slip_open by syzboz. Same bug is in slcan.c. Here is the trace from the Syzbot slip report:

__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x197/0x210 lib/dump_stack.c:118
print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374
__kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506
kasan_report+0x12/0x20 mm/kasan/common.c:634
__asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
sl_sync drivers/net/slip/slip.c:725 [inline]
slip_open+0xecd/0x11b7 drivers/net/slip/slip.c:801
tty_ldisc_open.isra.0+0xa3/0x110 drivers/tty/tty_ldisc.c:469
tty_set_ldisc+0x30e/0x6b0 drivers/tty/tty_ldisc.c:596
tiocsetd drivers/tty/tty_io.c:2334 [inline]
tty_ioctl+0xe8d/0x14f0 drivers/tty/tty_io.c:2594
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:509 [inline]
do_vfs_ioctl+0xdb6/0x13e0 fs/ioctl.c:696
ksys_ioctl+0xab/0xd0 fs/ioctl.c:713
__do_sys_ioctl fs/ioctl.c:720 [inline]
__se_sys_ioctl fs/ioctl.c:718 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Fixes ed50e1600b44 ("slcan: Fix memory leak in error path")
Cc Wolfgang Grandegger <[email protected]>
Cc Marc Kleine-Budde <[email protected]>
Cc David Miller <[email protected]>
Cc Oliver Hartkopp <[email protected]>
Cc Lukas Bulwahn <[email protected]>
Cc linux-stable <[email protected]> # >= v5.4
---
 drivers/net/can/slcan.c |    1 +
 1 file changed, 1 insertion(+)
drivers/net/can/slcan.c +1 -0
@@ -613,6 +613,7 @@ err_free_chan:
 	sl->tty = NULL;
 	tty->disc_data = NULL;
 	clear_bit(SLF_INUSE, &sl->flags);
+	slc_free_netdev(sl->dev);
 	free_netdev(sl->dev);
 
 err_exit:
author maintainer
#236 lore raw

PATCH 220/243 kernfs: fix ino wrap-around detection

In reply to Greg Kroah-Hartman

From: Tejun Heo <[email protected]>

commit e23f568aa63f64cd6b355094224cc9356c0f696b upstream.

When the 32bit ino wraps around, kernfs increments the generation number to distinguish reused ino instances. The wrap-around detection tests whether the allocated ino is lower than what the cursor but the cursor is pointing to the next ino to allocate so the condition never triggers.

Fix it by remembering the last ino and comparing against that.

Fixes 4a3ef68acacf ("kernfs: implement i_generation")
Cc Namhyung Kim <[email protected]>
Cc [email protected] # v4.14+
---
 fs/kernfs/dir.c        |    5 ++---
 include/linux/kernfs.h |    1 +
 2 files changed, 3 insertions(+), 3 deletions(-)
fs/kernfs/dir.c +2 -3
@@ -624,7 +624,6 @@ static struct kernfs_node *__kernfs_new_
 {
 	struct kernfs_node *kn;
 	u32 gen;
-	int cursor;
 	int ret;
 
 	name = kstrdup_const(name, GFP_KERNEL);
@@ -637,11 +636,11 @@ static struct kernfs_node *__kernfs_new_
 
 	idr_preload(GFP_KERNEL);
 	spin_lock(&kernfs_idr_lock);
-	cursor = idr_get_cursor(&root->ino_idr);
 	ret = idr_alloc_cyclic(&root->ino_idr, kn, 1, 0, GFP_ATOMIC);
-	if (ret >= 0 && ret < cursor)
+	if (ret >= 0 && ret < root->last_ino)
 		root->next_generation++;
 	gen = root->next_generation;
+	root->last_ino = ret;
 	spin_unlock(&kernfs_idr_lock);
 	idr_preload_end();
 	if (ret < 0)
include/linux/kernfs.h +1 -0
@@ -186,6 +186,7 @@ struct kernfs_root {
 
 	/* private fields, do not use outside kernfs proper */
 	struct idr		ino_idr;
+	u32			last_ino;
 	u32			next_generation;
 	struct kernfs_syscall_ops *syscall_ops;
 
author maintainer
#237 lore raw

PATCH 221/243 jbd2: Fix possible overflow in jbd2_log_space_left()

In reply to Greg Kroah-Hartman

From: Jan Kara <[email protected]>

commit add3efdd78b8a0478ce423bb9d4df6bd95e8b335 upstream.

When number of free space in the journal is very low, the arithmetic in jbd2_log_space_left() could underflow resulting in very high number of free blocks and thus triggering assertion failure in transaction commit code complaining there's not enough space in the journal:

J_ASSERT(journal->j_free > 1);

Properly check for the low number of free blocks.

---
 include/linux/jbd2.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/jbd2.h +2 -2
@@ -1587,7 +1587,7 @@ static inline int jbd2_space_needed(jour
 static inline unsigned long jbd2_log_space_left(journal_t *journal)
 {
 	/* Allow for rounding errors */
-	unsigned long free = journal->j_free - 32;
+	long free = journal->j_free - 32;
 
 	if (journal->j_committing_transaction) {
 		unsigned long committing = atomic_read(&journal->
@@ -1596,7 +1596,7 @@ static inline unsigned long jbd2_log_spa
 		/* Transaction + control blocks */
 		free -= committing + (committing >> JBD2_CONTROL_BLOCKS_SHIFT);
 	}
-	return free;
+	return max_t(long, free, 0);
 }
 
 /*
author maintainer
#238 lore raw

PATCH 222/243 drm/msm: fix memleak on release

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit a64fc11b9a520c55ca34d82e5ca32274f49b6b15 upstream.

If a process is interrupted while accessing the "gpu" debugfs file and the drm device struct_mutex is contended, release() could return early and fail to free related resources.

Note that the return value from release() is ignored.

Fixes 4f776f4511c7 ("drm/msm/gpu: Convert the GPU show function to use the GPU state")
Cc stable <[email protected]> # 4.18
Cc Jordan Crouse <[email protected]>
Cc Rob Clark <[email protected]>
---
 drivers/gpu/drm/msm/msm_debugfs.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/msm/msm_debugfs.c +1 -5
@@ -53,12 +53,8 @@ static int msm_gpu_release(struct inode
 	struct msm_gpu_show_priv *show_priv = m->private;
 	struct msm_drm_private *priv = show_priv->dev->dev_private;
 	struct msm_gpu *gpu = priv->gpu;
-	int ret;
-
-	ret = mutex_lock_interruptible(&show_priv->dev->struct_mutex);
-	if (ret)
-		return ret;
 
+	mutex_lock(&show_priv->dev->struct_mutex);
 	gpu->funcs->gpu_state_put(show_priv->state);
 	mutex_unlock(&show_priv->dev->struct_mutex);
 
author maintainer
#239 lore raw

PATCH 223/243 drm/i810: Prevent underflow in ioctl

In reply to Greg Kroah-Hartman

From: Dan Carpenter <[email protected]>

commit 4f69851fbaa26b155330be35ce8ac393e93e7442 upstream.

The "used" variables here come from the user in the ioctl and it can be negative. It could result in an out of bounds write.

---
 drivers/gpu/drm/i810/i810_dma.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i810/i810_dma.c +2 -2
@@ -721,7 +721,7 @@ static void i810_dma_dispatch_vertex(str
 	if (nbox > I810_NR_SAREA_CLIPRECTS)
 		nbox = I810_NR_SAREA_CLIPRECTS;
 
-	if (used > 4 * 1024)
+	if (used < 0 || used > 4 * 1024)
 		used = 0;
 
 	if (sarea_priv->dirty)
@@ -1041,7 +1041,7 @@ static void i810_dma_dispatch_mc(struct
 	if (u != I810_BUF_CLIENT)
 		DRM_DEBUG("MC found buffer that isn't mine!\n");
 
-	if (used > 4 * 1024)
+	if (used < 0 || used > 4 * 1024)
 		used = 0;
 
 	sarea_priv->dirty = 0x7f;
author maintainer
#240 lore raw

PATCH 224/243 arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc node"

In reply to Greg Kroah-Hartman

From: Marek Szyprowski <[email protected]>

commit bed903167ae5b5532eda5d7db26de451bd232da5 upstream.

Commit ef72171b3621 ("arm64: dts: exynos: Remove unneeded address space mapping for soc node") changed the address and size cells in root node from 2 to 1, but /memory nodes for the affected boards were not updated. This went unnoticed on Exynos5433-based TM2(e) boards, because they use u-boot, which updates /memory node to the correct values. On the other hand, the mentioned commit broke boot on Exynos7-based Espresso board, which bootloader doesn't touch /memory node at all.

This patch reverts commit ef72171b3621 ("arm64: dts: exynos: Remove unneeded address space mapping for soc node"), so Exynos5433 and Exynos7 SoCs again matches other ARM64 platforms with 64bit mappings in root node.

Fixes ef72171b3621 ("arm64: dts: exynos: Remove unneeded address space mapping for soc node")
Cc <[email protected]> # 5.3.x: 72ddcf6aa224 arm64: dts: exynos: Move GPU under /soc node for Exynos5433
Cc <[email protected]> # 5.3.x: ede87c3a2bdb arm64: dts: exynos: Move GPU under /soc node for Exynos7
Cc <[email protected]> # 4.18.x
---
 arch/arm64/boot/dts/exynos/exynos5433.dtsi |    6 +++---
 arch/arm64/boot/dts/exynos/exynos7.dtsi    |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/exynos/exynos5433.dtsi +3 -3
@@ -18,8 +18,8 @@
 
 / {
 	compatible = "samsung,exynos5433";
-	#address-cells = <1>;
-	#size-cells = <1>;
+	#address-cells = <2>;
+	#size-cells = <2>;
 
 	interrupt-parent = <&gic>;
 
@@ -235,7 +235,7 @@
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-		ranges;
+		ranges = <0x0 0x0 0x0 0x18000000>;
 
 		arm_a53_pmu {
 			compatible = "arm,cortex-a53-pmu", "arm,armv8-pmuv3";
arch/arm64/boot/dts/exynos/exynos7.dtsi +3 -3
@@ -12,8 +12,8 @@
 / {
 	compatible = "samsung,exynos7";
 	interrupt-parent = <&gic>;
-	#address-cells = <1>;
-	#size-cells = <1>;
+	#address-cells = <2>;
+	#size-cells = <2>;
 
 	aliases {
 		pinctrl0 = &pinctrl_alive;
@@ -70,7 +70,7 @@
 		compatible = "simple-bus";
 		#address-cells = <1>;
 		#size-cells = <1>;
-		ranges;
+		ranges = <0 0 0 0x18000000>;
 
 		chipid@10000000 {
 			compatible = "samsung,exynos4210-chipid";
author maintainer
#241 lore raw

PATCH 225/243 KVM: arm/arm64: vgic: Dont rely on the wrong pending table

In reply to Greg Kroah-Hartman

From: Zenghui Yu <[email protected]>

commit ca185b260951d3b55108c0b95e188682d8a507b7 upstream.

It's possible that two LPIs locate in the same "byte_offset" but target two different vcpus, where their pending status are indicated by two different pending tables. In such a scenario, using last_byte_offset optimization will lead KVM relying on the wrong pending table entry. Let us use last_ptr instead, which can be treated as a byte index into a pending table and also, can be vcpu specific.

Fixes 280771252c1b ("KVM: arm64: vgic-v3: KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES")
---
 virt/kvm/arm/vgic/vgic-v3.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
virt/kvm/arm/vgic/vgic-v3.c +3 -3
@@ -375,8 +375,8 @@ retry:
 int vgic_v3_save_pending_tables(struct kvm *kvm)
 {
 	struct vgic_dist *dist = &kvm->arch.vgic;
-	int last_byte_offset = -1;
 	struct vgic_irq *irq;
+	gpa_t last_ptr = ~(gpa_t)0;
 	int ret;
 	u8 val;
 
@@ -396,11 +396,11 @@ int vgic_v3_save_pending_tables(struct k
 		bit_nr = irq->intid % BITS_PER_BYTE;
 		ptr = pendbase + byte_offset;
 
-		if (byte_offset != last_byte_offset) {
+		if (ptr != last_ptr) {
 			ret = kvm_read_guest_lock(kvm, ptr, &val, 1);
 			if (ret)
 				return ret;
-			last_byte_offset = byte_offset;
+			last_ptr = ptr;
 		}
 
 		stored = val & (1U << bit_nr);
author maintainer
#242 lore raw

PATCH 226/243 KVM: x86: do not modify masked bits of shared MSRs

In reply to Greg Kroah-Hartman

From: Paolo Bonzini <[email protected]>

commit de1fca5d6e0105c9d33924e1247e2f386efc3ece upstream.

"Shared MSRs" are guest MSRs that are written to the host MSRs but keep their value until the next return to userspace. They support a mask, so that some bits keep the host value, but this mask is only used to skip an unnecessary MSR write and the value written to the MSR is always the guest MSR.

Fix this and, while at it, do not update smsr->values[slot].curr if for whatever reason the wrmsr fails. This should only happen due to reserved bits, so the value written to smsr->values[slot].curr will not match when the user-return notifier and the host value will always be restored. However, it is untidy and in rare cases this can actually avoid spurious WRMSRs on return to userspace.

---
 arch/x86/kvm/x86.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/x86/kvm/x86.c +3 -2
@@ -290,13 +290,14 @@ int kvm_set_shared_msr(unsigned slot, u6
 	struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu);
 	int err;
 
-	if (((value ^ smsr->values[slot].curr) & mask) == 0)
+	value = (value & mask) | (smsr->values[slot].host & ~mask);
+	if (value == smsr->values[slot].curr)
 		return 0;
-	smsr->values[slot].curr = value;
 	err = wrmsrl_safe(shared_msrs_global.msrs[slot], value);
 	if (err)
 		return 1;
 
+	smsr->values[slot].curr = value;
 	if (!smsr->registered) {
 		smsr->urn.on_user_return = kvm_on_user_return;
 		user_return_notifier_register(&smsr->urn);
author maintainer
#243 lore raw

PATCH 227/243 KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES

In reply to Greg Kroah-Hartman

From: Paolo Bonzini <[email protected]>

commit cbbaa2727aa3ae9e0a844803da7cef7fd3b94f2b upstream.

KVM does not implement MSR_IA32_TSX_CTRL, so it must not be presented to the guests. It is also confusing to have !ARCH_CAP_TSX_CTRL_MSR && !RTM && ARCH_CAP_TAA_NO: lack of MSR_IA32_TSX_CTRL suggests TSX was not hidden (it actually was), yet the value says that TSX is not vulnerable to microarchitectural data sampling. Fix both.

---
 arch/x86/kvm/x86.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/x86/kvm/x86.c +7 -2
@@ -1174,10 +1174,15 @@ u64 kvm_get_arch_capabilities(void)
 	 * If TSX is disabled on the system, guests are also mitigated against
 	 * TAA and clear CPU buffer mitigation is not required for guests.
 	 */
-	if (boot_cpu_has_bug(X86_BUG_TAA) && boot_cpu_has(X86_FEATURE_RTM) &&
-	    (data & ARCH_CAP_TSX_CTRL_MSR))
+	if (!boot_cpu_has(X86_FEATURE_RTM))
+		data &= ~ARCH_CAP_TAA_NO;
+	else if (!boot_cpu_has_bug(X86_BUG_TAA))
+		data |= ARCH_CAP_TAA_NO;
+	else if (data & ARCH_CAP_TSX_CTRL_MSR)
 		data &= ~ARCH_CAP_MDS_NO;
 
+	/* KVM does not emulate MSR_IA32_TSX_CTRL.  */
+	data &= ~ARCH_CAP_TSX_CTRL_MSR;
 	return data;
 }
 
author maintainer
#244 lore raw

PATCH 228/243 KVM: x86: Grab KVMs srcu lock when setting nested state

In reply to Greg Kroah-Hartman

From: Sean Christopherson <[email protected]>

commit ad5996d9a0e8019c3ae5151e687939369acfe044 upstream.

Acquire kvm->srcu for the duration of ->set_nested_state() to fix a bug where nVMX derefences ->memslots without holding ->srcu or ->slots_lock.

The other half of nested migration, ->get_nested_state(), does not need to acquire ->srcu as it is a purely a dump of internal KVM (and CPU) state to userspace.

Detected as an RCU lockdep splat that is 100% reproducible by running KVM's state_test selftest with CONFIG_PROVE_LOCKING=y. Note that the failing function, kvm_is_visible_gfn(), is only checking the validity of a gfn, it's not actually accessing guest memory (which is more or less unsupported during vmx_set_nested_state() due to incorrect MMU state), i.e. vmx_set_nested_state() itself isn't fundamentally broken. In any case, setting nested state isn't a fast path so there's no reason to go out of our way to avoid taking ->srcu.

=============================
WARNING: suspicious RCU usage
5.4.0-rc7+ #94 Not tainted
-----------------------------
include/linux/kvm_host.h:626 suspicious rcu_dereference_check() usage!

other info that might help us debug this:

rcu_scheduler_active = 2, debug_locks = 1
1 lock held by evmcs_test/10939:
#0: ffff88826ffcb800 (&vcpu->mutex){+.+.}, at: kvm_vcpu_ioctl+0x85/0x630 [kvm]

  stack backtrace:
  CPU: 1 PID: 10939 Comm: evmcs_test Not tainted 5.4.0-rc7+ #94
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
  Call Trace:
   dump_stack+0x68/0x9b
   kvm_is_visible_gfn+0x179/0x180 [kvm]
   mmu_check_root+0x11/0x30 [kvm]
   fast_cr3_switch+0x40/0x120 [kvm]
   kvm_mmu_new_cr3+0x34/0x60 [kvm]
   nested_vmx_load_cr3+0xbd/0x1f0 [kvm_intel]
   nested_vmx_enter_non_root_mode+0xab8/0x1d60 [kvm_intel]
   vmx_set_nested_state+0x256/0x340 [kvm_intel]
   kvm_arch_vcpu_ioctl+0x491/0x11a0 [kvm]
   kvm_vcpu_ioctl+0xde/0x630 [kvm]
   do_vfs_ioctl+0xa2/0x6c0
   ksys_ioctl+0x66/0x70
   __x64_sys_ioctl+0x16/0x20
   do_syscall_64+0x54/0x200
   entry_SYSCALL_64_after_hwframe+0x49/0xbe
  RIP: 0033:0x7f59a2b95f47
Fixes 8fcc4b5923af5 ("kvm: nVMX: Introduce KVM_CAP_NESTED_STATE")
---
 arch/x86/kvm/x86.c |    3 +++
 1 file changed, 3 insertions(+)
arch/x86/kvm/x86.c +3 -0
@@ -4117,6 +4117,7 @@ long kvm_arch_vcpu_ioctl(struct file *fi
 	case KVM_SET_NESTED_STATE: {
 		struct kvm_nested_state __user *user_kvm_nested_state = argp;
 		struct kvm_nested_state kvm_state;
+		int idx;
 
 		r = -EINVAL;
 		if (!kvm_x86_ops->set_nested_state)
@@ -4138,7 +4139,9 @@ long kvm_arch_vcpu_ioctl(struct file *fi
 		if (kvm_state.flags == KVM_STATE_NESTED_RUN_PENDING)
 			break;
 
+		idx = srcu_read_lock(&vcpu->kvm->srcu);
 		r = kvm_x86_ops->set_nested_state(vcpu, user_kvm_nested_state, &kvm_state);
+		srcu_read_unlock(&vcpu->kvm->srcu, idx);
 		break;
 	}
 	default:
author maintainer
#245 lore raw

PATCH 229/243 crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr

In reply to Greg Kroah-Hartman

From: Christian Lamparter <[email protected]>

commit 746c908c4d72e49068ab216c3926d2720d71a90d upstream.

This patch fixes a crash that can happen during probe when the available dma memory is not enough (this can happen if the crypto4xx is built as a module).

The descriptor window mapping would end up being free'd twice, once in crypto4xx_build_pdr() and the second time in crypto4xx_destroy_sdr().

Fixes 5d59ad6eea82 ("crypto: crypto4xx - fix crypto4xx_build_pdr, crypto4xx_build_sdr leak")
---
 drivers/crypto/amcc/crypto4xx_core.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/crypto/amcc/crypto4xx_core.c +1 -5
@@ -373,12 +373,8 @@ static u32 crypto4xx_build_sdr(struct cr
 		dma_alloc_coherent(dev->core_dev->device,
 			PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD,
 			&dev->scatter_buffer_pa, GFP_ATOMIC);
-	if (!dev->scatter_buffer_va) {
-		dma_free_coherent(dev->core_dev->device,
-				  sizeof(struct ce_sd) * PPC4XX_NUM_SD,
-				  dev->sdr, dev->sdr_pa);
+	if (!dev->scatter_buffer_va)
 		return -ENOMEM;
-	}
 
 	for (i = 0; i < PPC4XX_NUM_SD; i++) {
 		dev->sdr[i].ptr = dev->scatter_buffer_pa +
author maintainer
#246 lore raw

PATCH 230/243 crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize

In reply to Greg Kroah-Hartman

From: Tudor Ambarus <[email protected]>

commit 86ef1dfcb561473fbf5e199d58d18c55554d78be upstream.

commit 394a9e044702 ("crypto: cfb - add missing 'chunksize' property") adds a test vector where the input length is smaller than the IV length (the second test vector). This revealed a NULL pointer dereference in the atmel-aes driver, that is caused by passing an incorrect offset in scatterwalk_map_and_copy() when atmel_aes_complete() is called.

Do not save the IV in req->info of ablkcipher_request (or equivalently req->iv of skcipher_request) when req->nbytes < ivsize, because the IV will not be further used.

While touching the code, modify the type of ivsize from int to unsigned int, to comply with the return type of crypto_ablkcipher_ivsize().

Fixes 91308019ecb4 ("crypto: atmel-aes - properly set IV after {en,de}crypt")
---
 drivers/crypto/atmel-aes.c |   53 +++++++++++++++++++++++++--------------------
 1 file changed, 30 insertions(+), 23 deletions(-)
drivers/crypto/atmel-aes.c +30 -23
@@ -493,6 +493,29 @@ static inline bool atmel_aes_is_encrypt(
 static void atmel_aes_authenc_complete(struct atmel_aes_dev *dd, int err);
 #endif
 
+static void atmel_aes_set_iv_as_last_ciphertext_block(struct atmel_aes_dev *dd)
+{
+	struct ablkcipher_request *req = ablkcipher_request_cast(dd->areq);
+	struct atmel_aes_reqctx *rctx = ablkcipher_request_ctx(req);
+	struct crypto_ablkcipher *ablkcipher = crypto_ablkcipher_reqtfm(req);
+	unsigned int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
+
+	if (req->nbytes < ivsize)
+		return;
+
+	if (rctx->mode & AES_FLAGS_ENCRYPT) {
+		scatterwalk_map_and_copy(req->info, req->dst,
+					 req->nbytes - ivsize, ivsize, 0);
+	} else {
+		if (req->src == req->dst)
+			memcpy(req->info, rctx->lastc, ivsize);
+		else
+			scatterwalk_map_and_copy(req->info, req->src,
+						 req->nbytes - ivsize,
+						 ivsize, 0);
+	}
+}
+
 static inline int atmel_aes_complete(struct atmel_aes_dev *dd, int err)
 {
 #ifdef CONFIG_CRYPTO_DEV_ATMEL_AUTHENC
@@ -503,26 +526,8 @@ static inline int atmel_aes_complete(str
 	clk_disable(dd->iclk);
 	dd->flags &= ~AES_FLAGS_BUSY;
 
-	if (!dd->ctx->is_aead) {
-		struct ablkcipher_request *req =
-			ablkcipher_request_cast(dd->areq);
-		struct atmel_aes_reqctx *rctx = ablkcipher_request_ctx(req);
-		struct crypto_ablkcipher *ablkcipher =
-			crypto_ablkcipher_reqtfm(req);
-		int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
-
-		if (rctx->mode & AES_FLAGS_ENCRYPT) {
-			scatterwalk_map_and_copy(req->info, req->dst,
-				req->nbytes - ivsize, ivsize, 0);
-		} else {
-			if (req->src == req->dst) {
-				memcpy(req->info, rctx->lastc, ivsize);
-			} else {
-				scatterwalk_map_and_copy(req->info, req->src,
-					req->nbytes - ivsize, ivsize, 0);
-			}
-		}
-	}
+	if (!dd->ctx->is_aead)
+		atmel_aes_set_iv_as_last_ciphertext_block(dd);
 
 	if (dd->is_async)
 		dd->areq->complete(dd->areq, err);
@@ -1128,10 +1133,12 @@ static int atmel_aes_crypt(struct ablkci
 	rctx->mode = mode;
 
 	if (!(mode & AES_FLAGS_ENCRYPT) && (req->src == req->dst)) {
-		int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
+		unsigned int ivsize = crypto_ablkcipher_ivsize(ablkcipher);
 
-		scatterwalk_map_and_copy(rctx->lastc, req->src,
-			(req->nbytes - ivsize), ivsize, 0);
+		if (req->nbytes >= ivsize)
+			scatterwalk_map_and_copy(rctx->lastc, req->src,
+						 req->nbytes - ivsize,
+						 ivsize, 0);
 	}
 
 	return atmel_aes_handle_queue(dd, &req->base);
author maintainer
#247 lore raw

PATCH 231/243 crypto: af_alg - cast ki_complete ternary op to int

In reply to Greg Kroah-Hartman

From: Ayush Sawal <[email protected]>

commit 64e7f852c47ce99f6c324c46d6a299a5a7ebead9 upstream.

when libkcapi test is executed using HW accelerator, cipher operation return -74.Since af_alg_async_cb->ki_complete treat err as unsigned int, libkcapi receive 429467222 even though it expect -ve value.

Hence its required to cast resultlen to int so that proper error is returned to libkcapi.

AEAD one shot non-aligned test 2(libkcapi test)
./../bin/kcapi -x 10 -c "gcm(aes)" -i 7815d4b06ae50c9c56e87bd7
-k ea38ac0c9b9998c80e28fb496a2b88d9 -a "853f98a750098bec1aa7497e979e78098155c877879556bb51ddeb6374cbaefc" -t "c4ce58985b7203094be1d134c1b8ab0b" -q "b03692f86d1b8b39baf2abb255197c98"

Fixes d887c52d6ae4 ("crypto: algif_aead - overhaul memory management")
---
 crypto/af_alg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/af_alg.c +1 -1
@@ -1058,7 +1058,7 @@ void af_alg_async_cb(struct crypto_async
 	af_alg_free_resources(areq);
 	sock_put(sk);
 
-	iocb->ki_complete(iocb, err ? err : resultlen, 0);
+	iocb->ki_complete(iocb, err ? err : (int)resultlen, 0);
 }
 EXPORT_SYMBOL_GPL(af_alg_async_cb);
 
author maintainer
#248 lore raw

PATCH 232/243 crypto: ccp - fix uninitialized list head

In reply to Greg Kroah-Hartman

From: Mark Salter <[email protected]>

commit 691505a803a7f223b2af621848d581259c61f77d upstream.

A NULL-pointer dereference was reported in fedora bz#1762199 while reshaping a raid6 array after adding a fifth drive to an existing array.

[   47.343549] md/raid:md0: raid level 6 active with 3 out of 5 devices, algorithm 2
[   47.804017] md0: detected capacity change from 0 to 7885289422848
[   47.822083] Unable to handle kernel read from unreadable memory at virtual address 0000000000000000
...
[   47.940477] CPU: 1 PID: 14210 Comm: md0_raid6 Tainted: G        W         5.2.18-200.fc30.aarch64 #1
[   47.949594] Hardware name: AMD Overdrive/Supercharger/To be filled by O.E.M., BIOS ROD1002C 04/08/2016
[   47.958886] pstate: 00400085 (nzcv daIf +PAN -UAO)
[   47.963668] pc : __list_del_entry_valid+0x2c/0xa8
[   47.968366] lr : ccp_tx_submit+0x84/0x168 [ccp]
[   47.972882] sp : ffff00001369b970
[   47.976184] x29: ffff00001369b970 x28: ffff00001369bdb8
[   47.981483] x27: 00000000ffffffff x26: ffff8003b758af70
[   47.986782] x25: ffff8003b758b2d8 x24: ffff8003e6245818
[   47.992080] x23: 0000000000000000 x22: ffff8003e62450c0
[   47.997379] x21: ffff8003dfd6add8 x20: 0000000000000003
[   48.002678] x19: ffff8003e6245100 x18: 0000000000000000
[   48.007976] x17: 0000000000000000 x16: 0000000000000000
[   48.013274] x15: 0000000000000000 x14: 0000000000000000
[   48.018572] x13: ffff7e000ef83a00 x12: 0000000000000001
[   48.023870] x11: ffff000010eff998 x10: 00000000000019a0
[   48.029169] x9 : 0000000000000000 x8 : ffff8003e6245180
[   48.034467] x7 : 0000000000000000 x6 : 000000000000003f
[   48.039766] x5 : 0000000000000040 x4 : ffff8003e0145080
[   48.045064] x3 : dead000000000200 x2 : 0000000000000000
[   48.050362] x1 : 0000000000000000 x0 : ffff8003e62450c0
[   48.055660] Call trace:
[   48.058095]  __list_del_entry_valid+0x2c/0xa8
[   48.062442]  ccp_tx_submit+0x84/0x168 [ccp]
[   48.066615]  async_tx_submit+0x224/0x368 [async_tx]
[   48.071480]  async_trigger_callback+0x68/0xfc [async_tx]
[   48.076784]  ops_run_biofill+0x178/0x1e8 [raid456]
[   48.081566]  raid_run_ops+0x248/0x818 [raid456]
[   48.086086]  handle_stripe+0x864/0x1208 [raid456]
[   48.090781]  handle_active_stripes.isra.0+0xb0/0x278 [raid456]
[   48.096604]  raid5d+0x378/0x618 [raid456]
[   48.100602]  md_thread+0xa0/0x150
[   48.103905]  kthread+0x104/0x130
[   48.107122]  ret_from_fork+0x10/0x18
[   48.110686] Code: d2804003 f2fbd5a3 eb03003f 54000320 (f9400021)
[   48.116766] ---[ end trace 23f390a527f7ad77 ]---

ccp_tx_submit is passed a dma_async_tx_descriptor which is contained in a ccp_dma_desc and adds it to a ccp channel's pending list:

	list_del(&desc->entry);
	list_add_tail(&desc->entry, &chan->pending);

The problem is that desc->entry may be uninitialized in the async_trigger_callback path where the descriptor was gotten from ccp_prep_dma_interrupt which got it from ccp_alloc_dma_desc which doesn't initialize the desc->entry list head. So, just initialize the list head to avoid the problem.

---
 drivers/crypto/ccp/ccp-dmaengine.c |    1 +
 1 file changed, 1 insertion(+)
drivers/crypto/ccp/ccp-dmaengine.c +1 -0
@@ -340,6 +340,7 @@ static struct ccp_dma_desc *ccp_alloc_dm
 	desc->tx_desc.flags = flags;
 	desc->tx_desc.tx_submit = ccp_tx_submit;
 	desc->ccp = chan->ccp;
+	INIT_LIST_HEAD(&desc->entry);
 	INIT_LIST_HEAD(&desc->pending);
 	INIT_LIST_HEAD(&desc->active);
 	desc->status = DMA_IN_PROGRESS;
author maintainer
#249 lore raw

PATCH 233/243 crypto: ecdh - fix big endian bug in ECC library

In reply to Greg Kroah-Hartman

From: Ard Biesheuvel <[email protected]>

commit f398243e9fd6a3a059c1ea7b380c40628dbf0c61 upstream.

The elliptic curve arithmetic library used by the EC-DH KPP implementation assumes big endian byte order, and unconditionally reverses the byte and word order of multi-limb quantities. On big endian systems, the byte reordering is not necessary, while the word ordering needs to be retained.

So replace the __swab64() invocation with a call to be64_to_cpu() which should do the right thing for both little and big endian builds.

Fixes 3c4b23901a0c ("crypto: ecdh - Add ECDH software support")
Cc <[email protected]> # v4.9+
---
 crypto/ecc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
crypto/ecc.c +2 -1
@@ -906,10 +906,11 @@ static void ecc_point_mult(struct ecc_po
 static inline void ecc_swap_digits(const u64 *in, u64 *out,
 				   unsigned int ndigits)
 {
+	const __be64 *src = (__force __be64 *)in;
 	int i;
 
 	for (i = 0; i < ndigits; i++)
-		out[i] = __swab64(in[ndigits - 1 - i]);
+		out[i] = be64_to_cpu(src[ndigits - 1 - i]);
 }
 
 static int __ecc_is_key_valid(const struct ecc_curve *curve,
author maintainer
#250 lore raw

PATCH 234/243 crypto: user - fix memory leak in crypto_report

In reply to Greg Kroah-Hartman

From: Navid Emamdoost <[email protected]>

commit ffdde5932042600c6807d46c1550b28b0db6a3bc upstream.

In crypto_report, a new skb is created via nlmsg_new(). This skb should be released if crypto_report_alg() fails.

Fixes a38f7907b926 ("crypto: Add userspace configuration API")
---
 crypto/crypto_user.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
crypto/crypto_user.c +3 -1
@@ -288,8 +288,10 @@ static int crypto_report(struct sk_buff
 drop_alg:
 	crypto_mod_put(alg);
 
-	if (err)
+	if (err) {
+		kfree_skb(skb);
 		return err;
+	}
 
 	return nlmsg_unicast(crypto_nlsk, skb, NETLINK_CB(in_skb).portid);
 }
author maintainer
#251 lore raw

PATCH 235/243 spi: atmel: Fix CS high support

In reply to Greg Kroah-Hartman

From: Gregory CLEMENT <[email protected]>

commit 7cbb16b2122c09f2ae393a1542fed628505b9da6 upstream.

Until a few years ago, this driver was only used with CS GPIO. The only exception is CS0 on AT91RM9200 which has to use internal CS. A limitation of the internal CS is that they don't support CS High.

So by using the CS GPIO the CS high configuration was available except for the particular case CS0 on RM9200.

When the support for the internal chip-select was added, the check of the CS high support was not updated. Due to this the driver accepts this configuration for all the SPI controller v2 (used by all SoCs excepting the AT91RM9200) whereas the hardware doesn't support it for infernal CS.

This patch fixes the test to match the hardware capabilities.

Fixes 4820303480a1 ("spi: atmel: add support for the internal chip-select of the spi controller")
---
 drivers/spi/spi-atmel.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/spi/spi-atmel.c +2 -4
@@ -1193,10 +1193,8 @@ static int atmel_spi_setup(struct spi_de
 	as = spi_master_get_devdata(spi->master);
 
 	/* see notes above re chipselect */
-	if (!atmel_spi_is_v2(as)
-			&& spi->chip_select == 0
-			&& (spi->mode & SPI_CS_HIGH)) {
-		dev_dbg(&spi->dev, "setup: can't be active-high\n");
+	if (!as->use_cs_gpios && (spi->mode & SPI_CS_HIGH)) {
+		dev_warn(&spi->dev, "setup: non GPIO CS can't be active-high\n");
 		return -EINVAL;
 	}
 
author maintainer
#252 lore raw

PATCH 236/243 mwifiex: update set_mac_address logic

In reply to Greg Kroah-Hartman

From: Sharvari Harisangam <[email protected]>

commit 7afb94da3cd8a28ed7ae268143117bf1ac8a3371 upstream.

In set_mac_address, driver check for interfaces with same bss_type For first STA entry, this would return 3 interfaces since all priv's have bss_type as 0 due to kzalloc. Thus mac address gets changed for STA unexpected. This patch adds check for first STA and avoids mac address change. This patch also adds mac_address change for p2p based on bss_num type.

---
 drivers/net/wireless/marvell/mwifiex/main.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/marvell/mwifiex/main.c +3 -3
@@ -960,10 +960,10 @@ int mwifiex_set_mac_address(struct mwifi
 
 		mac_addr = old_mac_addr;
 
-		if (priv->bss_type == MWIFIEX_BSS_TYPE_P2P)
+		if (priv->bss_type == MWIFIEX_BSS_TYPE_P2P) {
 			mac_addr |= BIT_ULL(MWIFIEX_MAC_LOCAL_ADMIN_BIT);
-
-		if (mwifiex_get_intf_num(priv->adapter, priv->bss_type) > 1) {
+			mac_addr += priv->bss_num;
+		} else if (priv->adapter->priv[0] != priv) {
 			/* Set mac address based on bss_type/bss_num */
 			mac_addr ^= BIT_ULL(priv->bss_type + 8);
 			mac_addr += priv->bss_num;
author maintainer
#253 lore raw

PATCH 237/243 can: ucan: fix non-atomic allocation in completion handler

In reply to Greg Kroah-Hartman

From: Johan Hovold <[email protected]>

commit 870db5d1015c8bd63e93b579e857223c96249ff7 upstream.

USB completion handlers are called in atomic context and must specifically not allocate memory using GFP_KERNEL.

Fixes 9f2d3eae88d2 ("can: ucan: add driver for Theobroma Systems UCAN devices")
Cc stable <[email protected]> # 4.19
Cc Jakob Unterwurzacher <[email protected]>
Cc Martin Elshuber <[email protected]>
Cc Philipp Tomsich <[email protected]>
---
 drivers/net/can/usb/ucan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/usb/ucan.c +1 -1
@@ -796,7 +796,7 @@ resubmit:
 			  up);
 
 	usb_anchor_urb(urb, &up->rx_urbs);
-	ret = usb_submit_urb(urb, GFP_KERNEL);
+	ret = usb_submit_urb(urb, GFP_ATOMIC);
 
 	if (ret < 0) {
 		netdev_err(up->netdev,
author maintainer
#254 lore raw

PATCH 238/243 RDMA/qib: Validate ->show()/store() callbacks before calling them

In reply to Greg Kroah-Hartman

From: Viresh Kumar <[email protected]>

commit 7ee23491b39259ae83899dd93b2a29ef0f22f0a7 upstream.

The permissions of the read-only or write-only sysfs files can be changed (as root) and the user can then try to read a write-only file or write to a read-only file which will lead to kernel crash here.

Protect against that by always validating the show/store callbacks.

---
 drivers/infiniband/hw/qib/qib_sysfs.c |    6 ++++++
 1 file changed, 6 insertions(+)
drivers/infiniband/hw/qib/qib_sysfs.c +6 -0
@@ -301,6 +301,9 @@ static ssize_t qib_portattr_show(struct
 	struct qib_pportdata *ppd =
 		container_of(kobj, struct qib_pportdata, pport_kobj);
 
+	if (!pattr->show)
+		return -EIO;
+
 	return pattr->show(ppd, buf);
 }
 
@@ -312,6 +315,9 @@ static ssize_t qib_portattr_store(struct
 	struct qib_pportdata *ppd =
 		container_of(kobj, struct qib_pportdata, pport_kobj);
 
+	if (!pattr->store)
+		return -EIO;
+
 	return pattr->store(ppd, buf, len);
 }
 
author maintainer
#255 lore raw

PATCH 239/243 iomap: Fix pipe page leakage during splicing

In reply to Greg Kroah-Hartman

From: Jan Kara <[email protected]>

commit 419e9c38aa075ed0cd3c13d47e15954b686bcdb6 upstream.

When splicing using iomap_dio_rw() to a pipe, we may leak pipe pages because bio_iov_iter_get_pages() records that the pipe will have full extent worth of data however if file size is not block size aligned iomap_dio_rw() returns less than what bio_iov_iter_get_pages() set up and splice code gets confused leaking a pipe page with the file tail.

Handle the situation similarly to the old direct IO implementation and revert iter to actually returned read amount which makes iter consistent with value returned from iomap_dio_rw() and thus the splice code is happy.

---
 fs/iomap.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
fs/iomap.c +8 -1
@@ -1913,8 +1913,15 @@ iomap_dio_rw(struct kiocb *iocb, struct
 		}
 		pos += ret;
 
-		if (iov_iter_rw(iter) == READ && pos >= dio->i_size)
+		if (iov_iter_rw(iter) == READ && pos >= dio->i_size) {
+			/*
+			 * We only report that we've read data up to i_size.
+			 * Revert iter to a state corresponding to that as
+			 * some callers (such as splice code) rely on it.
+			 */
+			iov_iter_revert(iter, pos - dio->i_size);
 			break;
+		}
 	} while ((count = iov_iter_count(iter)) > 0);
 	blk_finish_plug(&plug);
 
author maintainer
#256 lore raw

PATCH 240/243 thermal: Fix deadlock in thermal thermal_zone_device_check

In reply to Greg Kroah-Hartman

From: Wei Wang <[email protected]>

commit 163b00cde7cf2206e248789d2780121ad5e6a70b upstream.

1851799e1d29 ("thermal: Fix use-after-free when unregistering thermal zone device") changed cancel_delayed_work to cancel_delayed_work_sync to avoid a use-after-free issue. However, cancel_delayed_work_sync could be called insides the WQ causing deadlock.

[54109.642398] c0   1162 kworker/u17:1   D    0 11030      2 0x00000000
[54109.642437] c0   1162 Workqueue: thermal_passive_wq thermal_zone_device_check
[54109.642447] c0   1162 Call trace:
[54109.642456] c0   1162  __switch_to+0x138/0x158
[54109.642467] c0   1162  __schedule+0xba4/0x1434
[54109.642480] c0   1162  schedule_timeout+0xa0/0xb28
[54109.642492] c0   1162  wait_for_common+0x138/0x2e8
[54109.642511] c0   1162  flush_work+0x348/0x40c
[54109.642522] c0   1162  __cancel_work_timer+0x180/0x218
[54109.642544] c0   1162  handle_thermal_trip+0x2c4/0x5a4
[54109.642553] c0   1162  thermal_zone_device_update+0x1b4/0x25c
[54109.642563] c0   1162  thermal_zone_device_check+0x18/0x24
[54109.642574] c0   1162  process_one_work+0x3cc/0x69c
[54109.642583] c0   1162  worker_thread+0x49c/0x7c0
[54109.642593] c0   1162  kthread+0x17c/0x1b0
[54109.642602] c0   1162  ret_from_fork+0x10/0x18
[54109.643051] c0   1162 kworker/u17:2   D    0 16245      2 0x00000000
[54109.643067] c0   1162 Workqueue: thermal_passive_wq thermal_zone_device_check
[54109.643077] c0   1162 Call trace:
[54109.643085] c0   1162  __switch_to+0x138/0x158
[54109.643095] c0   1162  __schedule+0xba4/0x1434
[54109.643104] c0   1162  schedule_timeout+0xa0/0xb28
[54109.643114] c0   1162  wait_for_common+0x138/0x2e8
[54109.643122] c0   1162  flush_work+0x348/0x40c
[54109.643131] c0   1162  __cancel_work_timer+0x180/0x218
[54109.643141] c0   1162  handle_thermal_trip+0x2c4/0x5a4
[54109.643150] c0   1162  thermal_zone_device_update+0x1b4/0x25c
[54109.643159] c0   1162  thermal_zone_device_check+0x18/0x24
[54109.643167] c0   1162  process_one_work+0x3cc/0x69c
[54109.643177] c0   1162  worker_thread+0x49c/0x7c0
[54109.643186] c0   1162  kthread+0x17c/0x1b0
[54109.643195] c0   1162  ret_from_fork+0x10/0x18
[54109.644500] c0   1162 cat             D    0  7766      1 0x00000001
[54109.644515] c0   1162 Call trace:
[54109.644524] c0   1162  __switch_to+0x138/0x158
[54109.644536] c0   1162  __schedule+0xba4/0x1434
[54109.644546] c0   1162  schedule_preempt_disabled+0x80/0xb0
[54109.644555] c0   1162  __mutex_lock+0x3a8/0x7f0
[54109.644563] c0   1162  __mutex_lock_slowpath+0x14/0x20
[54109.644575] c0   1162  thermal_zone_get_temp+0x84/0x360
[54109.644586] c0   1162  temp_show+0x30/0x78
[54109.644609] c0   1162  dev_attr_show+0x5c/0xf0
[54109.644628] c0   1162  sysfs_kf_seq_show+0xcc/0x1a4
[54109.644636] c0   1162  kernfs_seq_show+0x48/0x88
[54109.644656] c0   1162  seq_read+0x1f4/0x73c
[54109.644664] c0   1162  kernfs_fop_read+0x84/0x318
[54109.644683] c0   1162  __vfs_read+0x50/0x1bc
[54109.644692] c0   1162  vfs_read+0xa4/0x140
[54109.644701] c0   1162  SyS_read+0xbc/0x144
[54109.644708] c0   1162  el0_svc_naked+0x34/0x38
[54109.845800] c0   1162 D 720.000s 1->7766->7766 cat [panic]
Fixes 1851799e1d29 ("thermal: Fix use-after-free when unregistering thermal zone device")
---
 drivers/thermal/thermal_core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/thermal/thermal_core.c +2 -2
@@ -296,7 +296,7 @@ static void thermal_zone_device_set_poll
 		mod_delayed_work(system_freezable_wq, &tz->poll_queue,
 				 msecs_to_jiffies(delay));
 	else
-		cancel_delayed_work_sync(&tz->poll_queue);
+		cancel_delayed_work(&tz->poll_queue);
 }
 
 static void monitor_thermal_zone(struct thermal_zone_device *tz)
@@ -1349,7 +1349,7 @@ void thermal_zone_device_unregister(stru
 
 	mutex_unlock(&thermal_list_lock);
 
-	thermal_zone_device_set_polling(tz, 0);
+	cancel_delayed_work_sync(&tz->poll_queue);
 
 	thermal_set_governor(tz, NULL);
 
author maintainer
#257 lore raw

PATCH 241/243 vcs: prevent write access to vcsu devices

In reply to Greg Kroah-Hartman

From: Nicolas Pitre <[email protected]>

commit 0c9acb1af77a3cb8707e43f45b72c95266903cee upstream.

Commit d21b0be246bf ("vt: introduce unicode mode for /dev/vcs") guarded against using devices containing attributes as this is not yet implemented. It however failed to guard against writes to any devices as this is also unimplemented.

Cc <[email protected]> # v4.19+
Cc Jiri Slaby <[email protected]>
Fixes d21b0be246bf ("vt: introduce unicode mode for /dev/vcs")
---
 drivers/tty/vt/vc_screen.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/tty/vt/vc_screen.c +3 -0
@@ -437,6 +437,9 @@ vcs_write(struct file *file, const char
 	size_t ret;
 	char *con_buf;
 
+	if (use_unicode(inode))
+		return -EOPNOTSUPP;
+
 	con_buf = (char *) __get_free_page(GFP_KERNEL);
 	if (!con_buf)
 		return -ENOMEM;
author maintainer
#258 lore raw

PATCH 242/243 binder: Fix race between mmap() and binder_alloc_print_pages()

In reply to Greg Kroah-Hartman

From: Jann Horn <[email protected]>

commit 8eb52a1ee37aafd9b796713aa0b3ab9cbc455be3 upstream.

binder_alloc_print_pages() iterates over alloc->pages[0..alloc->buffer_size-1] under alloc->mutex. binder_alloc_mmap_handler() writes alloc->pages and alloc->buffer_size without holding that lock, and even writes them before the last bailout point.

Unfortunately we can't take the alloc->mutex in the ->mmap() handler because mmap_sem can be taken while alloc->mutex is held.
So instead, we have to locklessly check whether the binder_alloc has been fully initialized with binder_alloc_get_vma(), like in binder_alloc_new_buf_locked().

---
 drivers/android/binder_alloc.c |   22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
drivers/android/binder_alloc.c +14 -8
@@ -880,14 +880,20 @@ void binder_alloc_print_pages(struct seq
 	int free = 0;
 
 	mutex_lock(&alloc->mutex);
-	for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) {
-		page = &alloc->pages[i];
-		if (!page->page_ptr)
-			free++;
-		else if (list_empty(&page->lru))
-			active++;
-		else
-			lru++;
+	/*
+	 * Make sure the binder_alloc is fully initialized, otherwise we might
+	 * read inconsistent state.
+	 */
+	if (binder_alloc_get_vma(alloc) != NULL) {
+		for (i = 0; i < alloc->buffer_size / PAGE_SIZE; i++) {
+			page = &alloc->pages[i];
+			if (!page->page_ptr)
+				free++;
+			else if (list_empty(&page->lru))
+				active++;
+			else
+				lru++;
+		}
 	}
 	mutex_unlock(&alloc->mutex);
 	seq_printf(m, "  pages: %d:%d:%d\n", active, lru, free);
author maintainer
#259 lore raw

PATCH 243/243 binder: Handle start==NULL in binder_update_page_range()

In reply to Greg Kroah-Hartman

From: Jann Horn <[email protected]>

commit 2a9edd056ed4fbf9d2e797c3fc06335af35bccc4 upstream.

The old loop wouldn't stop when reaching start if start==NULL, instead continuing backwards to index -1 and crashing.

Luckily you need to be highly privileged to map things at NULL, so it's not a big problem.

Fix it by adjusting the loop so that the loop variable is always in bounds.

This patch is deliberately minimal to simplify backporting, but IMO this function could use a refactor. The jump labels in the second loop body are horrible (the error gotos should be jumping to free_range instead), and both loops would look nicer if they just iterated upwards through indices. And the up_read()+mmput() shouldn't be duplicated like that.

---
 drivers/android/binder_alloc.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/android/binder_alloc.c +5 -3
@@ -295,8 +295,7 @@ static int binder_update_page_range(stru
 	return 0;
 
 free_range:
-	for (page_addr = end - PAGE_SIZE; page_addr >= start;
-	     page_addr -= PAGE_SIZE) {
+	for (page_addr = end - PAGE_SIZE; 1; page_addr -= PAGE_SIZE) {
 		bool ret;
 		size_t index;
 
@@ -309,6 +308,8 @@ free_range:
 		WARN_ON(!ret);
 
 		trace_binder_free_lru_end(alloc, index);
+		if (page_addr == start)
+			break;
 		continue;
 
 err_vm_insert_page_failed:
@@ -318,7 +319,8 @@ err_map_kernel_failed:
 		page->page_ptr = NULL;
 err_alloc_page_failed:
 err_page_ptr_cleared:
-		;
+		if (page_addr == start)
+			break;
 	}
 err_no_vma:
 	if (mm) {
#260 lore raw
In reply to Greg Kroah-Hartman

Hi Greg,

Quoted 8 lines

From: [email protected] <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 11 December 2019 15:03

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

All the issues I was reporting before have gone. No new ones either.

Kind regards, Chris

Quoted 1,034 lines

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-
4.19.89-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>

    Linux 4.19.89-rc1

Jann Horn <[email protected]>

    binder: Handle start==NULL in binder_update_page_range()

Jann Horn <[email protected]>
binder: Fix race between mmap() and binder_alloc_print_pages()

Nicolas Pitre <[email protected]>
vcs: prevent write access to vcsu devices

Wei Wang <[email protected]>
thermal: Fix deadlock in thermal thermal_zone_device_check

Jan Kara <[email protected]>
iomap: Fix pipe page leakage during splicing

Viresh Kumar <[email protected]>

    RDMA/qib: Validate ->show()/store() callbacks before calling them

Johan Hovold <[email protected]>
can: ucan: fix non-atomic allocation in completion handler

Sharvari Harisangam <[email protected]>
mwifiex: update set_mac_address logic

Gregory CLEMENT <[email protected]>
spi: atmel: Fix CS high support

Navid Emamdoost <[email protected]>
crypto: user - fix memory leak in crypto_report

Ard Biesheuvel <[email protected]>
crypto: ecdh - fix big endian bug in ECC library

Mark Salter <[email protected]>
crypto: ccp - fix uninitialized list head

Ayush Sawal <[email protected]>
crypto: af_alg - cast ki_complete ternary op to int

Tudor Ambarus <[email protected]>

    crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize

Christian Lamparter <[email protected]>
crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr

Sean Christopherson <[email protected]>
KVM: x86: Grab KVM's srcu lock when setting nested state

Paolo Bonzini <[email protected]>
KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES

Paolo Bonzini <[email protected]>
KVM: x86: do not modify masked bits of shared MSRs

Zenghui Yu <[email protected]>
KVM: arm/arm64: vgic: Don't rely on the wrong pending table

Marek Szyprowski <[email protected]>
arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc
node"

Dan Carpenter <[email protected]>
drm/i810: Prevent underflow in ioctl

Johan Hovold <[email protected]>
drm/msm: fix memleak on release

Jan Kara <[email protected]>
jbd2: Fix possible overflow in jbd2_log_space_left()

Tejun Heo <[email protected]>
kernfs: fix ino wrap-around detection

Jouni Hogander <[email protected]>
can: slcan: Fix use-after-free Read in slcan_open

Dmitry Torokhov <[email protected]>
tty: vt: keyboard: reject invalid keycodes

Pavel Shilovsky <[email protected]>
CIFS: Fix SMB2 oplock break processing

Pavel Shilovsky <[email protected]>
CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks

Nicolas Dichtel <[email protected]>
xfrm interface: fix management of phydev

Nicolas Dichtel <[email protected]>
xfrm interface: fix list corruption for x-netns

Nicolas Dichtel <[email protected]>
xfrm interface: avoid corruption on changelink

Nicolas Dichtel <[email protected]>
xfrm interface: fix memory leak on creation

Kai-Heng Feng <[email protected]>
x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect

Joerg Roedel <[email protected]>
x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all()

Navid Emamdoost <[email protected]>
Input: Fix memory leak in psxpad_spi_probe

Mike Leach <[email protected]>
coresight: etm4x: Fix input validation for sysfs.

Hans de Goede <[email protected]>
Input: goodix - add upside-down quirk for Teclast X89 tablet

Hans Verkuil <[email protected]>
Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers

Lucas Stach <[email protected]>
Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash

Hans Verkuil <[email protected]>
Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus

Kai-Heng Feng <[email protected]>
ALSA: hda - Add mute led support for HP ProBook 645 G4

Takashi Iwai <[email protected]>
ALSA: pcm: oss: Avoid potential buffer overflows

Kailang Yang <[email protected]>
ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236

Hui Wang <[email protected]>
ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop

Jian-Hong Pan <[email protected]>
ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC

Miklos Szeredi <[email protected]>
fuse: verify attributes

Miklos Szeredi <[email protected]>
fuse: verify nlink

Xuewei Zhang <[email protected]>
sched/fair: Scale bandwidth quota and period without losing quota/period
ratio precision

Dmitry Bogdanov <[email protected]>
net: aquantia: fix RSS table and key sizes

Helen Fornazier <[email protected]>
media: vimc: fix start stream when link is disabled

Felix Brack <[email protected]>
ARM: dts: am335x-pdu001: Fix polarity of card detection input

Rob Herring <[email protected]>
ARM: dts: sunxi: Fix PMU compatible strings

Ladislav Michl <[email protected]>
ASoC: max9867: Fix power management

Niklas Söderlund <[email protected]>
clk: renesas: rcar-gen3: Set state when registering SD clocks

YueHaibing <[email protected]>
usb: mtu3: fix dbginfo in qmu_tx_zlp_error_handler

Qian Cai <[email protected]>
mlx4: Use snprintf instead of complicated strcpy

Mike Marciniszyn <[email protected]>
IB/hfi1: Close VNIC sdma_progress sleep window

Kaike Wan <[email protected]>
IB/hfi1: Ignore LNI errors before DC8051 transitions to Polling state

Chen-Yu Tsai <[email protected]>
ARM: dts: sun8i: a23/a33: Fix up RTC device node

Nir Dotan <[email protected]>
mlxsw: spectrum_router: Relax GRE decap matching check

Geert Uytterhoeven <[email protected]>

    soc: renesas: r8a77990-sysc: Fix initialization order of 3DG-{A,B}

Jakub Audykowicz <[email protected]>
sctp: frag_point sanity check

Bjorn Andersson <[email protected]>
clk: qcom: gcc-msm8998: Disable halt check of UFS clocks

Jonathan Marek <[email protected]>
firmware: qcom: scm: fix compilation error when disabled

Andreas Pape <[email protected]>
media: stkwebcam: Bugfix for wrong return values

Dmitry Safonov <[email protected]>
tty: Don't block on IO when ldisc change is pending

Paul Kocialkowski <[email protected]>
ARM: dts: sun8i: h3: Fix the system-control register range

Ryan Case <[email protected]>
tty: serial: qcom_geni_serial: Fix softlock

Kieran Bingham <[email protected]>
media: uvcvideo: Abstract streaming object lifetime

zhengbin <[email protected]>
nfsd: Return EPERM, not EACCES, in some SETATTR cases

Aaro Koskinen <[email protected]>
MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible
definition

Geert Uytterhoeven <[email protected]>
clk: renesas: r8a77995: Correct parent clock of DU

Takeshi Kihara <[email protected]>
clk: renesas: r8a77990: Correct parent clock of DU

Joel Stanley <[email protected]>
powerpc/math-emu: Update macros from GCC

Kees Cook <[email protected]>
pstore/ram: Avoid NULL deref in ftrace merging failure path

Erez Alfasi <[email protected]>
net/mlx4_core: Fix return codes of unsupported operations

David Teigland <[email protected]>
dlm: fix invalid cluster name warning

Rob Herring <[email protected]>
ARM: dts: realview: Fix some more duplicate regulator nodes

Neil Armstrong <[email protected]>
media: cxd2880-spi: fix probe when dvb_attach fails

Jeffrey Hugo <[email protected]>
clk: qcom: Fix MSM8998 resets

Chen-Yu Tsai <[email protected]>
clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent

Martin Blumenstingl <[email protected]>
clk: meson: meson8b: fix the offset of vid_pll_dco's N value

Daniel Mack <[email protected]>
ARM: dts: pxa: clean up USB controller nodes

Miquel Raynal <[email protected]>
mtd: fix mtd_oobavail() incoherent returned value

Masahiro Yamada <[email protected]>
kbuild: fix single target build for external module

Paul Walmsley <[email protected]>
modpost: skip ELF local symbols during section mismatch check

Yuchung Cheng <[email protected]>
tcp: fix SNMP TCP timeout under-estimation

Yuchung Cheng <[email protected]>
tcp: fix SNMP under-estimation on failed retransmission

Yuchung Cheng <[email protected]>
tcp: fix off-by-one bug on aborting window-probing socket

Rob Herring <[email protected]>
ARM: dts: realview-pbx: Fix duplicate regulator nodes

Lubomir Rintel <[email protected]>
ARM: dts: mmp2: fix the gpio interrupt cell number

Eric Dumazet <[email protected]>
tcp: make tcp_space() aware of socket backlog

Rob Herring <[email protected]>
kbuild: disable dtc simple_bus_reg warnings by default

Geert Uytterhoeven <[email protected]>
soc: renesas: r8a77980-sysc: Correct A3VIP[012] power domain hierarchy

Geert Uytterhoeven <[email protected]>
soc: renesas: r8a77980-sysc: Correct names of A2DP[01] power domains

Geert Uytterhoeven <[email protected]>
soc: renesas: r8a77970-sysc: Correct names of A2DP/A2CN power domains

Stephen Boyd <[email protected]>
clk: mediatek: Drop more __init markings for driver probe

Stephen Boyd <[email protected]>
clk: mediatek: Drop __init from mtk_clk_register_cpumuxes()

Yonghong Song <[email protected]>
tools/bpf: make libbpf _GNU_SOURCE friendly

Martin Schiller <[email protected]>
net/x25: fix null_x25_address handling

Martin Schiller <[email protected]>
net/x25: fix called/calling length calculation in x25_parse_address_block

Neil Armstrong <[email protected]>
arm64: dts: meson-gxl-khadas-vim: fix GPIO lines names

Neil Armstrong <[email protected]>
arm64: dts: meson-gxbb-odroidc2: fix GPIO lines names

Neil Armstrong <[email protected]>
arm64: dts: meson-gxbb-nanopi-k2: fix GPIO lines names

Neil Armstrong <[email protected]>
arm64: dts: meson-gxl-libretech-cc: fix GPIO lines names

Aaro Koskinen <[email protected]>
ARM: OMAP1/2: fix SoC name printing

Linus Walleij <[email protected]>
gpio: OF: Parse MMC-specific CD and WP properties

Young_X <[email protected]>
ASoC: au8540: use 64-bit arithmetic instead of 32-bit

Yonghong Song <[email protected]>
tools: bpftool: fix a bitfield pretty print issue

Yonghong Song <[email protected]>
bpf: btf: check name validity for various types

Yonghong Song <[email protected]>
bpf: btf: implement btf_name_valid_identifier()

Scott Mayhew <[email protected]>
nfsd: fix a warning in __cld_pipe_upcall()

YueHaibing <[email protected]>
can: xilinx: fix return type of ndo_start_xmit function

Clément Péron <[email protected]>
ARM: debug: enable UART1 for socfpga Cyclone5

Wen Yang <[email protected]>
dlm: NULL check before kmem_cache_destroy is not needed

Maxime Ripard <[email protected]>
ARM: dts: sun8i: v3s: Change pinctrl nodes to avoid warning

Maxime Ripard <[email protected]>
ARM: dts: sun8i: a23/a33: Fix OPP DTC warnings

Maxime Ripard <[email protected]>
ARM: dts: sun7i: Fix HDMI output DTC warning

Laurent Pinchart <[email protected]>
ARM: dts: r8a779[01]: Disable unconnected LVDS encoders

Maxime Ripard <[email protected]>
ARM: dts: sun5i: a10s: Fix HDMI output DTC warning

Maxime Ripard <[email protected]>
ARM: dts: sun4i: Fix HDMI output DTC warning

Maxime Ripard <[email protected]>
ARM: dts: sun4i: Fix gpio-keys warning

Kuninori Morimoto <[email protected]>
ASoC: rsnd: tidyup registering method for rsnd_kctrl_new()

Joerg Roedel <[email protected]>
iommu/amd: Fix line-break in error log reporting

Xin Long <[email protected]>

    sctp: increase sk_wmem_alloc when head->truesize is increased

J. Bruce Fields <[email protected]>
lockd: fix decoding of TEST results

Thierry Reding <[email protected]>
gpu: host1x: Fix syncpoint ID field size on Tegra186

Neil Armstrong <[email protected]>
clk: meson: Fix GXL HDMI PLL fractional bits width

Lucas Stach <[email protected]>
i2c: imx: don't print error message on probe defer

Stefan Agner <[email protected]>
serial: imx: fix error handling in console_setup

Colin Ian King <[email protected]>
altera-stapl: check for a null key before strcasecmp'ing it

Srinivas Kandagatla <[email protected]>
slimbus: ngd: Fix build error on x86

Niklas Söderlund <[email protected]>
dma-mapping: fix return type of dma_set_max_seg_size()

Keith Busch <[email protected]>
nvme: Free ctrl device name on init failure

David Miller <[email protected]>

    sparc: Correct ctx->saw_frame_pointer logic.

David Miller <[email protected]>
sparc: Fix JIT fused branch convergance.

Sahitya Tummala <[email protected]>
f2fs: fix to allow node segment for GC by ioctl path

Otavio Salvador <[email protected]>
ARM: dts: rockchip: Assign the proper GPIO clocks for rv1108

Otavio Salvador <[email protected]>
ARM: dts: rockchip: Fix the PMU interrupt number for rv1108

Yunlong Song <[email protected]>
f2fs: change segment to section in f2fs_ioc_gc_range

Yunlong Song <[email protected]>
f2fs: fix count of seg_freed to make sec_freed correct

Chao Yu <[email protected]>
f2fs: fix to account preflush command for noflush_merge mode

Alexey Dobriyan <[email protected]>
ACPI: fix acpi_find_child_device() invocation in acpi_preset_companion()

Brian Norris <[email protected]>
usb: dwc3: don't log probe deferrals; but do log other error codes

Thinh Nguyen <[email protected]>
usb: dwc3: debugfs: Properly print/set link state for HS

Breno Leitao <[email protected]>
selftests/powerpc: Skip test instead of failing

Breno Leitao <[email protected]>
selftests/powerpc: Allocate base registers

Colin Ian King <[email protected]>
net: qualcomm: rmnet: move null check on dev before dereferecing it

Christian Lamparter <[email protected]>
dmaengine: dw-dmac: implement dma protection control setting

Vinod Koul <[email protected]>
dmaengine: coh901318: Remove unused variable

Jia-Ju Bai <[email protected]>
dmaengine: coh901318: Fix a double-lock bug

Hangbin Liu <[email protected]>
net/ipv6: re-do dad when interface has IFF_NOARP flag change

Magnus Damm <[email protected]>
ravb: Clean up duplex handling

Luca Coelho <[email protected]>
iwlwifi: fix cfg structs for 22000 with different RF modules

Hans Verkuil <[email protected]>
media: cec: report Vendor ID after initialization

Hans Verkuil <[email protected]>
media: pulse8-cec: return 0 when invalidating the logical address

Philipp Zabel <[email protected]>
media: coda: fix memory corruption in case more than 32 instances are
opened

Marek Szyprowski <[email protected]>
ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module

Baruch Siach <[email protected]>

    rtc: dt-binding: abx80x: fix resistance scale

Christophe JAILLET <[email protected]>
rtc: max8997: Fix the returned value in case of error in
'max8997_rtc_read_alarm()'

Nylon Chen <[email protected]>
nds32: Fix the items of hwcap_str ordering issue.

Vincent Chen <[email protected]>
math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning

Ursula Braun <[email protected]>
net/smc: use after free fix in smc_wr_tx_put_slot()

Aaro Koskinen <[email protected]>
MIPS: OCTEON: octeon-platform: fix typing

Steve Wise <[email protected]>
iw_cxgb4: only reconnect with MPAv1 if the peer aborts

Dave Chinner <[email protected]>
iomap: readpages doesn't zero page tail beyond EOF

Dave Chinner <[email protected]>
iomap: dio data corruption and spurious errors when pipes fill

Dave Chinner <[email protected]>
iomap: sub-block dio needs to zeroout beyond EOF

Dave Chinner <[email protected]>
iomap: FUA is wrong for DIO O_DSYNC writes into unwritten extents

Bruce Allan <[email protected]>
ice: Fix possible NULL pointer de-reference

Dave Ertman <[email protected]>
ice: Fix return value from NAPI poll

Xue Chaojing <[email protected]>
net-next/hinic: fix a bug in rx data flow

Xue Chaojing <[email protected]>
net-next/hinic:fix a bug in set mac address

Dave Chinner <[email protected]>
xfs: extent shifting doesn't fully invalidate page cache

Ji-Ze Hong (Peter Hong) <[email protected]>
USB: serial: f81534: fix reading old/new IC config

Mark Brown <[email protected]>
regulator: Fix return value of _set_load() stub

Xin Long <[email protected]>
sctp: count sk_wmem_alloc by skb truesize in sctp_packet_transmit

Katsuhiro Suzuki <[email protected]>
clk: rockchip: fix ID of 8ch clock of I2S1 for rk3328

Katsuhiro Suzuki <[email protected]>
clk: rockchip: fix I2S1 clock gate register for rk3328

Janne Huttunen <[email protected]>
mm/vmstat.c: fix NUMA statistics updates

James Hughes <[email protected]>
firmware: raspberrypi: Fix firmware calls with large buffers

Shreeya Patel <[email protected]>
Staging: iio: adt7316: Fix i2c data reading, set the data field

Brian Masney <[email protected]>
pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues

Michal Simek <[email protected]>
arm64: dts: zynqmp: Fix node names which contain "_"

Raveendra Padasalagi <[email protected]>
crypto: bcm - fix normal/non key hash algorithm failure

Vitaly Chikunov <[email protected]>
crypto: ecc - check for invalid values in the key verification test

Lucas Stach <[email protected]>
ARM: dts: imx6: RDU2: fix eGalax touchscreen node

Tony Lindgren <[email protected]>
bus: ti-sysc: Fix getting optional clocks in clock_roles

Maxime Jourdan <[email protected]>
drivers: soc: Allow building the amlogic drivers without ARCH_MESON

Steffen Maier <[email protected]>
scsi: zfcp: drop default switch case which might paper over missing case

Steffen Maier <[email protected]>
scsi: zfcp: update kernel message for invalid FCP_CMND length, it's not the
CDB

Andrew Lunn <[email protected]>
net: dsa: mv88e6xxx: Work around mv886e6161 SERDES missing MII_PHYSID2

Maciej W. Rozycki <[email protected]>
MIPS: SiByte: Enable ZONE_DMA32 for LittleSur

David Teigland <[email protected]>
dlm: fix missing idr_destroy for recover_idr

John Keeping <[email protected]>
ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name

Heiko Stuebner <[email protected]>
clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering

Finley Xiao <[email protected]>
clk: rockchip: fix rk3188 sclk_smc gate data

Alice Michael <[email protected]>
virtchnl: Fix off by one error

Mitch Williams <[email protected]>
i40e: don't restart nway if autoneg not supported

Christophe JAILLET <[email protected]>
rtc: max77686: Fix the returned value in case of error in
'max77686_rtc_read_time()'

Marek Szyprowski <[email protected]>
rtc: s3c-rtc: Avoid using broken ALMYEAR register

Ivan Khoronzhuk <[email protected]>
net: ethernet: ti: cpts: correct debug for expired txq skb

Marek Szyprowski <[email protected]>
extcon: max8997: Fix lack of path setting in USB device mode

Anand Moon <[email protected]>
ARM: dts: exynos: Fix LDO13 min values on Odroid XU3/XU4/HC1

Denis V. Lunev <[email protected]>
dlm: fix possible call to kfree() for non-initialized pointer

Lev Faerman <[email protected]>
ice: Fix NVM mask defines

Jagan Teki <[email protected]>
clk: sunxi-ng: a64: Fix gate bit of DSI DPHY

Moni Shoua <[email protected]>
net/mlx5: Release resource on error flow

Eugeniy Paltsev <[email protected]>
ARC: IOC: panic if kernel was started with previously enabled IOC

Florian Westphal <[email protected]>
netfilter: nf_tables: don't use position attribute on rule replacement

Jan Kara <[email protected]>
audit: Embed key into chunk

Vincent Whitchurch <[email protected]>
ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+

Andrei Otcheretianski <[email protected]>
iwlwifi: mvm: Send non offchannel traffic via AP sta

Shahar S Matityahu <[email protected]>
iwlwifi: trans: Clear persistence bit when starting the FW

Johannes Berg <[email protected]>
iwlwifi: mvm: synchronize TID queue removal

Arjun Vynipadath <[email protected]>
cxgb4vf: fix memleak in mac_hlist initialization

Douglas Anderson <[email protected]>
serial: core: Allow processing sysrq at port unlock time

Wen Yang <[email protected]>
i2c: core: fix use after free in of_i2c_notify

Chuhong Yuan <[email protected]>
net: ep93xx_eth: fix mismatch of request_mem_region in remove

Chuhong Yuan <[email protected]>
rsxx: add missed destroy_workqueue calls in remove

Vitaly Kuznetsov <[email protected]>
selftests: kvm: fix build with glibc >= 2.30

Yunhao Tian <[email protected]>
drm/sun4i: tcon: Set min division of TCON0_DCLK to 1.

paulhsia <[email protected]>
ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()

Alexander Shishkin <[email protected]>
perf/core: Consistently fail fork on allocation failures

Peter Zijlstra <[email protected]>
sched/core: Avoid spurious lock dependencies

Pan Bian <[email protected]>
Input: cyttsp4_core - fix use after free bug

Xiaodong Xu <[email protected]>
xfrm: release device reference for invalid state

Stephan Gerhold <[email protected]>
NFC: nxp-nci: Fix NULL pointer dereference after I2C communication error

Al Viro <[email protected]>
audit_get_nd(): don't unlock parent too early

Al Viro <[email protected]>
exportfs_decode_fh(): negative pinned may become positive without the
parent locked

Mordechay Goodstein <[email protected]>
iwlwifi: pcie: don't consider IV len in A-MSDU

Sirong Wang <[email protected]>
RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN

Al Viro <[email protected]>
autofs: fix a leak in autofs_expire_indirect()

Chuhong Yuan <[email protected]>
serial: ifx6x60: add missed pm_runtime_disable

Jiangfeng Xiao <[email protected]>
serial: serial_core: Perform NULL checks for break_ctl ops

Vincent Whitchurch <[email protected]>

    serial: pl011: Fix DMA ->flush_buffer()

Jeffrey Hugo <[email protected]>
tty: serial: msm_serial: Fix flow control

Peng Fan <[email protected]>
tty: serial: fsl_lpuart: use the sg count from dma_map_sg

Michał Mirosław <[email protected]>
usb: gadget: u_serial: add missing port entry locking

Arnd Bergmann <[email protected]>
lp: fix sparc64 LPSETTIMEOUT ioctl

Tuowen Zhao <[email protected]>
sparc64: implement ioremap_uc

Jon Hunter <[email protected]>
arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator

Navid Emamdoost <[email protected]>
rsi: release skb if rsi_prepare_beacon fails

-------------

Diffstat:

 .../devicetree/bindings/rtc/abracon,abx80x.txt     |   2 +-
 Makefile                                           |  15 +--
 arch/arc/include/asm/cache.h                       |   2 +
 arch/arc/mm/cache.c                                |  20 +++-
 arch/arm/Kconfig.debug                             |  23 ++--
 arch/arm/boot/dts/am335x-pdu001.dts                |   2 +-
 arch/arm/boot/dts/arm-realview-pb1176.dts          |   4 +-
 arch/arm/boot/dts/arm-realview-pb11mp.dts          |   4 +-
 arch/arm/boot/dts/arm-realview-pbx.dtsi            |   5 +-
 arch/arm/boot/dts/exynos3250.dtsi                  |   2 +-
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi      |   2 +-
 arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi            |   5 +-
 arch/arm/boot/dts/mmp2.dtsi                        |   2 +-
 arch/arm/boot/dts/pxa27x.dtsi                      |   2 +-
 arch/arm/boot/dts/pxa2xx.dtsi                      |   7 --
 arch/arm/boot/dts/pxa3xx.dtsi                      |   2 +-
 arch/arm/boot/dts/r8a7790-lager.dts                |   2 -
 arch/arm/boot/dts/r8a7791-koelsch.dts              |   2 -
 arch/arm/boot/dts/r8a7791-porter.dts               |   2 -
 arch/arm/boot/dts/rk3288-rock2-som.dtsi            |   2 +-
 arch/arm/boot/dts/rv1108.dtsi                      |  10 +-
 arch/arm/boot/dts/sun4i-a10-inet9f-rev03.dts       |   2 -
 arch/arm/boot/dts/sun4i-a10-pcduino.dts            |   2 -
 arch/arm/boot/dts/sun4i-a10.dtsi                   |   2 -
 arch/arm/boot/dts/sun5i-a10s.dtsi                  |   2 -
 arch/arm/boot/dts/sun6i-a31.dtsi                   |   2 +-
 arch/arm/boot/dts/sun7i-a20.dtsi                   |   4 +-
 arch/arm/boot/dts/sun8i-a23-a33.dtsi               |   6 +-
 arch/arm/boot/dts/sun8i-h3.dtsi                    |   8 +-
 arch/arm/boot/dts/sun8i-r16-bananapi-m2m.dts       |   4 +-
 arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts      |   4 +-
 arch/arm/boot/dts/sun8i-v3s.dtsi                   |  10 +-
 arch/arm/include/asm/uaccess.h                     |  18 +++
 arch/arm/lib/getuser.S                             |  11 ++
 arch/arm/lib/putuser.S                             |  20 ++--
 arch/arm/mach-omap1/id.c                           |   6 +-
 arch/arm/mach-omap2/id.c                           |   4 +-
 .../boot/dts/amlogic/meson-gxbb-nanopi-k2.dts      |   4 +-
 .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts |   4 +-
 .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts     |   4 +-
 .../dts/amlogic/meson-gxl-s905x-libretech-cc.dts   |   4 +-
 arch/arm64/boot/dts/exynos/exynos5433.dtsi         |   6 +-
 arch/arm64/boot/dts/exynos/exynos7.dtsi            |   6 +-
 arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi     |   2 +-
 arch/arm64/boot/dts/xilinx/zynqmp-clk.dtsi         |   4 +-
 arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts  |   4 +-
 arch/arm64/boot/dts/xilinx/zynqmp-zcu102-revA.dts  |  10 +-
 arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts  |   2 +-
 arch/arm64/boot/dts/xilinx/zynqmp-zcu111-revA.dts  |   2 +-
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi             |   4 +-
 arch/mips/Kconfig                                  |   1 +
 arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c |   2 +-
 arch/mips/cavium-octeon/octeon-platform.c          |   2 +-
 arch/mips/include/asm/octeon/cvmx-pko.h            |   2 +-
 arch/nds32/kernel/setup.c                          |   3 +-
 arch/powerpc/include/asm/sfp-machine.h             |  92 +++++---------
 arch/sparc/include/asm/io_64.h                     |   1 +
 arch/sparc/net/bpf_jit_comp_64.c                   |  89 +++++++++-----
 arch/x86/kvm/x86.c                                 |  17 ++-
 arch/x86/mm/fault.c                                |   2 +-
 arch/x86/pci/fixup.c                               |  11 ++
 crypto/af_alg.c                                    |   2 +-
 crypto/crypto_user.c                               |   4 +-
 crypto/ecc.c                                       |  45 ++++---
 drivers/android/binder_alloc.c                     |  30 +++--
 drivers/block/rsxx/core.c                          |   2 +
 drivers/bus/ti-sysc.c                              |   9 +-
 drivers/char/lp.c                                  |   4 +
 drivers/clk/mediatek/clk-cpumux.c                  |   8 +-
 drivers/clk/mediatek/clk-mt7622.c                  |   4 +-
 drivers/clk/meson/gxbb.c                           |   8 +-
 drivers/clk/meson/meson8b.c                        |   2 +-
 drivers/clk/qcom/gcc-msm8998.c                     |  44 +++----
 drivers/clk/renesas/r8a77990-cpg-mssr.c            |   4 +-
 drivers/clk/renesas/r8a77995-cpg-mssr.c            |   4 +-
 drivers/clk/renesas/rcar-gen3-cpg.c                |  16 +--
 drivers/clk/rockchip/clk-rk3188.c                  |   8 +-
 drivers/clk/rockchip/clk-rk3328.c                  |   2 +-
 drivers/clk/sunxi-ng/ccu-sun50i-a64.c              |   2 +-
 drivers/clk/sunxi-ng/ccu-sun8i-h3.c                |   2 +-
 drivers/crypto/amcc/crypto4xx_core.c               |   6 +-
 drivers/crypto/atmel-aes.c                         |  53 +++++----
 drivers/crypto/bcm/cipher.c                        |   6 +-
 drivers/crypto/ccp/ccp-dmaengine.c                 |   1 +
 drivers/dma/coh901318.c                            |   5 -
 drivers/dma/dw/core.c                              |   2 +
 drivers/dma/dw/platform.c                          |   6 +
 drivers/dma/dw/regs.h                              |   4 +
 drivers/extcon/extcon-max8997.c                    |  10 +-
 drivers/firmware/raspberrypi.c                     |  35 +++---
 drivers/gpio/gpiolib-of.c                          |  39 ++++++
 drivers/gpu/drm/i810/i810_dma.c                    |   4 +-
 drivers/gpu/drm/msm/msm_debugfs.c                  |   6 +-
 drivers/gpu/drm/sun4i/sun4i_tcon.c                 |   2 +-
 drivers/gpu/host1x/hw/hw_host1x06_uclass.h         |   2 +-
 .../hwtracing/coresight/coresight-etm4x-sysfs.c    |  21 ++--
 drivers/i2c/busses/i2c-imx.c                       |   3 +-
 drivers/i2c/i2c-core-of.c                          |   4 +-
 drivers/infiniband/hw/cxgb4/cm.c                   |   3 +-
 drivers/infiniband/hw/hfi1/chip.c                  |  47 +++++++-
 drivers/infiniband/hw/hfi1/vnic_sdma.c             |  15 +--
 drivers/infiniband/hw/hns/hns_roce_hem.h           |   2 +-
 drivers/infiniband/hw/mlx4/sysfs.c                 |  12 +-
 drivers/infiniband/hw/qib/qib_sysfs.c              |   6 +
 drivers/input/joystick/psxpad-spi.c                |   2 +-
 drivers/input/mouse/synaptics.c                    |   1 +
 drivers/input/rmi4/rmi_f34v7.c                     |   3 +
 drivers/input/rmi4/rmi_smbus.c                     |   2 -
 drivers/input/touchscreen/cyttsp4_core.c           |   7 --
 drivers/input/touchscreen/goodix.c                 |   9 ++
 drivers/iommu/amd_iommu.c                          |  22 ++--
 drivers/media/cec/cec-adap.c                       |   7 ++
 drivers/media/platform/coda/coda-common.c          |  26 ++--
 drivers/media/platform/coda/coda.h                 |   3 +-
 drivers/media/platform/vimc/vimc-common.c          |   2 +
 drivers/media/spi/cxd2880-spi.c                    |   1 +
 drivers/media/usb/pulse8-cec/pulse8-cec.c          |   2 +-
 drivers/media/usb/stkwebcam/stk-webcam.c           |   6 +-
 drivers/media/usb/uvc/uvc_driver.c                 |  54 ++++++---
 drivers/misc/altera-stapl/altera.c                 |   3 +-
 drivers/net/can/slcan.c                            |   1 +
 drivers/net/can/usb/ucan.c                         |   2 +-
 drivers/net/can/xilinx_can.c                       |   2 +-
 drivers/net/dsa/mv88e6xxx/chip.c                   |  21 +++-
 drivers/net/ethernet/aquantia/atlantic/aq_cfg.h    |   4 +-
 drivers/net/ethernet/aquantia/atlantic/aq_nic.c    |   2 +-
 .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c    |   6 +-
 drivers/net/ethernet/cirrus/ep93xx_eth.c           |   5 +-
 drivers/net/ethernet/huawei/hinic/hinic_main.c     |   7 +-
 drivers/net/ethernet/huawei/hinic/hinic_rx.c       |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |  10 +-
 drivers/net/ethernet/intel/ice/ice_adminq_cmd.h    |   6 +-
 drivers/net/ethernet/intel/ice/ice_switch.c        |   3 +
 drivers/net/ethernet/intel/ice/ice_txrx.c          |   3 +-
 drivers/net/ethernet/mellanox/mlx4/main.c          |  11 +-
 drivers/net/ethernet/mellanox/mlx5/core/qp.c       |   4 +-
 .../net/ethernet/mellanox/mlxsw/spectrum_router.c  |   5 +-
 drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c |   5 +-
 drivers/net/ethernet/renesas/ravb.h                |   1 -
 drivers/net/ethernet/renesas/ravb_main.c           |  19 +--
 drivers/net/ethernet/ti/cpts.c                     |   4 +-
 drivers/net/wireless/intel/iwlwifi/cfg/22000.c     |   1 -
 drivers/net/wireless/intel/iwlwifi/iwl-prph.h      |   7 ++
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c  |  15 +++
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c       |  10 ++
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      |   2 +-
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c    |  34 +++++-
 drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c  |  20 ++--
 drivers/net/wireless/marvell/mwifiex/main.c        |   6 +-
 drivers/net/wireless/rsi/rsi_91x_mgmt.c            |   1 +
 drivers/nfc/nxp-nci/i2c.c                          |   6 +-
 drivers/nvme/host/core.c                           |   2 +-
 drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c           |  23 +++-
 drivers/rtc/rtc-max77686.c                         |   2 +-
 drivers/rtc/rtc-max8997.c                          |   2 +-
 drivers/rtc/rtc-s3c.c                              |   6 -
 drivers/s390/scsi/zfcp_erp.c                       |   3 -
 drivers/s390/scsi/zfcp_fsf.c                       |   7 +-
 drivers/slimbus/qcom-ngd-ctrl.c                    |   5 +-
 drivers/soc/Makefile                               |   2 +-
 drivers/soc/renesas/r8a77970-sysc.c                |   4 +-
 drivers/soc/renesas/r8a77980-sysc.c                |  10 +-
 drivers/soc/renesas/r8a77990-sysc.c                |  23 +---
 drivers/spi/spi-atmel.c                            |   6 +-
 drivers/staging/iio/addac/adt7316-i2c.c            |   2 +
 drivers/thermal/thermal_core.c                     |   4 +-
 drivers/tty/n_hdlc.c                               |   4 +-
 drivers/tty/n_r3964.c                              |   2 +-
 drivers/tty/n_tty.c                                |   8 +-
 drivers/tty/serial/amba-pl011.c                    |   6 +-
 drivers/tty/serial/fsl_lpuart.c                    |   4 +-
 drivers/tty/serial/ifx6x60.c                       |   3 +
 drivers/tty/serial/imx.c                           |   2 +-
 drivers/tty/serial/msm_serial.c                    |   6 +-
 drivers/tty/serial/qcom_geni_serial.c              |  56 ++++++---
 drivers/tty/serial/serial_core.c                   |   2 +-
 drivers/tty/tty_ldisc.c                            |   7 ++
 drivers/tty/vt/keyboard.c                          |   2 +-
 drivers/tty/vt/vc_screen.c                         |   3 +
 drivers/usb/dwc3/core.c                            |   3 +-
 drivers/usb/dwc3/debug.h                           |  29 +++++
 drivers/usb/dwc3/debugfs.c                         |  19 ++-
 drivers/usb/gadget/function/u_serial.c             |   2 +
 drivers/usb/mtu3/mtu3_qmu.c                        |   2 +-
 drivers/usb/serial/f81534.c                        |  20 +++-
 fs/autofs/expire.c                                 |   5 +-
 fs/cifs/file.c                                     |   7 +-
 fs/cifs/smb2misc.c                                 |   7 +-
 fs/dlm/lockspace.c                                 |   1 +
 fs/dlm/member.c                                    |   2 +-
 fs/dlm/memory.c                                    |   9 +-
 fs/dlm/user.c                                      |   3 +-
 fs/exportfs/expfs.c                                |  31 +++--
 fs/f2fs/file.c                                     |   2 +-
 fs/f2fs/gc.c                                       |  10 +-
 fs/f2fs/segment.c                                  |   2 +
 fs/fuse/dir.c                                      |  27 +++--
 fs/fuse/fuse_i.h                                   |   2 +
 fs/iomap.c                                         |  62 ++++++++--
 fs/kernfs/dir.c                                    |   5 +-
 fs/lockd/clnt4xdr.c                                |  22 +---
 fs/lockd/clntxdr.c                                 |  22 +---
 fs/nfsd/nfs4recover.c                              |  17 +--
 fs/nfsd/vfs.c                                      |  17 ++-
 fs/pstore/ram.c                                    |   2 +-
 fs/xfs/xfs_bmap_util.c                             |   8 +-
 include/dt-bindings/clock/rk3328-cru.h             |   2 +-
 include/dt-bindings/power/r8a77970-sysc.h          |   6 +-
 include/dt-bindings/power/r8a77980-sysc.h          |   6 +-
 include/linux/acpi.h                               |   2 +-
 include/linux/avf/virtchnl.h                       |   4 +-
 include/linux/dma-mapping.h                        |   3 +-
 include/linux/jbd2.h                               |   4 +-
 include/linux/kernfs.h                             |   1 +
 include/linux/mtd/mtd.h                            |   2 +-
 include/linux/platform_data/dma-dw.h               |   6 +
 include/linux/qcom_scm.h                           |   3 +
 include/linux/regulator/consumer.h                 |   2 +-
 include/linux/serial_core.h                        |  37 +++++-
 include/linux/tty.h                                |   7 ++
 include/math-emu/soft-fp.h                         |   2 +-
 include/net/sctp/sctp.h                            |   5 +
 include/net/tcp.h                                  |   2 +-
 include/net/xfrm.h                                 |   1 -
 kernel/audit_tree.c                                |  27 ++---
 kernel/audit_watch.c                               |   2 +-
 kernel/bpf/btf.c                                   |  82 +++++++++++++
 kernel/events/core.c                               |   2 +-
 kernel/sched/core.c                                |   3 +-
 kernel/sched/fair.c                                |  36 +++---
 mm/vmstat.c                                        |   7 +-
 net/ipv4/tcp_output.c                              |   2 +-
 net/ipv4/tcp_timer.c                               |  10 +-
 net/ipv6/addrconf.c                                |  19 ++-
 net/netfilter/nf_tables_api.c                      |  17 ++-
 net/sctp/chunk.c                                   |   6 +
 net/sctp/output.c                                  |  22 +---
 net/sctp/socket.c                                  |   3 +-
 net/smc/smc_wr.c                                   |   4 +-
 net/x25/af_x25.c                                   |  18 +--
 net/xfrm/xfrm_input.c                              |   3 +
 net/xfrm/xfrm_interface.c                          | 132 +++++++--------------
 scripts/Makefile.lib                               |   1 +
 scripts/mod/modpost.c                              |  12 ++
 sound/core/oss/linear.c                            |   2 +
 sound/core/oss/mulaw.c                             |   2 +
 sound/core/oss/route.c                             |   2 +
 sound/core/pcm_lib.c                               |   8 +-
 sound/pci/hda/patch_conexant.c                     |   1 +
 sound/pci/hda/patch_realtek.c                      |  18 ++-
 sound/soc/codecs/max9867.c                         |  72 ++++++-----
 sound/soc/codecs/max9867.h                         |   2 +-
 sound/soc/codecs/nau8540.c                         |   2 +-
 sound/soc/sh/rcar/core.c                           |  12 ++
 sound/soc/sh/rcar/dvc.c                            |   8 --
 tools/bpf/bpftool/btf_dumper.c                     |   6 +-
 tools/lib/bpf/libbpf.c                             |   2 +
 tools/lib/bpf/libbpf_errno.c                       |   1 +
 tools/testing/selftests/kvm/lib/assert.c           |   4 +-
 tools/testing/selftests/powerpc/ptrace/core-pkey.c |   5 +-
 .../testing/selftests/powerpc/ptrace/ptrace-gpr.c  |   2 +-
 .../selftests/powerpc/ptrace/ptrace-tm-gpr.c       |   4 +-
 .../selftests/powerpc/ptrace/ptrace-tm-spd-tar.c   |   2 +-
 .../selftests/powerpc/ptrace/ptrace-tm-spd-vsx.c   |   3 +-
 .../selftests/powerpc/ptrace/ptrace-tm-spr.c       |   2 +-
 .../selftests/powerpc/ptrace/ptrace-tm-tar.c       |   2 +-
 .../selftests/powerpc/ptrace/ptrace-tm-vsx.c       |   3 +-
 virt/kvm/arm/vgic/vgic-v3.c                        |   6 +-
 268 files changed, 1563 insertions(+), 1024 deletions(-)
author maintainer
#261 lore raw
Quoted 6 lines · Chris Paterson

Hi Greg,

Quoted 4 lines

From: [email protected] <[email protected]> On Behalf Of Greg Kroah-Hartman
Sent: 11 December 2019 15:03

Quoted 6 lines
Quoted 4 lines

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

All the issues I was reporting before have gone. No new ones either.

Wonderful, thanks for letting me know.

greg k-h

maintainer
#262 lore raw
In reply to Greg Kroah-Hartman
Quoted 20 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

...

Quoted 2 lines

Linus Walleij <[email protected]>
gpio: OF: Parse MMC-specific CD and WP properties

The above change is causing intermittent failures on Tegra30 eMMC. Reverting this change on top of the 4.19.89-rc1 fixes the problem.

Cheers
Jon

Signature · 1 line
nvpublic
#263 lore raw
Quoted 23 lines · Jon Hunter
Quoted 14 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

Quoted 6 lines

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Quoted 8 lines

...

Quoted 2 lines

Linus Walleij <[email protected]>
gpio: OF: Parse MMC-specific CD and WP properties

The above change is causing intermittent failures on Tegra30 eMMC. Reverting this change on top of the 4.19.89-rc1 fixes the problem.

Thanks for tracking that down. I see boot failures for arm:vexpress-a9 when trying to boot from mmc.

I dimly recall that I have seen this before. Ah yes ... commit 89a5e15bcba8 ("gpio/mmc/of: Respect polarity in the device tree") fixes the above commit. Can you give it a try ?

One may wonder though why the parsing code was backported in the first place. It doesn't look like a bug fix to me.

Thanks,
Guenter

#264 lore raw
In reply to Jon Hunter
Quoted 23 lines · Jon Hunter
Quoted 14 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

Quoted 6 lines

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Quoted 8 lines

...

Quoted 2 lines

Linus Walleij <[email protected]>
gpio: OF: Parse MMC-specific CD and WP properties

The above change is causing intermittent failures on Tegra30 eMMC. Reverting this change on top of the 4.19.89-rc1 fixes the problem.

Thanks for tracking that down. I see boot failures for arm:vexpress-a9 when trying to boot from mmc.

I dimly recall that this was a problem before. Ah yes ... commit 89a5e15bcba8 ("gpio/mmc/of: Respect polarity in the device tree") fixes the above commit. Can you give it a try ?

[ One may wonder though why this was back-ported in the first place. ]

Thanks,
Guenter

author maintainer
#265 lore raw
Quoted 33 lines · Guenter Roeck
Quoted 23 lines · Jon Hunter
Quoted 14 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

Quoted 6 lines

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Quoted 8 lines

...

Quoted 2 lines

Linus Walleij <[email protected]>
gpio: OF: Parse MMC-specific CD and WP properties

The above change is causing intermittent failures on Tegra30 eMMC. Reverting this change on top of the 4.19.89-rc1 fixes the problem.

Quoted 8 lines

Thanks for tracking that down. I see boot failures for arm:vexpress-a9 when trying to boot from mmc.

I dimly recall that this was a problem before. Ah yes ... commit 89a5e15bcba8 ("gpio/mmc/of: Respect polarity in the device tree") fixes the above commit. Can you give it a try ?

[ One may wonder though why this was back-ported in the first place. ]

I've dropped the original patch here now, thanks.

greg k-h

maintainer
#266 lore raw
In reply to Guenter Roeck
Quoted 35 lines · Guenter Roeck
Quoted 25 lines · Jon Hunter
Quoted 16 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one.  If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:
    https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
    git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
linux-4.19.y
and the diffstat can be found below.

Quoted 6 lines

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Quoted 8 lines

...

Quoted 2 lines

Linus Walleij <[email protected]>
     gpio: OF: Parse MMC-specific CD and WP properties

The above change is causing intermittent failures on Tegra30 eMMC. Reverting this change on top of the 4.19.89-rc1 fixes the problem.

Quoted 8 lines

Thanks for tracking that down. I see boot failures for arm:vexpress-a9 when trying to boot from mmc.

I dimly recall that this was a problem before. Ah yes ... commit 89a5e15bcba8
("gpio/mmc/of: Respect polarity in the device tree") fixes the above commit.
Can you give it a try ?

Thanks. I did try this and I can confirm that it does indeed work, although does not apply cleanly.

Cheers
Jon

Signature · 1 line
nvpublic
#267 lore raw
In reply to Greg Kroah-Hartman
Quoted 9 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 9 lines
	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah

#268 lore raw
In reply to Greg Kroah-Hartman
Quoted 10 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

Quoted 8 lines
        https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

thanks,

greg k-h

Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Summary
------------------------------------------------------------------------

kernel: 4.19.89-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: 62dbca0959b37287a49ac6a949578849d490df83
git describe: v4.19.88-244-g62dbca0959b3
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.88-244-g62dbca0959b3

No regressions (compared to build v4.19.88)

No fixes (compared to build v4.19.88)

Ran 22458 total tests in the following environments and test suites.

Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64

Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* network-basic-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
* kvm-unit-tests
* ltp-open-posix-tests
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
* ssuite

Signature · 2 lines
Linaro LKFT
https://lkft.linaro.org
author maintainer
#269 lore raw
In reply to Greg Kroah-Hartman
Quoted 5 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Quoted 8 lines

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

I have pushed out -rc2 with a bunch of fixes for existing issues, and some new fixes:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc2.gz

maintainer
#270 lore raw
Quoted 15 lines · Greg Kroah-Hartman
Quoted 5 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Quoted 8 lines

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

Quoted 4 lines

I have pushed out -rc2 with a bunch of fixes for existing issues, and some new fixes:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc2.gz

All tests are passing for Tegra ...

Test results for stable-v4.19:

    13 builds:	13 pass, 0 fail
    22 boots:	22 pass, 0 fail
    32 tests:	32 pass, 0 fail

Linux version: 4.19.89-rc2-gb71ac9dfc6f0
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,

                tegra194-p2972-0000, tegra20-ventana,
                tegra210-p2371-2180, tegra30-cardhu-a04

Cheers
Jon

Signature · 1 line
nvpublic
author maintainer
#271 lore raw
Quoted 26 lines · Jon Hunter
Quoted 15 lines · Greg Kroah-Hartman
Quoted 5 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Quoted 8 lines

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

	https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

Quoted 4 lines

I have pushed out -rc2 with a bunch of fixes for existing issues, and some new fixes:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc2.gz

All tests are passing for Tegra ...

Test results for stable-v4.19:

Quoted 9 lines
    13 builds:	13 pass, 0 fail
    22 boots:	22 pass, 0 fail
    32 tests:	32 pass, 0 fail

Linux version: 4.19.89-rc2-gb71ac9dfc6f0
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,

                tegra194-p2972-0000, tegra20-ventana,
                tegra210-p2371-2180, tegra30-cardhu-a04

Wonderful, thanks for testing all of these and letting me know.

greg k-h

#272 lore raw
In reply to Greg Kroah-Hartman
Quoted 16 lines · Greg Kroah-Hartman
Quoted 5 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Quoted 8 lines

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

The whole patch series can be found in one patch at:

      https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc1.gz

or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.

Quoted 3 lines

I have pushed out -rc2 with a bunch of fixes for existing issues, and some new fixes:

        https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.89-rc2.gz

Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Summary
------------------------------------------------------------------------

kernel: 4.19.89-rc2
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.19.y
git commit: b71ac9dfc6f0f5ef4a9dfa80113bea22cd8b8167
git describe: v4.19.88-255-gb71ac9dfc6f0
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.19-oe/build/v4.19.88-255-gb71ac9dfc6f0

No regressions (compared to build v4.19.88)

No fixes (compared to build v4.19.88)

Ran 24936 total tests in the following environments and test suites.

Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64

Test Suites
-----------
* build
* install-android-platform-tools-r2600
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
* kselftest
* ltp-fs-tests
* network-basic-tests
* ltp-open-posix-tests
* kvm-unit-tests
* ssuite
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none

Signature · 2 lines
Linaro LKFT
https://lkft.linaro.org
#273 lore raw
In reply to Greg Kroah-Hartman
Quoted 8 lines · Greg Kroah-Hartman

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

For v4.19.88-255-gb71ac9dfc6f0:

Build results:

	total: 156 pass: 156 fail: 0
Qemu test results:
	total: 393 pass: 393 fail: 0

Guenter

#274 lore raw
In reply to Greg Kroah-Hartman

Hi!

Quoted 7 lines

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

Is there something funny going on with the timing, again? I see that 4.19.89 is already out:

commit 312017a460d5ea31d646e7148e400e13db799ddc

Author: Greg Kroah-Hartman <[email protected]>
Date:   Fri Dec 13 08:52:59 2019 +0100
    Linux 4.19.89

Best regards,
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#275 lore raw
Quoted 7 lines · Pavel Machek

Hi!

Quoted 5 lines

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Quoted 6 lines
Quoted 2 lines

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

Is there something funny going on with the timing, again? I see that 4.19.89 is already out:

Just for the record, in my opinion it is perfectly fine to publish stable releases early after all expected feedback is in. That lets me merge the release early today and gives me time to fix any merge related problems. I don't see the benefit of waiting until 14:46:07.

Guenter

Quoted 9 lines

commit 312017a460d5ea31d646e7148e400e13db799ddc

Author: Greg Kroah-Hartman <[email protected]>
Date:   Fri Dec 13 08:52:59 2019 +0100
     Linux 4.19.89

Best regards,
Pavel

author maintainer
#276 lore raw
Quoted 11 lines · Guenter Roeck
Quoted 10 lines · Pavel Machek

Hi!

Quoted 7 lines

This is the start of the stable review cycle for the 4.19.89 release. There are 243 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.

Responses should be made by Fri, 13 Dec 2019 14:56:06 +0000. Anything received after that time might be too late.

Quoted 8 lines
Quoted 3 lines

Is there something funny going on with the timing, again? I see that 4.19.89 is already out:

Just for the record, in my opinion it is perfectly fine to publish stable releases early after all expected feedback is in. That lets me merge the release early today and gives me time to fix any merge related problems. I don't see the benefit of waiting until 14:46:07.

And that's exactly what I do. I wait for the expected feedback to come in and if it looks good, I do a release.

I ususally delay the "official" announcement a bit to give the Android builder/testers some time to give feedback after I make the tarballs as they are good at finding problems no one else seems to catch, and then I do the email announcements.

thanks,

greg k-h