linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.9 00/41] 4.9.37-stable review
@ 2017-07-10 17:10 Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 01/41] fs: add a VALID_OPEN_FLAGS Greg Kroah-Hartman
                   ` (38 more replies)
  0 siblings, 39 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

This is the start of the stable review cycle for the 4.9.37 release.
There are 41 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 Wed Jul 12 17:10:36 UTC 2017.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.37-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.9.y
and the diffstat can be found below.

thanks,

greg k-h

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

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 4.9.37-rc1

Yifeng Li <tomli@tomli.me>
    rt286: add Thinkpad Helix 2 to force_combo_jack_table

Boris Pismenny <borisp@mellanox.com>
    RDMA/uverbs: Check port number supplied by user verbs cmds

Stephan Mueller <smueller@chronox.de>
    crypto: drbg - Fixes panic in wait_for_completion call

Dan Carpenter <dan.carpenter@oracle.com>
    KEYS: Fix an error code in request_master_key()

Bartosz Markowski <bartosz.markowski@tieto.com>
    ath10k: override CE5 config for QCA9377

Paolo Abeni <pabeni@redhat.com>
    x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings

Markus Trippelsdorf <markus@trippelsdorf.de>
    x86/tools: Fix gcc-7 warning in relocs.c

Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
    tpm: fix a kernel memory leak in tpm-sysfs.c

Andreas Gruenbacher <agruenba@redhat.com>
    gfs2: Fix glock rhashtable rcu bug

Jiahau Chang <jiahau@gmail.com>
    xhci: Limit USB2 port wake support for AMD Promontory hosts

Bjørn Mork <bjorn@mork.no>
    USB: serial: qcserial: new Sierra Wireless EM7305 device ID

Johan Hovold <johan@kernel.org>
    USB: serial: option: add two Longcheer device ids

Geert Uytterhoeven <geert+renesas@glider.be>
    pinctrl: sh-pfc: Update info pointer after SoC-specific init

Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    pinctrl: sh-pfc: r8a7791: Add missing HSCIF1 pinmux data

Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    pinctrl: mxs: atomically switch mux and drive strength config

Wei Yongjun <weiyongjun1@huawei.com>
    pinctrl: cherryview: Add terminate entry for dmi_system_id tables

Chen-Yu Tsai <wens@csie.org>
    pinctrl: sunxi: Fix SPDIF function name for A83T

Alexandre TORGUE <alexandre.torgue@st.com>
    pinctrl: stm32: Fix bad function call

Martin Blumenstingl <martin.blumenstingl@googlemail.com>
    pinctrl: meson: meson8b: fix the NAND DQS pins

Geert Uytterhoeven <geert+renesas@glider.be>
    pinctrl: sh-pfc: r8a7795: Fix hscif2_clk_b and hscif4_ctrl

Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    pinctrl: sh-pfc: r8a7791: Add missing DVC_MUTE signal

Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    pinctrl: sh-pfc: r8a7791: Fix SCIF2 pinmux data

Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    pinctrl: sh-pfc: r8a7794: Swap ATA signals

Mika Westerberg <mika.westerberg@linux.intel.com>
    pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again

Christian Lamparter <chunkeey@googlemail.com>
    pinctrl: qcom: ipq4019: add missing pingroups for pins > 70

Liping Zhang <zlpnobody@gmail.com>
    sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec

Liping Zhang <zlpnobody@gmail.com>
    sysctl: don't print negative flag for proc_douintvec

Thomas Gleixner <tglx@linutronix.de>
    mac80211_hwsim: Replace bogus hrtimer clockid

Johan Hovold <johan@kernel.org>
    USB: core: fix device node leak

Benjamin Herrenschmidt <benh@kernel.crashing.org>
    usb: Fix typo in the definition of Endpoint[out]Request

Michael Grzeschik <m.grzeschik@pengutronix.de>
    usb: usbip: set buffer pointers to NULL after free

Devin Heitmueller <dheitmueller@kernellabs.com>
    Add USB quirk for HVR-950q to avoid intermittent device resets

Jeremie Rapin <rapinj@gmail.com>
    USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick

Felipe Balbi <felipe.balbi@linux.intel.com>
    usb: dwc3: replace %p with %pK

Gerd Hoffmann <kraxel@redhat.com>
    drm/virtio: don't leak bo on drm_gem_object_init failure

Sakari Ailus <sakari.ailus@linux.intel.com>
    media: entity: Fix stream count check

Sabrina Dubroca <sd@queasysnail.net>
    tracing/kprobes: Allow to create probe with a module name starting with a digit

Yan, Zheng <zyan@redhat.com>
    ceph: choose readdir frag based on previous readdir reply

Adrian Salido <salidoa@google.com>
    driver core: platform: fix race condition with driver_override

Christoph Hellwig <hch@lst.de>
    fs: completely ignore unknown open flags

Christoph Hellwig <hch@lst.de>
    fs: add a VALID_OPEN_FLAGS


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

Diffstat:

 Makefile                                   |  4 ++--
 arch/x86/lib/copy_user_64.S                |  7 +++++--
 arch/x86/tools/relocs.c                    |  3 ++-
 crypto/drbg.c                              |  1 +
 drivers/base/platform.c                    | 11 +++++++++--
 drivers/char/tpm/tpm-sysfs.c               |  3 ++-
 drivers/gpu/drm/virtio/virtgpu_object.c    |  4 +++-
 drivers/infiniband/core/uverbs_cmd.c       |  8 ++++++++
 drivers/media/media-entity.c               |  2 +-
 drivers/net/wireless/ath/ath10k/pci.c      |  2 +-
 drivers/net/wireless/mac80211_hwsim.c      |  2 +-
 drivers/pinctrl/freescale/pinctrl-mxs.c    | 16 ++++++++++++----
 drivers/pinctrl/intel/pinctrl-cherryview.c | 27 +++++++++++++++++++++++++--
 drivers/pinctrl/meson/pinctrl-meson8b.c    |  4 ++--
 drivers/pinctrl/qcom/pinctrl-ipq4019.c     | 30 ++++++++++++++++++++++++++++++
 drivers/pinctrl/sh-pfc/core.c              |  3 +++
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c       | 12 ++++++++----
 drivers/pinctrl/sh-pfc/pfc-r8a7794.c       | 16 ++++++++--------
 drivers/pinctrl/sh-pfc/pfc-r8a7795.c       |  4 ++--
 drivers/pinctrl/stm32/pinctrl-stm32.c      |  2 +-
 drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c |  2 +-
 drivers/usb/core/quirks.c                  |  4 ++++
 drivers/usb/core/usb.c                     |  2 ++
 drivers/usb/dwc3/dwc3-st.c                 |  2 +-
 drivers/usb/dwc3/gadget.c                  |  6 +++---
 drivers/usb/host/xhci-hub.c                |  3 +++
 drivers/usb/host/xhci-pci.c                | 12 ++++++++++++
 drivers/usb/host/xhci.h                    |  1 +
 drivers/usb/serial/cp210x.c                |  1 +
 drivers/usb/serial/option.c                |  4 ++++
 drivers/usb/serial/qcserial.c              |  1 +
 drivers/usb/usbip/stub_main.c              |  4 ++++
 drivers/usb/usbip/stub_tx.c                |  4 ++++
 fs/ceph/dir.c                              | 19 ++++++++++++-------
 fs/fcntl.c                                 | 14 ++++----------
 fs/gfs2/glock.c                            | 11 +++++++++--
 fs/gfs2/incore.h                           |  1 +
 fs/open.c                                  |  6 ++++++
 include/linux/fcntl.h                      |  6 ++++++
 include/linux/usb/hcd.h                    |  4 ++--
 kernel/sysctl.c                            |  3 +++
 kernel/trace/trace_kprobe.c                | 21 ++++++++-------------
 security/keys/encrypted-keys/encrypted.c   |  2 +-
 sound/soc/codecs/rt286.c                   |  7 +++++++
 44 files changed, 226 insertions(+), 75 deletions(-)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 01/41] fs: add a VALID_OPEN_FLAGS
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 02/41] fs: completely ignore unknown open flags Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Christoph Hellwig, Al Viro

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Christoph Hellwig <hch@lst.de>

commit 80f18379a7c350c011d30332658aa15fe49a8fa5 upstream.

Add a central define for all valid open flags, and use it in the uniqueness
check.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/fcntl.c            |   14 ++++----------
 include/linux/fcntl.h |    6 ++++++
 2 files changed, 10 insertions(+), 10 deletions(-)

--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -741,16 +741,10 @@ static int __init fcntl_init(void)
 	 * Exceptions: O_NONBLOCK is a two bit define on parisc; O_NDELAY
 	 * is defined as O_NONBLOCK on some platforms and not on others.
 	 */
-	BUILD_BUG_ON(21 - 1 /* for O_RDONLY being 0 */ != HWEIGHT32(
-		O_RDONLY	| O_WRONLY	| O_RDWR	|
-		O_CREAT		| O_EXCL	| O_NOCTTY	|
-		O_TRUNC		| O_APPEND	| /* O_NONBLOCK	| */
-		__O_SYNC	| O_DSYNC	| FASYNC	|
-		O_DIRECT	| O_LARGEFILE	| O_DIRECTORY	|
-		O_NOFOLLOW	| O_NOATIME	| O_CLOEXEC	|
-		__FMODE_EXEC	| O_PATH	| __O_TMPFILE	|
-		__FMODE_NONOTIFY
-		));
+	BUILD_BUG_ON(21 - 1 /* for O_RDONLY being 0 */ !=
+		HWEIGHT32(
+			(VALID_OPEN_FLAGS & ~(O_NONBLOCK | O_NDELAY)) |
+			__FMODE_EXEC | __FMODE_NONOTIFY));
 
 	fasync_cache = kmem_cache_create("fasync_cache",
 		sizeof(struct fasync_struct), 0, SLAB_PANIC, NULL);
--- a/include/linux/fcntl.h
+++ b/include/linux/fcntl.h
@@ -3,6 +3,12 @@
 
 #include <uapi/linux/fcntl.h>
 
+/* list of all valid flags for the open/openat flags argument: */
+#define VALID_OPEN_FLAGS \
+	(O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \
+	 O_APPEND | O_NDELAY | O_NONBLOCK | O_NDELAY | __O_SYNC | O_DSYNC | \
+	 FASYNC	| O_DIRECT | O_LARGEFILE | O_DIRECTORY | O_NOFOLLOW | \
+	 O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE)
 
 #ifndef force_o_largefile
 #define force_o_largefile() (BITS_PER_LONG != 32)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 02/41] fs: completely ignore unknown open flags
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 01/41] fs: add a VALID_OPEN_FLAGS Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 03/41] driver core: platform: fix race condition with driver_override Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Christoph Hellwig, Al Viro

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Christoph Hellwig <hch@lst.de>

commit 629e014bb8349fcf7c1e4df19a842652ece1c945 upstream.

Currently we just stash anything we got into file->f_flags, and the
report it in fcntl(F_GETFD).  This patch just clears out all unknown
flags so that we don't pass them to the fs or report them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/open.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/fs/open.c
+++ b/fs/open.c
@@ -902,6 +902,12 @@ static inline int build_open_flags(int f
 	int lookup_flags = 0;
 	int acc_mode = ACC_MODE(flags);
 
+	/*
+	 * Clear out all open flags we don't know about so that we don't report
+	 * them in fcntl(F_GETFD) or similar interfaces.
+	 */
+	flags &= VALID_OPEN_FLAGS;
+
 	if (flags & (O_CREAT | __O_TMPFILE))
 		op->mode = (mode & S_IALLUGO) | S_IFREG;
 	else

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 03/41] driver core: platform: fix race condition with driver_override
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 01/41] fs: add a VALID_OPEN_FLAGS Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 02/41] fs: completely ignore unknown open flags Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 04/41] ceph: choose readdir frag based on previous readdir reply Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Adrian Salido

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Adrian Salido <salidoa@google.com>

commit 6265539776a0810b7ce6398c27866ddb9c6bd154 upstream.

The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.

Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'driver_override'")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Salido <salidoa@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/base/platform.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -856,7 +856,7 @@ static ssize_t driver_override_store(str
 				     const char *buf, size_t count)
 {
 	struct platform_device *pdev = to_platform_device(dev);
-	char *driver_override, *old = pdev->driver_override, *cp;
+	char *driver_override, *old, *cp;
 
 	if (count > PATH_MAX)
 		return -EINVAL;
@@ -869,12 +869,15 @@ static ssize_t driver_override_store(str
 	if (cp)
 		*cp = '\0';
 
+	device_lock(dev);
+	old = pdev->driver_override;
 	if (strlen(driver_override)) {
 		pdev->driver_override = driver_override;
 	} else {
 		kfree(driver_override);
 		pdev->driver_override = NULL;
 	}
+	device_unlock(dev);
 
 	kfree(old);
 
@@ -885,8 +888,12 @@ static ssize_t driver_override_show(stru
 				    struct device_attribute *attr, char *buf)
 {
 	struct platform_device *pdev = to_platform_device(dev);
+	ssize_t len;
 
-	return sprintf(buf, "%s\n", pdev->driver_override);
+	device_lock(dev);
+	len = sprintf(buf, "%s\n", pdev->driver_override);
+	device_unlock(dev);
+	return len;
 }
 static DEVICE_ATTR_RW(driver_override);
 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 04/41] ceph: choose readdir frag based on previous readdir reply
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 03/41] driver core: platform: fix race condition with driver_override Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 05/41] tracing/kprobes: Allow to create probe with a module name starting with a digit Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Yan, Zheng, Ilya Dryomov

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Yan, Zheng <zyan@redhat.com>

commit b50c2de51e611da90cf3cf04c058f7e9bbe79e93 upstream.

The dirfragtree is lazily updated, it's not always accurate. Infinite
loops happens in following circumstance.

- client send request to read frag A
- frag A has been fragmented into frag B and C. So mds fills the reply
  with contents of frag B
- client wants to read next frag C. ceph_choose_frag(frag value of C)
  return frag A.

The fix is using previous readdir reply to calculate next readdir frag
when possible.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/ceph/dir.c |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -315,7 +315,7 @@ static int ceph_readdir(struct file *fil
 	struct ceph_mds_client *mdsc = fsc->mdsc;
 	int i;
 	int err;
-	u32 ftype;
+	unsigned frag = -1;
 	struct ceph_mds_reply_info_parsed *rinfo;
 
 	dout("readdir %p file %p pos %llx\n", inode, file, ctx->pos);
@@ -362,7 +362,6 @@ more:
 	/* do we have the correct frag content buffered? */
 	if (need_send_readdir(fi, ctx->pos)) {
 		struct ceph_mds_request *req;
-		unsigned frag;
 		int op = ceph_snap(inode) == CEPH_SNAPDIR ?
 			CEPH_MDS_OP_LSSNAP : CEPH_MDS_OP_READDIR;
 
@@ -373,8 +372,11 @@ more:
 		}
 
 		if (is_hash_order(ctx->pos)) {
-			frag = ceph_choose_frag(ci, fpos_hash(ctx->pos),
-						NULL, NULL);
+			/* fragtree isn't always accurate. choose frag
+			 * based on previous reply when possible. */
+			if (frag == (unsigned)-1)
+				frag = ceph_choose_frag(ci, fpos_hash(ctx->pos),
+							NULL, NULL);
 		} else {
 			frag = fpos_frag(ctx->pos);
 		}
@@ -497,6 +499,7 @@ more:
 		struct ceph_mds_reply_dir_entry *rde = rinfo->dir_entries + i;
 		struct ceph_vino vino;
 		ino_t ino;
+		u32 ftype;
 
 		BUG_ON(rde->offset < ctx->pos);
 
@@ -519,15 +522,17 @@ more:
 		ctx->pos++;
 	}
 
+	ceph_mdsc_put_request(fi->last_readdir);
+	fi->last_readdir = NULL;
+
 	if (fi->next_offset > 2) {
-		ceph_mdsc_put_request(fi->last_readdir);
-		fi->last_readdir = NULL;
+		frag = fi->frag;
 		goto more;
 	}
 
 	/* more frags? */
 	if (!ceph_frag_is_rightmost(fi->frag)) {
-		unsigned frag = ceph_frag_next(fi->frag);
+		frag = ceph_frag_next(fi->frag);
 		if (is_hash_order(ctx->pos)) {
 			loff_t new_pos = ceph_make_fpos(ceph_frag_value(frag),
 							fi->next_offset, true);

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 05/41] tracing/kprobes: Allow to create probe with a module name starting with a digit
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 04/41] ceph: choose readdir frag based on previous readdir reply Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 06/41] [media] media: entity: Fix stream count check Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Masami Hiramatsu, Sabrina Dubroca,
	Steven Rostedt (VMware)

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Sabrina Dubroca <sd@queasysnail.net>

commit 9e52b32567126fe146f198971364f68d3bc5233f upstream.

Always try to parse an address, since kstrtoul() will safely fail when
given a symbol as input. If that fails (which will be the case for a
symbol), try to parse a symbol instead.

This allows creating a probe such as:

    p:probe/vlan_gro_receive 8021q:vlan_gro_receive+0

Which is necessary for this command to work:

    perf probe -m 8021q -a vlan_gro_receive

Link: http://lkml.kernel.org/r/fd72d666f45b114e2c5b9cf7e27b91de1ec966f1.1498122881.git.sd@queasysnail.net

Fixes: 413d37d1e ("tracing: Add kprobe-based event tracer")
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/trace/trace_kprobe.c |   21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -667,30 +667,25 @@ static int create_trace_kprobe(int argc,
 		pr_info("Probe point is not specified.\n");
 		return -EINVAL;
 	}
-	if (isdigit(argv[1][0])) {
-		if (is_return) {
-			pr_info("Return probe point must be a symbol.\n");
-			return -EINVAL;
-		}
-		/* an address specified */
-		ret = kstrtoul(&argv[1][0], 0, (unsigned long *)&addr);
-		if (ret) {
-			pr_info("Failed to parse address.\n");
-			return ret;
-		}
-	} else {
+
+	/* try to parse an address. if that fails, try to read the
+	 * input as a symbol. */
+	if (kstrtoul(argv[1], 0, (unsigned long *)&addr)) {
 		/* a symbol specified */
 		symbol = argv[1];
 		/* TODO: support .init module functions */
 		ret = traceprobe_split_symbol_offset(symbol, &offset);
 		if (ret) {
-			pr_info("Failed to parse symbol.\n");
+			pr_info("Failed to parse either an address or a symbol.\n");
 			return ret;
 		}
 		if (offset && is_return) {
 			pr_info("Return probe must be used without offset.\n");
 			return -EINVAL;
 		}
+	} else if (is_return) {
+		pr_info("Return probe point must be a symbol.\n");
+		return -EINVAL;
 	}
 	argc -= 2; argv += 2;
 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 06/41] [media] media: entity: Fix stream count check
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 05/41] tracing/kprobes: Allow to create probe with a module name starting with a digit Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 08/41] usb: dwc3: replace %p with %pK Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sakari Ailus, Laurent Pinchart,
	Mauro Carvalho Chehab

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Sakari Ailus <sakari.ailus@linux.intel.com>

commit 41387a59c8fd55975c6a26cc12fc5c9ca61fcc0f upstream.

There's a sanity check for the stream count remaining positive or zero on
error path, but instead of performing the check on the traversed entity it
is performed on the entity where traversal ends. Fix this.

Fixes: commit 3801bc7d1b8d ("[media] media: Media Controller fix to not let stream_count go negative")

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/media/media-entity.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -468,7 +468,7 @@ error:
 
 	while ((entity_err = media_entity_graph_walk_next(graph))) {
 		/* don't let the stream_count go negative */
-		if (entity->stream_count > 0) {
+		if (entity_err->stream_count > 0) {
 			entity_err->stream_count--;
 			if (entity_err->stream_count == 0)
 				entity_err->pipe = NULL;

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 08/41] usb: dwc3: replace %p with %pK
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 06/41] [media] media: entity: Fix stream count check Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 09/41] USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Felipe Balbi

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Felipe Balbi <felipe.balbi@linux.intel.com>

commit 04fb365c453e14ff9e8a28f1c46050d920a27a4a upstream.

%p will leak kernel pointers, so let's not expose the information on
dmesg and instead use %pK. %pK will only show the actual addresses if
explicitly enabled under /proc/sys/kernel/kptr_restrict.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/dwc3/dwc3-st.c |    2 +-
 drivers/usb/dwc3/gadget.c  |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/usb/dwc3/dwc3-st.c
+++ b/drivers/usb/dwc3/dwc3-st.c
@@ -231,7 +231,7 @@ static int st_dwc3_probe(struct platform
 
 	dwc3_data->syscfg_reg_off = res->start;
 
-	dev_vdbg(&pdev->dev, "glue-logic addr 0x%p, syscfg-reg offset 0x%x\n",
+	dev_vdbg(&pdev->dev, "glue-logic addr 0x%pK, syscfg-reg offset 0x%x\n",
 		 dwc3_data->glue_base, dwc3_data->syscfg_reg_off);
 
 	dwc3_data->rstc_pwrdn =
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1069,9 +1069,9 @@ static int __dwc3_gadget_ep_queue(struct
 		return -ESHUTDOWN;
 	}
 
-	if (WARN(req->dep != dep, "request %p belongs to '%s'\n",
+	if (WARN(req->dep != dep, "request %pK belongs to '%s'\n",
 				&req->request, req->dep->name)) {
-		dwc3_trace(trace_dwc3_gadget, "request %p belongs to '%s'",
+		dwc3_trace(trace_dwc3_gadget, "request %pK belongs to '%s'",
 				&req->request, req->dep->name);
 		return -EINVAL;
 	}
@@ -1212,7 +1212,7 @@ static int dwc3_gadget_ep_dequeue(struct
 			dwc3_stop_active_transfer(dwc, dep->number, true);
 			goto out1;
 		}
-		dev_err(dwc->dev, "request %p was not queued to %s\n",
+		dev_err(dwc->dev, "request %pK was not queued to %s\n",
 				request, ep->name);
 		ret = -EINVAL;
 		goto out0;

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 09/41] USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 08/41] usb: dwc3: replace %p with %pK Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 10/41] Add USB quirk for HVR-950q to avoid intermittent device resets Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jeremie Rapin, Johan Hovold

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Jeremie Rapin <rapinj@gmail.com>

commit fd90f73a9925f248d696bde1cfc836d9fda5570d upstream.

Added the USB serial device ID for the CEL ZigBee EM3588
radio stick.

Signed-off-by: Jeremie Rapin <rapinj@gmail.com>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/cp210x.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -135,6 +135,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x10C4, 0x8977) },	/* CEL MeshWorks DevKit Device */
 	{ USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
 	{ USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */
+	{ USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */
 	{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
 	{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
 	{ USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 10/41] Add USB quirk for HVR-950q to avoid intermittent device resets
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 09/41] USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 11/41] usb: usbip: set buffer pointers to NULL after free Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Devin Heitmueller

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Devin Heitmueller <dheitmueller@kernellabs.com>

commit 6836796de4019944f4ba4c99a360e8250fd2e735 upstream.

The USB core and sysfs will attempt to enumerate certain parameters
which are unsupported by the au0828 - causing inconsistent behavior
and sometimes causing the chip to reset.  Avoid making these calls.

This problem manifested as intermittent cases where the au8522 would
be reset on analog video startup, in particular when starting up ALSA
audio streaming in parallel - the sysfs entries created by
snd-usb-audio on streaming startup would result in unsupported control
messages being sent during tuning which would put the chip into an
unknown state.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/quirks.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -223,6 +223,10 @@ static const struct usb_device_id usb_qu
 	/* Blackmagic Design UltraStudio SDI */
 	{ USB_DEVICE(0x1edb, 0xbd4f), .driver_info = USB_QUIRK_NO_LPM },
 
+	/* Hauppauge HVR-950q */
+	{ USB_DEVICE(0x2040, 0x7200), .driver_info =
+			USB_QUIRK_CONFIG_INTF_STRINGS },
+
 	/* INTEL VALUE SSD */
 	{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 11/41] usb: usbip: set buffer pointers to NULL after free
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 10/41] Add USB quirk for HVR-950q to avoid intermittent device resets Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 12/41] usb: Fix typo in the definition of Endpoint[out]Request Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Michael Grzeschik, Shuah Khan

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Michael Grzeschik <m.grzeschik@pengutronix.de>

commit b3b51417d0af63fb9a06662dc292200aed9ea53f upstream.

The usbip stack dynamically allocates the transfer_buffer and
setup_packet of each urb that got generated by the tcp to usb stub code.
As these pointers are always used only once we will set them to NULL
after use. This is done likewise to the free_urb code in vudc_dev.c.
This patch fixes double kfree situations where the usbip remote side
added the URB_FREE_BUFFER.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/usbip/stub_main.c |    4 ++++
 drivers/usb/usbip/stub_tx.c   |    4 ++++
 2 files changed, 8 insertions(+)

--- a/drivers/usb/usbip/stub_main.c
+++ b/drivers/usb/usbip/stub_main.c
@@ -262,7 +262,11 @@ void stub_device_cleanup_urbs(struct stu
 		kmem_cache_free(stub_priv_cache, priv);
 
 		kfree(urb->transfer_buffer);
+		urb->transfer_buffer = NULL;
+
 		kfree(urb->setup_packet);
+		urb->setup_packet = NULL;
+
 		usb_free_urb(urb);
 	}
 }
--- a/drivers/usb/usbip/stub_tx.c
+++ b/drivers/usb/usbip/stub_tx.c
@@ -28,7 +28,11 @@ static void stub_free_priv_and_urb(struc
 	struct urb *urb = priv->urb;
 
 	kfree(urb->setup_packet);
+	urb->setup_packet = NULL;
+
 	kfree(urb->transfer_buffer);
+	urb->transfer_buffer = NULL;
+
 	list_del(&priv->list);
 	kmem_cache_free(stub_priv_cache, priv);
 	usb_free_urb(urb);

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 12/41] usb: Fix typo in the definition of Endpoint[out]Request
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 11/41] usb: usbip: set buffer pointers to NULL after free Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 13/41] USB: core: fix device node leak Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Benjamin Herrenschmidt, Alan Stern

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

commit 7cf916bd639bd26db7214f2205bccdb4b9306256 upstream.

The current definition is wrong. This breaks my upcoming
Aspeed virtual hub driver.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/usb/hcd.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -561,9 +561,9 @@ extern void usb_ep0_reinit(struct usb_de
 	((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8)
 
 #define EndpointRequest \
-	((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8)
+	((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_ENDPOINT)<<8)
 #define EndpointOutRequest \
-	((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8)
+	((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_ENDPOINT)<<8)
 
 /* class requests from the USB 2.0 hub spec, table 11-15 */
 /* GetBusState and SetHubDescriptor are optional, omitted */

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 13/41] USB: core: fix device node leak
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 12/41] usb: Fix typo in the definition of Endpoint[out]Request Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 14/41] mac80211_hwsim: Replace bogus hrtimer clockid Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Peter Chen, Johan Hovold

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Johan Hovold <johan@kernel.org>

commit e271b2c909a22a2c13b2d5f77f2ce0091b74540c upstream.

Make sure to release any OF device-node reference taken when creating
the USB device.

Note that we currently do not hold a reference to the root hub
device-tree node (i.e. the parent controller node).

Fixes: 69bec7259853 ("USB: core: let USB device know device node")
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/usb.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -279,6 +279,8 @@ static void usb_release_dev(struct devic
 
 	usb_destroy_configuration(udev);
 	usb_release_bos_descriptor(udev);
+	if (udev->parent)
+		of_node_put(dev->of_node);
 	usb_put_hcd(hcd);
 	kfree(udev->product);
 	kfree(udev->manufacturer);

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 14/41] mac80211_hwsim: Replace bogus hrtimer clockid
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 13/41] USB: core: fix device node leak Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 15/41] sysctl: dont print negative flag for proc_douintvec Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Thomas Gleixner, Johannes Berg

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Thomas Gleixner <tglx@linutronix.de>

commit 8fbcfeb8a9cc803464d6c166e7991913711c612c upstream.

mac80211_hwsim initializes a hrtimer with clockid
CLOCK_MONOTONIC_RAW. That's not supported.

Use CLOCK_MONOTONIC instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/mac80211_hwsim.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2662,7 +2662,7 @@ static int mac80211_hwsim_new_radio(stru
 
 	tasklet_hrtimer_init(&data->beacon_timer,
 			     mac80211_hwsim_beacon,
-			     CLOCK_MONOTONIC_RAW, HRTIMER_MODE_ABS);
+			     CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
 
 	spin_lock_bh(&hwsim_radio_lock);
 	list_add_tail(&data->list, &hwsim_radios);

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 15/41] sysctl: dont print negative flag for proc_douintvec
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 14/41] mac80211_hwsim: Replace bogus hrtimer clockid Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 16/41] sysctl: report EINVAL if value is larger than UINT_MAX " Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Liping Zhang,
	Subash Abhinov Kasiviswanathan, Andrew Morton, Linus Torvalds

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Liping Zhang <zlpnobody@gmail.com>

commit 5380e5644afbba9e3d229c36771134976f05c91e upstream.

I saw some very confusing sysctl output on my system:
  # cat /proc/sys/net/core/xfrm_aevent_rseqth
  -2
  # cat /proc/sys/net/core/xfrm_aevent_etime
  -10
  # cat /proc/sys/net/ipv4/tcp_notsent_lowat
  -4294967295

Because we forget to set the *negp flag in proc_douintvec, so it will
become a garbage value.

Since the value related to proc_douintvec is always an unsigned integer,
so we can set *negp to false explictily to fix this issue.

Fixes: e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields")
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/sysctl.c |    1 +
 1 file changed, 1 insertion(+)

--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2149,6 +2149,7 @@ static int do_proc_douintvec_conv(bool *
 		*valp = *lvalp;
 	} else {
 		unsigned int val = *valp;
+		*negp = false;
 		*lvalp = (unsigned long)val;
 	}
 	return 0;

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 16/41] sysctl: report EINVAL if value is larger than UINT_MAX for proc_douintvec
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 15/41] sysctl: dont print negative flag for proc_douintvec Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 17/41] pinctrl: qcom: ipq4019: add missing pingroups for pins > 70 Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Liping Zhang,
	Subash Abhinov Kasiviswanathan, Andrew Morton, Eric W. Biederman,
	Linus Torvalds

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Liping Zhang <zlpnobody@gmail.com>

commit 425fffd886bae3d127a08fa6a17f2e31e24ed7ff upstream.

Currently, inputting the following command will succeed but actually the
value will be truncated:

  # echo 0x12ffffffff > /proc/sys/net/ipv4/tcp_notsent_lowat

This is not friendly to the user, so instead, we should report error
when the value is larger than UINT_MAX.

Fixes: e7d316a02f68 ("sysctl: handle error writing UINT_MAX to u32 fields")
Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Cc: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/sysctl.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2146,6 +2146,8 @@ static int do_proc_douintvec_conv(bool *
 	if (write) {
 		if (*negp)
 			return -EINVAL;
+		if (*lvalp > UINT_MAX)
+			return -EINVAL;
 		*valp = *lvalp;
 	} else {
 		unsigned int val = *valp;

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 17/41] pinctrl: qcom: ipq4019: add missing pingroups for pins > 70
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 16/41] sysctl: report EINVAL if value is larger than UINT_MAX " Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 18/41] pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Christian Lamparter, Bjorn Andersson,
	Linus Walleij

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Christian Lamparter <chunkeey@googlemail.com>

commit d7402de48efae57bbb0072e53d3800c30de57ea5 upstream.

This patch adds the missing PINGROUP for GPIO70-99.
This fixes a crash that happens in pinctrl-msm, if any
of the GPIO70-99 are accessed.

Fixes: 5303f7827fcd41d ("pinctrl: qcom: ipq4019: set ngpios to correct value")
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/qcom/pinctrl-ipq4019.c |   30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

--- a/drivers/pinctrl/qcom/pinctrl-ipq4019.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
@@ -405,6 +405,36 @@ static const struct msm_pingroup ipq4019
 	PINGROUP(67, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(68, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 	PINGROUP(69, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(70, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(71, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(72, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(78, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(82, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(83, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(84, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(85, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(88, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(89, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(90, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(91, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(92, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(93, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(94, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(95, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(96, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(97, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(98, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+	PINGROUP(99, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
 };
 
 static const struct msm_pinctrl_soc_data ipq4019_pinctrl = {

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 18/41] pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 17/41] pinctrl: qcom: ipq4019: add missing pingroups for pins > 70 Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 19/41] pinctrl: sh-pfc: r8a7794: Swap ATA signals Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Adam S Levy, Mika Westerberg, Linus Walleij

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Mika Westerberg <mika.westerberg@linux.intel.com>

commit 7036502783729c2aaf7a3c24c89087c58721430f upstream.

After commit 47c950d10202 ("pinctrl: cherryview: Do not add all
southwest and north GPIOs to IRQ domain") the driver does not add all
GPIOs to the irqdomain. The reason for that is that those GPIOs cannot
generate IRQs at all, only GPEs (General Purpose Events). This causes
Linux virtual IRQ numbering to change.

However, it seems some CYAN Chromebooks, including Acer Chromebook
hardcodes these Linux IRQ numbers in the ACPI tables of the machine.
Since the numbering is different now, the IRQ meant for keyboard does
not match the Linux virtual IRQ number anymore making the keyboard
non-functional.

Work this around by adding special quirk just for these machines where
we add back all GPIOs to the irqdomain. Rest of the Cherryview/Braswell
based machines will not be affected by the change.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=194945
Fixes: 47c950d10202 ("pinctrl: cherryview: Do not add all southwest and north GPIOs to IRQ domain")
Reported-by: Adam S Levy <theadamlevy@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/intel/pinctrl-cherryview.c |   26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -13,6 +13,7 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/dmi.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -1524,10 +1525,31 @@ static void chv_gpio_irq_handler(struct
 	chained_irq_exit(chip, desc);
 }
 
+/*
+ * Certain machines seem to hardcode Linux IRQ numbers in their ACPI
+ * tables. Since we leave GPIOs that are not capable of generating
+ * interrupts out of the irqdomain the numbering will be different and
+ * cause devices using the hardcoded IRQ numbers fail. In order not to
+ * break such machines we will only mask pins from irqdomain if the machine
+ * is not listed below.
+ */
+static const struct dmi_system_id chv_no_valid_mask[] = {
+	{
+		/* See https://bugzilla.kernel.org/show_bug.cgi?id=194945 */
+		.ident = "Acer Chromebook (CYAN)",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Edgar"),
+			DMI_MATCH(DMI_BIOS_DATE, "05/21/2016"),
+		},
+	}
+};
+
 static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)
 {
 	const struct chv_gpio_pinrange *range;
 	struct gpio_chip *chip = &pctrl->chip;
+	bool need_valid_mask = !dmi_check_system(chv_no_valid_mask);
 	int ret, i, offset;
 
 	*chip = chv_gpio_chip;
@@ -1536,7 +1558,7 @@ static int chv_gpio_probe(struct chv_pin
 	chip->label = dev_name(pctrl->dev);
 	chip->parent = pctrl->dev;
 	chip->base = -1;
-	chip->irq_need_valid_mask = true;
+	chip->irq_need_valid_mask = need_valid_mask;
 
 	ret = devm_gpiochip_add_data(pctrl->dev, chip, pctrl);
 	if (ret) {
@@ -1567,7 +1589,7 @@ static int chv_gpio_probe(struct chv_pin
 		intsel &= CHV_PADCTRL0_INTSEL_MASK;
 		intsel >>= CHV_PADCTRL0_INTSEL_SHIFT;
 
-		if (intsel >= pctrl->community->nirqs)
+		if (need_valid_mask && intsel >= pctrl->community->nirqs)
 			clear_bit(i, chip->irq_valid_mask);
 	}
 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 19/41] pinctrl: sh-pfc: r8a7794: Swap ATA signals
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 18/41] pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 20/41] pinctrl: sh-pfc: r8a7791: Fix SCIF2 pinmux data Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sergei Shtylyov, Geert Uytterhoeven

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

commit 5f4c8cafe1148f8a91287072815df8f0b66f0e5c upstream.

All R8A7794 manuals I have here (0.50 and 1.10) agree that the PFC driver
has ATAG0# and ATAWR0# signals in IPSR12 swapped -- fix this.

Fixes: 43c4436e2f18 ("pinctrl: sh-pfc: add R8A7794 PFC support")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/sh-pfc/pfc-r8a7794.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

--- a/drivers/pinctrl/sh-pfc/pfc-r8a7794.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7794.c
@@ -281,8 +281,8 @@ enum {
 	FN_AVB_AVTP_CAPTURE, FN_ETH_CRS_DV_B, FN_SSI_WS1, FN_SCIF1_TXD_B,
 	FN_IIC1_SDA_C, FN_VI1_DATA0, FN_CAN0_TX_D, FN_AVB_AVTP_MATCH,
 	FN_ETH_RX_ER_B, FN_SSI_SDATA1, FN_HSCIF1_HRX_B, FN_SDATA, FN_VI1_DATA1,
-	FN_ATAG0_N, FN_ETH_RXD0_B, FN_SSI_SCK2, FN_HSCIF1_HTX_B, FN_VI1_DATA2,
-	FN_MDATA, FN_ATAWR0_N, FN_ETH_RXD1_B,
+	FN_ATAWR0_N, FN_ETH_RXD0_B, FN_SSI_SCK2, FN_HSCIF1_HTX_B, FN_VI1_DATA2,
+	FN_MDATA, FN_ATAG0_N, FN_ETH_RXD1_B,
 
 	/* IPSR13 */
 	FN_SSI_WS2, FN_HSCIF1_HCTS_N_B, FN_SCIFA0_RXD_D, FN_VI1_DATA3, FN_SCKZ,
@@ -575,8 +575,8 @@ enum {
 	ETH_CRS_DV_B_MARK, SSI_WS1_MARK, SCIF1_TXD_B_MARK, IIC1_SDA_C_MARK,
 	VI1_DATA0_MARK, CAN0_TX_D_MARK, AVB_AVTP_MATCH_MARK, ETH_RX_ER_B_MARK,
 	SSI_SDATA1_MARK, HSCIF1_HRX_B_MARK, VI1_DATA1_MARK, SDATA_MARK,
-	ATAG0_N_MARK, ETH_RXD0_B_MARK, SSI_SCK2_MARK, HSCIF1_HTX_B_MARK,
-	VI1_DATA2_MARK, MDATA_MARK, ATAWR0_N_MARK, ETH_RXD1_B_MARK,
+	ATAWR0_N_MARK, ETH_RXD0_B_MARK, SSI_SCK2_MARK, HSCIF1_HTX_B_MARK,
+	VI1_DATA2_MARK, MDATA_MARK, ATAG0_N_MARK, ETH_RXD1_B_MARK,
 
 	/* IPSR13 */
 	SSI_WS2_MARK, HSCIF1_HCTS_N_B_MARK, SCIFA0_RXD_D_MARK, VI1_DATA3_MARK,
@@ -1413,13 +1413,13 @@ static const u16 pinmux_data[] = {
 	PINMUX_IPSR_MSEL(IP12_26_24, HSCIF1_HRX_B, SEL_HSCIF1_1),
 	PINMUX_IPSR_GPSR(IP12_26_24, VI1_DATA1),
 	PINMUX_IPSR_MSEL(IP12_26_24, SDATA, SEL_FSN_0),
-	PINMUX_IPSR_GPSR(IP12_26_24, ATAG0_N),
+	PINMUX_IPSR_GPSR(IP12_26_24, ATAWR0_N),
 	PINMUX_IPSR_MSEL(IP12_26_24, ETH_RXD0_B, SEL_ETH_1),
 	PINMUX_IPSR_MSEL(IP12_29_27, SSI_SCK2, SEL_SSI2_0),
 	PINMUX_IPSR_MSEL(IP12_29_27, HSCIF1_HTX_B, SEL_HSCIF1_1),
 	PINMUX_IPSR_GPSR(IP12_29_27, VI1_DATA2),
 	PINMUX_IPSR_MSEL(IP12_29_27, MDATA, SEL_FSN_0),
-	PINMUX_IPSR_GPSR(IP12_29_27, ATAWR0_N),
+	PINMUX_IPSR_GPSR(IP12_29_27, ATAG0_N),
 	PINMUX_IPSR_MSEL(IP12_29_27, ETH_RXD1_B, SEL_ETH_1),
 
 	/* IPSR13 */
@@ -4938,10 +4938,10 @@ static const struct pinmux_cfg_reg pinmu
 		0, 0, 0, 0,
 		/* IP12_29_27 [3] */
 		FN_SSI_SCK2, FN_HSCIF1_HTX_B, FN_VI1_DATA2, FN_MDATA,
-		FN_ATAWR0_N, FN_ETH_RXD1_B, 0, 0,
+		FN_ATAG0_N, FN_ETH_RXD1_B, 0, 0,
 		/* IP12_26_24 [3] */
 		FN_SSI_SDATA1, FN_HSCIF1_HRX_B, FN_VI1_DATA1, FN_SDATA,
-		FN_ATAG0_N, FN_ETH_RXD0_B, 0, 0,
+		FN_ATAWR0_N, FN_ETH_RXD0_B, 0, 0,
 		/* IP12_23_21 [3] */
 		FN_SSI_WS1, FN_SCIF1_TXD_B, FN_IIC1_SDA_C, FN_VI1_DATA0,
 		FN_CAN0_TX_D, FN_AVB_AVTP_MATCH, FN_ETH_RX_ER_B, 0,

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 20/41] pinctrl: sh-pfc: r8a7791: Fix SCIF2 pinmux data
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 19/41] pinctrl: sh-pfc: r8a7794: Swap ATA signals Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 21/41] pinctrl: sh-pfc: r8a7791: Add missing DVC_MUTE signal Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sergei Shtylyov, Geert Uytterhoeven

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

commit 58439280f84e6b39fd7d61f25ab30489c1aaf0a9 upstream.

PINMUX_IPSR_MSEL() macro invocation for the TX2 signal has apparently wrong
1st argument -- most probably a result of cut&paste programming...

Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
@@ -1099,7 +1099,7 @@ static const u16 pinmux_data[] = {
 	PINMUX_IPSR_MSEL(IP6_5_3, FMIN_E, SEL_FM_4),
 	PINMUX_IPSR_GPSR(IP6_7_6, AUDIO_CLKOUT),
 	PINMUX_IPSR_MSEL(IP6_7_6, MSIOF1_SS1_B, SEL_SOF1_1),
-	PINMUX_IPSR_MSEL(IP6_5_3, TX2, SEL_SCIF2_0),
+	PINMUX_IPSR_MSEL(IP6_7_6, TX2, SEL_SCIF2_0),
 	PINMUX_IPSR_MSEL(IP6_7_6, SCIFA2_TXD, SEL_SCIFA2_0),
 	PINMUX_IPSR_GPSR(IP6_9_8, IRQ0),
 	PINMUX_IPSR_MSEL(IP6_9_8, SCIFB1_RXD_D, SEL_SCIFB1_3),

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 21/41] pinctrl: sh-pfc: r8a7791: Add missing DVC_MUTE signal
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 20/41] pinctrl: sh-pfc: r8a7791: Fix SCIF2 pinmux data Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 22/41] pinctrl: sh-pfc: r8a7795: Fix hscif2_clk_b and hscif4_ctrl Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sergei Shtylyov, Geert Uytterhoeven

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

commit 3908632fb829d73317c64c3d04f584b49f62e4ae upstream.

The R8A7791 PFC driver  was apparently based on the preliminary revisions
of  the user's  manual, which  omitted the DVC_MUTE signal  altogether in
the PFC section. The modern manual has the signal described,  so just add
the necassary data to the driver...

Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
@@ -203,7 +203,7 @@ enum {
 
 	/* IPSR6 */
 	FN_AUDIO_CLKB, FN_STP_OPWM_0_B, FN_MSIOF1_SCK_B,
-	FN_SCIF_CLK, FN_BPFCLK_E,
+	FN_SCIF_CLK, FN_DVC_MUTE, FN_BPFCLK_E,
 	FN_AUDIO_CLKC, FN_SCIFB0_SCK_C, FN_MSIOF1_SYNC_B, FN_RX2,
 	FN_SCIFA2_RXD, FN_FMIN_E,
 	FN_AUDIO_CLKOUT, FN_MSIOF1_SS1_B, FN_TX2, FN_SCIFA2_TXD,
@@ -573,7 +573,7 @@ enum {
 
 	/* IPSR6 */
 	AUDIO_CLKB_MARK, STP_OPWM_0_B_MARK, MSIOF1_SCK_B_MARK,
-	SCIF_CLK_MARK, BPFCLK_E_MARK,
+	SCIF_CLK_MARK, DVC_MUTE_MARK, BPFCLK_E_MARK,
 	AUDIO_CLKC_MARK, SCIFB0_SCK_C_MARK, MSIOF1_SYNC_B_MARK, RX2_MARK,
 	SCIFA2_RXD_MARK, FMIN_E_MARK,
 	AUDIO_CLKOUT_MARK, MSIOF1_SS1_B_MARK, TX2_MARK, SCIFA2_TXD_MARK,
@@ -1090,6 +1090,7 @@ static const u16 pinmux_data[] = {
 	PINMUX_IPSR_MSEL(IP6_2_0, STP_OPWM_0_B, SEL_SSP_1),
 	PINMUX_IPSR_MSEL(IP6_2_0, MSIOF1_SCK_B, SEL_SOF1_1),
 	PINMUX_IPSR_MSEL(IP6_2_0, SCIF_CLK, SEL_SCIF_0),
+	PINMUX_IPSR_GPSR(IP6_2_0, DVC_MUTE),
 	PINMUX_IPSR_MSEL(IP6_2_0, BPFCLK_E, SEL_FM_4),
 	PINMUX_IPSR_GPSR(IP6_5_3, AUDIO_CLKC),
 	PINMUX_IPSR_MSEL(IP6_5_3, SCIFB0_SCK_C, SEL_SCIFB_2),
@@ -5810,7 +5811,7 @@ static const struct pinmux_cfg_reg pinmu
 		0, 0,
 		/* IP6_2_0 [3] */
 		FN_AUDIO_CLKB, FN_STP_OPWM_0_B, FN_MSIOF1_SCK_B,
-		FN_SCIF_CLK, 0, FN_BPFCLK_E,
+		FN_SCIF_CLK, FN_DVC_MUTE, FN_BPFCLK_E,
 		0, 0, }
 	},
 	{ PINMUX_CFG_REG_VAR("IPSR7", 0xE606003C, 32,

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 22/41] pinctrl: sh-pfc: r8a7795: Fix hscif2_clk_b and hscif4_ctrl
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 21/41] pinctrl: sh-pfc: r8a7791: Add missing DVC_MUTE signal Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 23/41] pinctrl: meson: meson8b: fix the NAND DQS pins Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Geert Uytterhoeven <geert+renesas@glider.be>

commit 4324b6084f45b9faebda8d6563d8625d22b4b5df upstream.

Fix typos in hscif2_clk_b_mux[] and hscif4_ctrl_mux[].

Fixes: a56069c46c102710 ("pinctrl: sh-pfc: r8a7795: Add HSCIF pins, groups, and functions")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/sh-pfc/pfc-r8a7795.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
@@ -2056,7 +2056,7 @@ static const unsigned int hscif2_clk_b_p
 	RCAR_GP_PIN(6, 21),
 };
 static const unsigned int hscif2_clk_b_mux[] = {
-	HSCK1_B_MARK,
+	HSCK2_B_MARK,
 };
 static const unsigned int hscif2_ctrl_b_pins[] = {
 	/* RTS, CTS */
@@ -2129,7 +2129,7 @@ static const unsigned int hscif4_ctrl_pi
 	RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14),
 };
 static const unsigned int hscif4_ctrl_mux[] = {
-	HRTS4_N_MARK, HCTS3_N_MARK,
+	HRTS4_N_MARK, HCTS4_N_MARK,
 };
 
 static const unsigned int hscif4_data_b_pins[] = {

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 23/41] pinctrl: meson: meson8b: fix the NAND DQS pins
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 22/41] pinctrl: sh-pfc: r8a7795: Fix hscif2_clk_b and hscif4_ctrl Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 24/41] pinctrl: stm32: Fix bad function call Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Martin Blumenstingl, Kevin Hilman,
	Linus Walleij

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

commit 97ba26b8a9343008504d4e3a87d212bc07b05212 upstream.

The nand_groups table uses different names for the NAND DQS pins than
the GROUP() definition in meson8b_cbus_groups (nand_dqs_0 vs nand_dqs0).
This prevents using the NAND DQS pins in the devicetree.

Fix this by ensuring that the GROUP() definition and the
meson8b_cbus_groups use the same name for these pins.

Fixes: 0fefcb6876d0 ("pinctrl: Add support for Meson8b")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/meson/pinctrl-meson8b.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/pinctrl/meson/pinctrl-meson8b.c
+++ b/drivers/pinctrl/meson/pinctrl-meson8b.c
@@ -739,8 +739,8 @@ static const char * const sdxc_c_groups[
 static const char * const nand_groups[] = {
 	"nand_io", "nand_io_ce0", "nand_io_ce1",
 	"nand_io_rb0", "nand_ale", "nand_cle",
-	"nand_wen_clk", "nand_ren_clk", "nand_dqs0",
-	"nand_dqs1"
+	"nand_wen_clk", "nand_ren_clk", "nand_dqs_0",
+	"nand_dqs_1"
 };
 
 static const char * const nor_groups[] = {

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 24/41] pinctrl: stm32: Fix bad function call
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 23/41] pinctrl: meson: meson8b: fix the NAND DQS pins Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 25/41] pinctrl: sunxi: Fix SPDIF function name for A83T Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Alexandre TORGUE,
	Linus Walleij

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Alexandre TORGUE <alexandre.torgue@st.com>

commit b7c747d4627462f25b3daabf49c18895a6722faa upstream.

In stm32_pconf_parse_conf function, stm32_pmx_gpio_set_direction is
called with wrong parameter value. Indeed, using NULL value for range
will raise an oops.

Fixes: aceb16dc2da5 ("pinctrl: Add STM32 MCUs support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/stm32/pinctrl-stm32.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pinctrl/stm32/pinctrl-stm32.c
+++ b/drivers/pinctrl/stm32/pinctrl-stm32.c
@@ -798,7 +798,7 @@ static int stm32_pconf_parse_conf(struct
 		break;
 	case PIN_CONFIG_OUTPUT:
 		__stm32_gpio_set(bank, offset, arg);
-		ret = stm32_pmx_gpio_set_direction(pctldev, NULL, pin, false);
+		ret = stm32_pmx_gpio_set_direction(pctldev, range, pin, false);
 		break;
 	default:
 		ret = -EINVAL;

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 25/41] pinctrl: sunxi: Fix SPDIF function name for A83T
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 24/41] pinctrl: stm32: Fix bad function call Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:10 ` [PATCH 4.9 26/41] pinctrl: cherryview: Add terminate entry for dmi_system_id tables Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chen-Yu Tsai, Maxime Ripard, Linus Walleij

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Chen-Yu Tsai <wens@csie.org>

commit 7903d4f5e1dec53963cba9b1bc472a76a3532e07 upstream.

We use well known standard names for functions that have name, such as
I2C, SPI, SPDIF, etc..

Fix the function name of SPDIF, which was named OWA (One Wire Audio)
based on Allwinner datasheets.

Fixes: 4730f33f0d82 ("pinctrl: sunxi: add allwinner A83T PIO controller
		      support")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c
@@ -394,7 +394,7 @@ static const struct sunxi_desc_pin sun8i
 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 18),
 		  SUNXI_FUNCTION(0x0, "gpio_in"),
 		  SUNXI_FUNCTION(0x1, "gpio_out"),
-		  SUNXI_FUNCTION(0x3, "owa")),		/* DOUT */
+		  SUNXI_FUNCTION(0x3, "spdif")),	/* DOUT */
 	SUNXI_PIN(SUNXI_PINCTRL_PIN(E, 19),
 		  SUNXI_FUNCTION(0x0, "gpio_in"),
 		  SUNXI_FUNCTION(0x1, "gpio_out")),

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 26/41] pinctrl: cherryview: Add terminate entry for dmi_system_id tables
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 25/41] pinctrl: sunxi: Fix SPDIF function name for A83T Greg Kroah-Hartman
@ 2017-07-10 17:10 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 28/41] pinctrl: sh-pfc: r8a7791: Add missing HSCIF1 pinmux data Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wei Yongjun, Mika Westerberg, Linus Walleij

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Wei Yongjun <weiyongjun1@huawei.com>

commit a9de080bbcd5c4e213a3d7bbb1e314d60980e943 upstream.

Make sure dmi_system_id tables are NULL terminated.

Fixes: 703650278372 ("pinctrl: cherryview: Add a quirk to make Acer
Chromebook keyboard work again")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/intel/pinctrl-cherryview.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1542,7 +1542,8 @@ static const struct dmi_system_id chv_no
 			DMI_MATCH(DMI_PRODUCT_NAME, "Edgar"),
 			DMI_MATCH(DMI_BIOS_DATE, "05/21/2016"),
 		},
-	}
+	},
+	{}
 };
 
 static int chv_gpio_probe(struct chv_pinctrl *pctrl, int irq)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 28/41] pinctrl: sh-pfc: r8a7791: Add missing HSCIF1 pinmux data
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2017-07-10 17:10 ` [PATCH 4.9 26/41] pinctrl: cherryview: Add terminate entry for dmi_system_id tables Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 29/41] pinctrl: sh-pfc: Update info pointer after SoC-specific init Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sergei Shtylyov, Geert Uytterhoeven

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

commit da7a692fbbab07f4e9798b5b52798f6e3256dd8f upstream.

The R8A7791 PFC driver  was apparently based on the preliminary revisions
of  the  user's manual, which  omitted the HSCIF1 group E signals in  the
IPSR4 register description. This would cause HSCIF1's probe  to fail with
the messages like below:

sh-pfc e6060000.pfc: cannot locate data/mark enum_id for mark 1989
sh-sci e62c8000.serial: Error applying setting, reverse things back
sh-sci: probe of e62c8000.serial failed with error -22

Add the neceassary PINMUX_IPSR_MSEL() invocations for the HSCK1_E,
HCTS1#_E, and HRTS1#_E signals...

Fixes: 508845196238 ("pinctrl: sh-pfc: r8a7791 PFC support")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/sh-pfc/pfc-r8a7791.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
@@ -1010,14 +1010,17 @@ static const u16 pinmux_data[] = {
 	PINMUX_IPSR_MSEL(IP4_12_10, SCL2, SEL_IIC2_0),
 	PINMUX_IPSR_MSEL(IP4_12_10, GPS_CLK_B, SEL_GPS_1),
 	PINMUX_IPSR_MSEL(IP4_12_10, GLO_Q0_D, SEL_GPS_3),
+	PINMUX_IPSR_MSEL(IP4_12_10, HSCK1_E, SEL_HSCIF1_4),
 	PINMUX_IPSR_GPSR(IP4_15_13, SSI_WS2),
 	PINMUX_IPSR_MSEL(IP4_15_13, SDA2, SEL_IIC2_0),
 	PINMUX_IPSR_MSEL(IP4_15_13, GPS_SIGN_B, SEL_GPS_1),
 	PINMUX_IPSR_MSEL(IP4_15_13, RX2_E, SEL_SCIF2_4),
 	PINMUX_IPSR_MSEL(IP4_15_13, GLO_Q1_D, SEL_GPS_3),
+	PINMUX_IPSR_MSEL(IP4_15_13, HCTS1_N_E, SEL_HSCIF1_4),
 	PINMUX_IPSR_GPSR(IP4_18_16, SSI_SDATA2),
 	PINMUX_IPSR_MSEL(IP4_18_16, GPS_MAG_B, SEL_GPS_1),
 	PINMUX_IPSR_MSEL(IP4_18_16, TX2_E, SEL_SCIF2_4),
+	PINMUX_IPSR_MSEL(IP4_18_16, HRTS1_N_E, SEL_HSCIF1_4),
 	PINMUX_IPSR_GPSR(IP4_19, SSI_SCK34),
 	PINMUX_IPSR_GPSR(IP4_20, SSI_WS34),
 	PINMUX_IPSR_GPSR(IP4_21, SSI_SDATA3),

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 29/41] pinctrl: sh-pfc: Update info pointer after SoC-specific init
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 28/41] pinctrl: sh-pfc: r8a7791: Add missing HSCIF1 pinmux data Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 32/41] xhci: Limit USB2 port wake support for AMD Promontory hosts Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Geert Uytterhoeven <geert+renesas@glider.be>

commit 3091ae775fae17084013021d01513bc1ad274e6a upstream.

Update the sh_pfc_soc_info pointer after calling the SoC-specific
initialization function, as it may have been updated to e.g. handle
different SoC revisions.  This makes sure the correct subdriver name is
printed later.

Fixes: 0c151062f32c9db8 ("sh-pfc: Add support for SoC-specific initialization")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/sh-pfc/core.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/pinctrl/sh-pfc/core.c
+++ b/drivers/pinctrl/sh-pfc/core.c
@@ -586,6 +586,9 @@ static int sh_pfc_probe(struct platform_
 		ret = info->ops->init(pfc);
 		if (ret < 0)
 			return ret;
+
+		/* .init() may have overridden pfc->info */
+		info = pfc->info;
 	}
 
 	/* Enable dummy states for those platforms without pinctrl support */

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 32/41] xhci: Limit USB2 port wake support for AMD Promontory hosts
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 29/41] pinctrl: sh-pfc: Update info pointer after SoC-specific init Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 33/41] gfs2: Fix glock rhashtable rcu bug Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tsai Nicholas, Jiahau Chang, Mathias Nyman

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Jiahau Chang <jiahau@gmail.com>

commit dec08194ffeccfa1cf085906b53d301930eae18f upstream.

For AMD Promontory xHCI host, although you can disable USB 2.0 ports in
BIOS settings, those ports will be enabled anyway after you remove a
device on that port and re-plug it in again. It's a known limitation of
the chip. As a workaround we can clear the PORT_WAKE_BITS.

This will disable wake on connect, disconnect and overcurrent on
AMD Promontory USB2 ports

[checkpatch cleanup and commit message reword -Mathias]
Cc: Tsai Nicholas <nicholas.tsai@amd.com>
Signed-off-by: Jiahau Chang <Lars_Chang@asmedia.com.tw>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/host/xhci-hub.c |    3 +++
 drivers/usb/host/xhci-pci.c |   12 ++++++++++++
 drivers/usb/host/xhci.h     |    1 +
 3 files changed, 16 insertions(+)

--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -1348,6 +1348,9 @@ int xhci_bus_suspend(struct usb_hcd *hcd
 				t2 |= PORT_WKOC_E | PORT_WKCONN_E;
 				t2 &= ~PORT_WKDISC_E;
 			}
+			if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) &&
+			    (hcd->speed < HCD_USB3))
+				t2 &= ~PORT_WAKE_BITS;
 		} else
 			t2 &= ~PORT_WAKE_BITS;
 
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -54,6 +54,11 @@
 #define PCI_DEVICE_ID_INTEL_APL_XHCI			0x5aa8
 #define PCI_DEVICE_ID_INTEL_DNV_XHCI			0x19d0
 
+#define PCI_DEVICE_ID_AMD_PROMONTORYA_4			0x43b9
+#define PCI_DEVICE_ID_AMD_PROMONTORYA_3			0x43ba
+#define PCI_DEVICE_ID_AMD_PROMONTORYA_2			0x43bb
+#define PCI_DEVICE_ID_AMD_PROMONTORYA_1			0x43bc
+
 static const char hcd_name[] = "xhci_hcd";
 
 static struct hc_driver __read_mostly xhci_pci_hc_driver;
@@ -135,6 +140,13 @@ static void xhci_pci_quirks(struct devic
 	if (pdev->vendor == PCI_VENDOR_ID_AMD)
 		xhci->quirks |= XHCI_TRUST_TX_LENGTH;
 
+	if ((pdev->vendor == PCI_VENDOR_ID_AMD) &&
+		((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) ||
+		(pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_3) ||
+		(pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_2) ||
+		(pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_1)))
+		xhci->quirks |= XHCI_U2_DISABLE_WAKE;
+
 	if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
 		xhci->quirks |= XHCI_LPM_SUPPORT;
 		xhci->quirks |= XHCI_INTEL_HOST;
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1660,6 +1660,7 @@ struct xhci_hcd {
 /* For controller with a broken Port Disable implementation */
 #define XHCI_BROKEN_PORT_PED	(1 << 25)
 #define XHCI_LIMIT_ENDPOINT_INTERVAL_7	(1 << 26)
+#define XHCI_U2_DISABLE_WAKE	(1 << 27)
 
 	unsigned int		num_active_eps;
 	unsigned int		limit_active_eps;

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 33/41] gfs2: Fix glock rhashtable rcu bug
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 32/41] xhci: Limit USB2 port wake support for AMD Promontory hosts Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 34/41] tpm: fix a kernel memory leak in tpm-sysfs.c Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andreas Gruenbacher, Bob Peterson

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Andreas Gruenbacher <agruenba@redhat.com>

commit 961ae1d83d055a4b9ebbfb4cc8ca62ec1a7a3b74 upstream.

Before commit 88ffbf3e03 "GFS2: Use resizable hash table for glocks",
glocks were freed via call_rcu to allow reading the glock hashtable
locklessly using rcu.  This was then changed to free glocks immediately,
which made reading the glock hashtable unsafe.  Bring back the original
code for freeing glocks via call_rcu.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/gfs2/glock.c  |   11 +++++++++--
 fs/gfs2/incore.h |    1 +
 2 files changed, 10 insertions(+), 2 deletions(-)

--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -80,9 +80,9 @@ static struct rhashtable_params ht_parms
 
 static struct rhashtable gl_hash_table;
 
-void gfs2_glock_free(struct gfs2_glock *gl)
+static void gfs2_glock_dealloc(struct rcu_head *rcu)
 {
-	struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
+	struct gfs2_glock *gl = container_of(rcu, struct gfs2_glock, gl_rcu);
 
 	if (gl->gl_ops->go_flags & GLOF_ASPACE) {
 		kmem_cache_free(gfs2_glock_aspace_cachep, gl);
@@ -90,6 +90,13 @@ void gfs2_glock_free(struct gfs2_glock *
 		kfree(gl->gl_lksb.sb_lvbptr);
 		kmem_cache_free(gfs2_glock_cachep, gl);
 	}
+}
+
+void gfs2_glock_free(struct gfs2_glock *gl)
+{
+	struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
+
+	call_rcu(&gl->gl_rcu, gfs2_glock_dealloc);
 	if (atomic_dec_and_test(&sdp->sd_glock_disposal))
 		wake_up(&sdp->sd_glock_wait);
 }
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -370,6 +370,7 @@ struct gfs2_glock {
 			loff_t end;
 		} gl_vm;
 	};
+	struct rcu_head gl_rcu;
 	struct rhash_head gl_node;
 };
 

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 34/41] tpm: fix a kernel memory leak in tpm-sysfs.c
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 33/41] gfs2: Fix glock rhashtable rcu bug Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 36/41] x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jason Gunthorpe, Stefan Berger,
	Jarkko Sakkinen, James Morris

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

commit 13b47cfcfc60495cde216eef4c01040d76174cbe upstream.

While cleaning up sysfs callback that prints EK we discovered a kernel
memory leak. This commit fixes the issue by zeroing the buffer used for
TPM command/response.

The leak happen when we use either tpm_vtpm_proxy, tpm_ibmvtpm or
xen-tpmfront.

Fixes: 0883743825e3 ("TPM: sysfs functions consolidation")
Reported-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/char/tpm/tpm-sysfs.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/char/tpm/tpm-sysfs.c
+++ b/drivers/char/tpm/tpm-sysfs.c
@@ -35,9 +35,10 @@ static ssize_t pubek_show(struct device
 	ssize_t err;
 	int i, rc;
 	char *str = buf;
-
 	struct tpm_chip *chip = to_tpm_chip(dev);
 
+	memset(&tpm_cmd, 0, sizeof(tpm_cmd));
+
 	tpm_cmd.header.in = tpm_readpubek_header;
 	err = tpm_transmit_cmd(chip, &tpm_cmd, READ_PUBEK_RESULT_SIZE, 0,
 			       "attempting to read the PUBEK");

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 36/41] x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 34/41] tpm: fix a kernel memory leak in tpm-sysfs.c Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 37/41] ath10k: override CE5 config for QCA9377 Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Paolo Abeni, Linus Torvalds,
	Alan Cox, Andy Lutomirski, Borislav Petkov, Brian Gerst,
	Denys Vlasenko, H. Peter Anvin, Hannes Frederic Sowa,
	Josh Poimboeuf, Kees Cook, Peter Zijlstra, Thomas Gleixner,
	Ingo Molnar, Mel Gorman

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Paolo Abeni <pabeni@redhat.com>

commit 236222d39347e0e486010f10c1493e83dbbdfba8 upstream.

According to the Intel datasheet, the REP MOVSB instruction
exposes a pretty heavy setup cost (50 ticks), which hurts
short string copy operations.

This change tries to avoid this cost by calling the explicit
loop available in the unrolled code for strings shorter
than 64 bytes.

The 64 bytes cutoff value is arbitrary from the code logic
point of view - it has been selected based on measurements,
as the largest value that still ensures a measurable gain.

Micro benchmarks of the __copy_from_user() function with
lengths in the [0-63] range show this performance gain
(shorter the string, larger the gain):

 - in the [55%-4%] range on Intel Xeon(R) CPU E5-2690 v4
 - in the [72%-9%] range on Intel Core i7-4810MQ

Other tested CPUs - namely Intel Atom S1260 and AMD Opteron
8216 - show no difference, because they do not expose the
ERMS feature bit.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/4533a1d101fd460f80e21329a34928fad521c1d4.1498744345.git.pabeni@redhat.com
[ Clarified the changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>

---
 arch/x86/lib/copy_user_64.S |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/arch/x86/lib/copy_user_64.S
+++ b/arch/x86/lib/copy_user_64.S
@@ -84,7 +84,7 @@ ENTRY(copy_user_generic_unrolled)
 	movl %edx,%ecx
 	andl $63,%edx
 	shrl $6,%ecx
-	jz 17f
+	jz .L_copy_short_string
 1:	movq (%rsi),%r8
 2:	movq 1*8(%rsi),%r9
 3:	movq 2*8(%rsi),%r10
@@ -105,7 +105,8 @@ ENTRY(copy_user_generic_unrolled)
 	leaq 64(%rdi),%rdi
 	decl %ecx
 	jnz 1b
-17:	movl %edx,%ecx
+.L_copy_short_string:
+	movl %edx,%ecx
 	andl $7,%edx
 	shrl $3,%ecx
 	jz 20f
@@ -221,6 +222,8 @@ EXPORT_SYMBOL(copy_user_generic_string)
  */
 ENTRY(copy_user_enhanced_fast_string)
 	ASM_STAC
+	cmpl $64,%edx
+	jb .L_copy_short_string	/* less then 64 bytes, avoid the costly 'rep' */
 	movl %edx,%ecx
 1:	rep
 	movsb

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 37/41] ath10k: override CE5 config for QCA9377
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 36/41] x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 38/41] KEYS: Fix an error code in request_master_key() Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Bartosz Markowski, Kalle Valo

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Bartosz Markowski <bartosz.markowski@tieto.com>

commit b08b5b53a1ed2bd7a883f8fd29232c8f03604671 upstream.

Similarly to QCA6174, QCA9377 requires the CE5 configuration to be
available for other feature. Use the ath10k_pci_override_ce_config()
for it as well.

This is required for TF2.0 firmware. Previous FW revisions were
working fine without this patch.

Fixes: a70587b3389a ("ath10k: configure copy engine 5 for HTT messages")
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/ath/ath10k/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -3133,7 +3133,7 @@ int ath10k_pci_setup_resource(struct ath
 	setup_timer(&ar_pci->rx_post_retry, ath10k_pci_rx_replenish_retry,
 		    (unsigned long)ar);
 
-	if (QCA_REV_6174(ar))
+	if (QCA_REV_6174(ar) || QCA_REV_9377(ar))
 		ath10k_pci_override_ce_config(ar);
 
 	ret = ath10k_pci_alloc_pipes(ar);

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 38/41] KEYS: Fix an error code in request_master_key()
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 37/41] ath10k: override CE5 config for QCA9377 Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 39/41] crypto: drbg - Fixes panic in wait_for_completion call Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Mimi Zohar, James Morris

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Dan Carpenter <dan.carpenter@oracle.com>

commit 57cb17e764ba0aaa169d07796acce54ccfbc6cae upstream.

This function has two callers and neither are able to handle a NULL
return.  Really, -EINVAL is the correct thing return here anyway.  This
fixes some static checker warnings like:

	security/keys/encrypted-keys/encrypted.c:709 encrypted_key_decrypt()
	error: uninitialized symbol 'master_key'.

Fixes: 7e70cb497850 ("keys: add new key-type encrypted")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 security/keys/encrypted-keys/encrypted.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/security/keys/encrypted-keys/encrypted.c
+++ b/security/keys/encrypted-keys/encrypted.c
@@ -437,7 +437,7 @@ static struct skcipher_request *init_skc
 static struct key *request_master_key(struct encrypted_key_payload *epayload,
 				      const u8 **master_key, size_t *master_keylen)
 {
-	struct key *mkey = NULL;
+	struct key *mkey = ERR_PTR(-EINVAL);
 
 	if (!strncmp(epayload->master_desc, KEY_TRUSTED_PREFIX,
 		     KEY_TRUSTED_PREFIX_LEN)) {

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 39/41] crypto: drbg - Fixes panic in wait_for_completion call
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 38/41] KEYS: Fix an error code in request_master_key() Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 40/41] RDMA/uverbs: Check port number supplied by user verbs cmds Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Harsh Jain, Stephan Mueller, Herbert Xu

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Stephan Mueller <smueller@chronox.de>

commit b61929c654f2e725644935737c4c1ea9c741e2f8 upstream.

Initialise ctr_completion variable before use.

Cc: <stable@vger.kernel.org>
Signed-off-by: Harsh Jain <harshjain.prof@gmail.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/drbg.c |    1 +
 1 file changed, 1 insertion(+)

--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -1691,6 +1691,7 @@ static int drbg_init_sym_kernel(struct d
 		return PTR_ERR(sk_tfm);
 	}
 	drbg->ctr_handle = sk_tfm;
+	init_completion(&drbg->ctr_completion);
 
 	req = skcipher_request_alloc(sk_tfm, GFP_KERNEL);
 	if (!req) {

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 40/41] RDMA/uverbs: Check port number supplied by user verbs cmds
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 39/41] crypto: drbg - Fixes panic in wait_for_completion call Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 17:11 ` [PATCH 4.9 41/41] rt286: add Thinkpad Helix 2 to force_combo_jack_table Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yevgeny Kliteynik, Tziporet Koren,
	Alex Polak, Boris Pismenny, Leon Romanovsky, Doug Ledford

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Boris Pismenny <borisp@mellanox.com>

commit 5ecce4c9b17bed4dc9cb58bfb10447307569b77b upstream.

The ib_uverbs_create_ah() ind ib_uverbs_modify_qp() calls receive
the port number from user input as part of its attributes and assumes
it is valid. Down on the stack, that parameter is used to access kernel
data structures.  If the value is invalid, the kernel accesses memory
it should not.  To prevent this, verify the port number before using it.

BUG: KASAN: use-after-free in ib_uverbs_create_ah+0x6d5/0x7b0
Read of size 4 at addr ffff880018d67ab8 by task syz-executor/313

BUG: KASAN: slab-out-of-bounds in modify_qp.isra.4+0x19d0/0x1ef0
Read of size 4 at addr ffff88006c40ec58 by task syz-executor/819

Fixes: 67cdb40ca444 ("[IB] uverbs: Implement more commands")
Cc: Yevgeny Kliteynik <kliteyn@mellanox.com>
Cc: Tziporet Koren <tziporet@mellanox.com>
Cc: Alex Polak <alexpo@mellanox.com>
Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

Modified from upstream commit: helper function rdma_is_port_valid does not
exist in these kernel versions, so use manual comparisons instead.

 drivers/infiniband/core/uverbs_cmd.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -2342,6 +2342,10 @@ ssize_t ib_uverbs_modify_qp(struct ib_uv
 	if (copy_from_user(&cmd, buf, sizeof cmd))
 		return -EFAULT;
 
+	if (cmd.port_num < rdma_start_port(ib_dev) ||
+	    cmd.port_num > rdma_end_port(ib_dev))
+		return -EINVAL;
+
 	INIT_UDATA(&udata, buf + sizeof cmd, NULL, in_len - sizeof cmd,
 		   out_len);
 
@@ -2882,6 +2886,10 @@ ssize_t ib_uverbs_create_ah(struct ib_uv
 	if (copy_from_user(&cmd, buf, sizeof cmd))
 		return -EFAULT;
 
+	if (cmd.attr.port_num < rdma_start_port(ib_dev) ||
+	    cmd.attr.port_num > rdma_end_port(ib_dev))
+		return -EINVAL;
+
 	uobj = kmalloc(sizeof *uobj, GFP_KERNEL);
 	if (!uobj)
 		return -ENOMEM;

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 4.9 41/41] rt286: add Thinkpad Helix 2 to force_combo_jack_table
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 40/41] RDMA/uverbs: Check port number supplied by user verbs cmds Greg Kroah-Hartman
@ 2017-07-10 17:11 ` Greg Kroah-Hartman
  2017-07-10 22:31 ` [PATCH 4.9 00/41] 4.9.37-stable review Krister Johansen
                   ` (2 subsequent siblings)
  38 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-10 17:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Yifeng Li, Mark Brown

4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: Yifeng Li <tomli@tomli.me>

commit fe0dfd6358a17c79bd7d6996af7512ba452a7059 upstream.

Thinkpad Helix 2 is a tablet PC, the audio is powered by Core M
broadwell-audio and rt286 codec. For all versions of Linux kernel,
the stereo output doesn't work properly when earphones are plugged
in, the sound was coming out from both channels even if the audio
contains only the left or right channel. Furthermore, if a music
recorded in stereo is played, the two channels cancle out each other
out, as a result, no voice but only distorted background music can be
heard, like a sound card with builtin a Karaoke sount effect.

Apparently this tablet uses a combo jack with polarity incorrectly
set by rt286 driver. This patch adds DMI information of Thinkpad Helix 2
to force_combo_jack_table[] and the issue is resolved. The microphone
input doesn't work regardless to the presence of this patch and still
needs help from other developers to investigate.

This is my first patch to LKML directly, sorry for CC-ing too many
people here.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=93841
Signed-off-by: Yifeng Li <tomli@tomli.me>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/soc/codecs/rt286.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -1108,6 +1108,13 @@ static const struct dmi_system_id force_
 			DMI_MATCH(DMI_PRODUCT_NAME, "Kabylake Client platform")
 		}
 	},
+	{
+		.ident = "Thinkpad Helix 2nd",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Helix 2nd")
+		}
+	},
 
 	{ }
 };

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 4.9 00/41] 4.9.37-stable review
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2017-07-10 17:11 ` [PATCH 4.9 41/41] rt286: add Thinkpad Helix 2 to force_combo_jack_table Greg Kroah-Hartman
@ 2017-07-10 22:31 ` Krister Johansen
  2017-07-11  9:53   ` Greg Kroah-Hartman
  2017-07-11  0:45 ` Guenter Roeck
  2017-07-11  9:54 ` Sumit Semwal
  38 siblings, 1 reply; 42+ messages in thread
From: Krister Johansen @ 2017-07-10 22:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

Hey Greg,

On Mon, Jul 10, 2017 at 07:10:33PM +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.9.37 release.
> There are 41 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 Wed Jul 12 17:10:36 UTC 2017.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.37-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.9.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h


In 4.9.36 there were some patches to tools/perf that got pulled in that
break that part of build.  It looks like a couple of dependent patches
were omitted.  I don't see these patches included in 4.9.37.  Is it
possible to get those included so that tools/perf builds again?

Here's a link to the prior thread:

https://lkml.org/lkml/2017/7/5/537

Thanks,

-K

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 4.9 00/41] 4.9.37-stable review
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2017-07-10 22:31 ` [PATCH 4.9 00/41] 4.9.37-stable review Krister Johansen
@ 2017-07-11  0:45 ` Guenter Roeck
  2017-07-11  9:54 ` Sumit Semwal
  38 siblings, 0 replies; 42+ messages in thread
From: Guenter Roeck @ 2017-07-11  0:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, shuahkh, patches, ben.hutchings, stable

On 07/10/2017 10:10 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.9.37 release.
> There are 41 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 Wed Jul 12 17:10:36 UTC 2017.
> Anything received after that time might be too late.
> 

Build results:
	total: 145 pass: 145 fail: 0
Qemu test results:
	total: 122 pass: 122 fail: 0

Details are available at http://kerneltests.org/builders.

Guenter

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 4.9 00/41] 4.9.37-stable review
  2017-07-10 22:31 ` [PATCH 4.9 00/41] 4.9.37-stable review Krister Johansen
@ 2017-07-11  9:53   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-11  9:53 UTC (permalink / raw)
  To: Krister Johansen
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

On Mon, Jul 10, 2017 at 03:31:08PM -0700, Krister Johansen wrote:
> Hey Greg,
> 
> On Mon, Jul 10, 2017 at 07:10:33PM +0200, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.9.37 release.
> > There are 41 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 Wed Jul 12 17:10:36 UTC 2017.
> > Anything received after that time might be too late.
> > 
> > The whole patch series can be found in one patch at:
> > 	kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.37-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.9.y
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> 
> 
> In 4.9.36 there were some patches to tools/perf that got pulled in that
> break that part of build.  It looks like a couple of dependent patches
> were omitted.  I don't see these patches included in 4.9.37.  Is it
> possible to get those included so that tools/perf builds again?
> 
> Here's a link to the prior thread:
> 
> https://lkml.org/lkml/2017/7/5/537

I was hoping that you would get a response from the perf developers,
which is why I didn't queue those patches up.  I'll do so for the next
release after this one if I don't hear otherwise.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 4.9 00/41] 4.9.37-stable review
  2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2017-07-11  0:45 ` Guenter Roeck
@ 2017-07-11  9:54 ` Sumit Semwal
  2017-07-11 10:37   ` Greg Kroah-Hartman
  38 siblings, 1 reply; 42+ messages in thread
From: Sumit Semwal @ 2017-07-11  9:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: LKML, Linus Torvalds, Andrew Morton, Guenter Roeck, Shuah Khan,
	patches, Ben Hutchings, # 3.4.x

Hi Greg,


On 10 July 2017 at 22:40, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> This is the start of the stable review cycle for the 4.9.37 release.
> There are 41 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 Wed Jul 12 17:10:36 UTC 2017.
> Anything received after that time might be too late.
>

Built and boot tested for arm64 defconfig on Hikey. No regressions noted.

> The whole patch series can be found in one patch at:
>         kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.37-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.9.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>

Best,
Sumit.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 4.9 00/41] 4.9.37-stable review
  2017-07-11  9:54 ` Sumit Semwal
@ 2017-07-11 10:37   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 42+ messages in thread
From: Greg Kroah-Hartman @ 2017-07-11 10:37 UTC (permalink / raw)
  To: Sumit Semwal
  Cc: LKML, Linus Torvalds, Andrew Morton, Guenter Roeck, Shuah Khan,
	patches, Ben Hutchings, # 3.4.x

On Tue, Jul 11, 2017 at 03:24:03PM +0530, Sumit Semwal wrote:
> Hi Greg,
> 
> 
> On 10 July 2017 at 22:40, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > This is the start of the stable review cycle for the 4.9.37 release.
> > There are 41 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 Wed Jul 12 17:10:36 UTC 2017.
> > Anything received after that time might be too late.
> >
> 
> Built and boot tested for arm64 defconfig on Hikey. No regressions noted.

Great, thanks for testing and letting me know.

greg k-h

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2017-07-11 10:37 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 17:10 [PATCH 4.9 00/41] 4.9.37-stable review Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 01/41] fs: add a VALID_OPEN_FLAGS Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 02/41] fs: completely ignore unknown open flags Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 03/41] driver core: platform: fix race condition with driver_override Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 04/41] ceph: choose readdir frag based on previous readdir reply Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 05/41] tracing/kprobes: Allow to create probe with a module name starting with a digit Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 06/41] [media] media: entity: Fix stream count check Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 08/41] usb: dwc3: replace %p with %pK Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 09/41] USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 10/41] Add USB quirk for HVR-950q to avoid intermittent device resets Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 11/41] usb: usbip: set buffer pointers to NULL after free Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 12/41] usb: Fix typo in the definition of Endpoint[out]Request Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 13/41] USB: core: fix device node leak Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 14/41] mac80211_hwsim: Replace bogus hrtimer clockid Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 15/41] sysctl: dont print negative flag for proc_douintvec Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 16/41] sysctl: report EINVAL if value is larger than UINT_MAX " Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 17/41] pinctrl: qcom: ipq4019: add missing pingroups for pins > 70 Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 18/41] pinctrl: cherryview: Add a quirk to make Acer Chromebook keyboard work again Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 19/41] pinctrl: sh-pfc: r8a7794: Swap ATA signals Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 20/41] pinctrl: sh-pfc: r8a7791: Fix SCIF2 pinmux data Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 21/41] pinctrl: sh-pfc: r8a7791: Add missing DVC_MUTE signal Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 22/41] pinctrl: sh-pfc: r8a7795: Fix hscif2_clk_b and hscif4_ctrl Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 23/41] pinctrl: meson: meson8b: fix the NAND DQS pins Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 24/41] pinctrl: stm32: Fix bad function call Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 25/41] pinctrl: sunxi: Fix SPDIF function name for A83T Greg Kroah-Hartman
2017-07-10 17:10 ` [PATCH 4.9 26/41] pinctrl: cherryview: Add terminate entry for dmi_system_id tables Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 28/41] pinctrl: sh-pfc: r8a7791: Add missing HSCIF1 pinmux data Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 29/41] pinctrl: sh-pfc: Update info pointer after SoC-specific init Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 32/41] xhci: Limit USB2 port wake support for AMD Promontory hosts Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 33/41] gfs2: Fix glock rhashtable rcu bug Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 34/41] tpm: fix a kernel memory leak in tpm-sysfs.c Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 36/41] x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 37/41] ath10k: override CE5 config for QCA9377 Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 38/41] KEYS: Fix an error code in request_master_key() Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 39/41] crypto: drbg - Fixes panic in wait_for_completion call Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 40/41] RDMA/uverbs: Check port number supplied by user verbs cmds Greg Kroah-Hartman
2017-07-10 17:11 ` [PATCH 4.9 41/41] rt286: add Thinkpad Helix 2 to force_combo_jack_table Greg Kroah-Hartman
2017-07-10 22:31 ` [PATCH 4.9 00/41] 4.9.37-stable review Krister Johansen
2017-07-11  9:53   ` Greg Kroah-Hartman
2017-07-11  0:45 ` Guenter Roeck
2017-07-11  9:54 ` Sumit Semwal
2017-07-11 10:37   ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).