All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree
@ 2020-04-03 12:18 Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 01/13] clk: qcom: rcg: Return failure for RCG update Lee Jones
                   ` (13 more replies)
  0 siblings, 14 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Lee Jones

A recent review of the Sony Xperia Development kernel tree [0] resulted
in the discovery of various patches which have been backported from
Mainline in order to fix an array of issues.  These patches should be
applied to Stable such that everyone can benefit from them.

Note: The review is still on-going (~50%) - more to follow.

[0] https://github.com/sonyxperiadev/kernel

Alexander Shishkin (1):
  perf/core: Reattach a misplaced comment

Alexei Avshalom Lazar (1):
  wil6210: add general initialization/size checks

Arun KS (1):
  arm64: Fix size of __early_cpu_boot_status

Austin Kim (1):
  mm/vmalloc.c: move 'area->pages' after if statement

Chris Lew (1):
  rpmsg: glink: Remove chunk size word align warning

Dedy Lansky (2):
  wil6210: check rx_buff_mgmt before accessing it
  wil6210: make sure Rx ring sizes are correlated

Hans Verkuil (1):
  drm_dp_mst_topology: fix broken
    drm_dp_sideband_parse_remote_dpcd_read()

Karthick Gopalasubramanian (1):
  wil6210: remove reset file from debugfs

Maya Erez (1):
  wil6210: ignore HALP ICR if already handled

Rob Clark (1):
  drm/msm: stop abusing dma_map/unmap for cache

Roger Quadros (1):
  usb: dwc3: don't set gadget->is_otg flag

Taniya Das (1):
  clk: qcom: rcg: Return failure for RCG update

 arch/arm64/kernel/head.S                     |  2 +-
 drivers/clk/qcom/clk-rcg2.c                  |  2 +-
 drivers/gpu/drm/drm_dp_mst_topology.c        |  1 +
 drivers/gpu/drm/msm/msm_gem.c                |  4 +--
 drivers/net/wireless/ath/wil6210/debugfs.c   | 29 ++------------------
 drivers/net/wireless/ath/wil6210/interrupt.c | 12 +++++---
 drivers/net/wireless/ath/wil6210/main.c      |  5 +++-
 drivers/net/wireless/ath/wil6210/txrx.c      |  4 +--
 drivers/net/wireless/ath/wil6210/txrx_edma.c | 14 ++++++++--
 drivers/net/wireless/ath/wil6210/wil6210.h   |  3 +-
 drivers/net/wireless/ath/wil6210/wmi.c       |  2 +-
 drivers/rpmsg/qcom_glink_native.c            |  3 --
 drivers/usb/dwc3/gadget.c                    |  1 -
 kernel/events/core.c                         |  7 ++---
 mm/vmalloc.c                                 |  8 ++++--
 15 files changed, 43 insertions(+), 54 deletions(-)

-- 
2.25.1


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

* [PATCH 4.19 01/13] clk: qcom: rcg: Return failure for RCG update
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 02/13] drm/msm: stop abusing dma_map/unmap for cache Lee Jones
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Taniya Das, Stephen Boyd, Lee Jones

From: Taniya Das <tdas@codeaurora.org>

[ Upstream commit 21ea4b62e1f3dc258001a68da98c9663a9dbd6c7 ]

In case of update config failure, return -EBUSY, so that consumers could
handle the failure gracefully.

Signed-off-by: Taniya Das <tdas@codeaurora.org>
Link: https://lkml.kernel.org/r/1557339895-21952-2-git-send-email-tdas@codeaurora.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/clk/qcom/clk-rcg2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c
index ee693e15d9ebc..f420f0c968775 100644
--- a/drivers/clk/qcom/clk-rcg2.c
+++ b/drivers/clk/qcom/clk-rcg2.c
@@ -105,7 +105,7 @@ static int update_config(struct clk_rcg2 *rcg)
 	}
 
 	WARN(1, "%s: rcg didn't update its configuration.", name);
-	return 0;
+	return -EBUSY;
 }
 
 static int clk_rcg2_set_parent(struct clk_hw *hw, u8 index)
-- 
2.25.1


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

* [PATCH 4.19 02/13] drm/msm: stop abusing dma_map/unmap for cache
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 01/13] clk: qcom: rcg: Return failure for RCG update Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 03/13] arm64: Fix size of __early_cpu_boot_status Lee Jones
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable
  Cc: Rob Clark, Stephen Boyd, Stephen Boyd, Jordan Crouse, Sean Paul,
	Lee Jones

From: Rob Clark <robdclark@chromium.org>

[ Upstream commit 0036bc73ccbe7e600a3468bf8e8879b122252274 ]

Recently splats like this started showing up:

   WARNING: CPU: 4 PID: 251 at drivers/iommu/dma-iommu.c:451 __iommu_dma_unmap+0xb8/0xc0
   Modules linked in: ath10k_snoc ath10k_core fuse msm ath mac80211 uvcvideo cfg80211 videobuf2_vmalloc videobuf2_memops vide
   CPU: 4 PID: 251 Comm: kworker/u16:4 Tainted: G        W         5.2.0-rc5-next-20190619+ #2317
   Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN23WW(V1.06) 10/25/2018
   Workqueue: msm msm_gem_free_work [msm]
   pstate: 80c00005 (Nzcv daif +PAN +UAO)
   pc : __iommu_dma_unmap+0xb8/0xc0
   lr : __iommu_dma_unmap+0x54/0xc0
   sp : ffff0000119abce0
   x29: ffff0000119abce0 x28: 0000000000000000
   x27: ffff8001f9946648 x26: ffff8001ec271068
   x25: 0000000000000000 x24: ffff8001ea3580a8
   x23: ffff8001f95ba010 x22: ffff80018e83ba88
   x21: ffff8001e548f000 x20: fffffffffffff000
   x19: 0000000000001000 x18: 00000000c00001fe
   x17: 0000000000000000 x16: 0000000000000000
   x15: ffff000015b70068 x14: 0000000000000005
   x13: 0003142cc1be1768 x12: 0000000000000001
   x11: ffff8001f6de9100 x10: 0000000000000009
   x9 : ffff000015b78000 x8 : 0000000000000000
   x7 : 0000000000000001 x6 : fffffffffffff000
   x5 : 0000000000000fff x4 : ffff00001065dbc8
   x3 : 000000000000000d x2 : 0000000000001000
   x1 : fffffffffffff000 x0 : 0000000000000000
   Call trace:
    __iommu_dma_unmap+0xb8/0xc0
    iommu_dma_unmap_sg+0x98/0xb8
    put_pages+0x5c/0xf0 [msm]
    msm_gem_free_work+0x10c/0x150 [msm]
    process_one_work+0x1e0/0x330
    worker_thread+0x40/0x438
    kthread+0x12c/0x130
    ret_from_fork+0x10/0x18
   ---[ end trace afc0dc5ab81a06bf ]---

Not quite sure what triggered that, but we really shouldn't be abusing
dma_{map,unmap}_sg() for cache maint.

Cc: Stephen Boyd <sboyd@kernel.org>
Tested-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190630124735.27786-1-robdclark@gmail.com
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/msm/msm_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index f59ca27a4a357..93b20ad23c23f 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -108,7 +108,7 @@ static struct page **get_pages(struct drm_gem_object *obj)
 		 * because display controller, GPU, etc. are not coherent:
 		 */
 		if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
-			dma_map_sg(dev->dev, msm_obj->sgt->sgl,
+			dma_sync_sg_for_device(dev->dev, msm_obj->sgt->sgl,
 					msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
 	}
 
@@ -138,7 +138,7 @@ static void put_pages(struct drm_gem_object *obj)
 			 * GPU, etc. are not coherent:
 			 */
 			if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
-				dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
+				dma_sync_sg_for_cpu(obj->dev->dev, msm_obj->sgt->sgl,
 					     msm_obj->sgt->nents,
 					     DMA_BIDIRECTIONAL);
 
-- 
2.25.1


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

* [PATCH 4.19 03/13] arm64: Fix size of __early_cpu_boot_status
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 01/13] clk: qcom: rcg: Return failure for RCG update Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 02/13] drm/msm: stop abusing dma_map/unmap for cache Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 04/13] drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read() Lee Jones
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Arun KS, Mark Rutland, Will Deacon, Lee Jones

From: Arun KS <arunks@codeaurora.org>

[ Upstream commit 61cf61d81e326163ce1557ceccfca76e11d0e57c ]

__early_cpu_boot_status is of type long. Use quad
assembler directive to allocate proper size.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Arun KS <arunks@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 arch/arm64/kernel/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 06058fba5f86c..d22ab8d9edc95 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -667,7 +667,7 @@ ENTRY(__boot_cpu_mode)
  * with MMU turned off.
  */
 ENTRY(__early_cpu_boot_status)
-	.long 	0
+	.quad 	0
 
 	.popsection
 
-- 
2.25.1


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

* [PATCH 4.19 04/13] drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (2 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 03/13] arm64: Fix size of __early_cpu_boot_status Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 05/13] wil6210: check rx_buff_mgmt before accessing it Lee Jones
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Hans Verkuil, Lyude Paul, Alex Deucher, Lee Jones

From: Hans Verkuil <hans.verkuil@cisco.com>

[ Upstream commit a4c30a4861c54af78c4eb8b7855524c1a96d9f80 ]

When parsing the reply of a DP_REMOTE_DPCD_READ DPCD command the
result is wrong due to a missing idx increment.

This was never noticed since DP_REMOTE_DPCD_READ is currently not
used, but if you enable it, then it is all wrong.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e72ddac2-1dc0-100a-d816-9ac98ac009dd@xs4all.nl
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index bf4eed5f6a7ee..a7c7f522fe1c4 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -439,6 +439,7 @@ static bool drm_dp_sideband_parse_remote_dpcd_read(struct drm_dp_sideband_msg_rx
 	if (idx > raw->curlen)
 		goto fail_len;
 	repmsg->u.remote_dpcd_read_ack.num_bytes = raw->msg[idx];
+	idx++;
 	if (idx > raw->curlen)
 		goto fail_len;
 
-- 
2.25.1


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

* [PATCH 4.19 05/13] wil6210: check rx_buff_mgmt before accessing it
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (3 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 04/13] drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read() Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 06/13] wil6210: ignore HALP ICR if already handled Lee Jones
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Dedy Lansky, Maya Erez, Kalle Valo, Lee Jones

From: Dedy Lansky <dlansky@codeaurora.org>

[ Upstream commit d6a553c0c61b0b0219764e4d4fc14e385085f374 ]

Make sure rx_buff_mgmt is initialized before accessing it.

Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/wil6210/txrx_edma.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c
index 5fa8d6ad66482..03d0e6c550b98 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.c
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c
@@ -268,6 +268,9 @@ static void wil_move_all_rx_buff_to_free_list(struct wil6210_priv *wil,
 	struct list_head *active = &wil->rx_buff_mgmt.active;
 	dma_addr_t pa;
 
+	if (!wil->rx_buff_mgmt.buff_arr)
+		return;
+
 	while (!list_empty(active)) {
 		struct wil_rx_buff *rx_buff =
 			list_first_entry(active, struct wil_rx_buff, list);
-- 
2.25.1


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

* [PATCH 4.19 06/13] wil6210: ignore HALP ICR if already handled
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (4 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 05/13] wil6210: check rx_buff_mgmt before accessing it Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 07/13] wil6210: add general initialization/size checks Lee Jones
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Maya Erez, Kalle Valo, Lee Jones

From: Maya Erez <merez@codeaurora.org>

[ Upstream commit 979c9d8d01c482b1befb44dc639ecb907b5a37bd ]

HALP ICR is set as long as the FW should stay awake.
To prevent its multiple handling the driver masks this IRQ bit.
However, if there is a different MISC ICR before the driver clears
this bit, there is a risk of race condition between HALP mask and
unmask. This race leads to HALP timeout, in case it is mistakenly
masked.
Add an atomic flag to indicate if HALP ICR should be handled.

Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/wil6210/interrupt.c | 12 ++++++++----
 drivers/net/wireless/ath/wil6210/main.c      |  3 +++
 drivers/net/wireless/ath/wil6210/wil6210.h   |  1 +
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/interrupt.c b/drivers/net/wireless/ath/wil6210/interrupt.c
index 0655cd8845142..d161dc930313d 100644
--- a/drivers/net/wireless/ath/wil6210/interrupt.c
+++ b/drivers/net/wireless/ath/wil6210/interrupt.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -590,10 +590,14 @@ static irqreturn_t wil6210_irq_misc(int irq, void *cookie)
 	}
 
 	if (isr & BIT_DMA_EP_MISC_ICR_HALP) {
-		wil_dbg_irq(wil, "irq_misc: HALP IRQ invoked\n");
-		wil6210_mask_halp(wil);
 		isr &= ~BIT_DMA_EP_MISC_ICR_HALP;
-		complete(&wil->halp.comp);
+		if (wil->halp.handle_icr) {
+			/* no need to handle HALP ICRs until next vote */
+			wil->halp.handle_icr = false;
+			wil_dbg_irq(wil, "irq_misc: HALP IRQ invoked\n");
+			wil6210_mask_halp(wil);
+			complete(&wil->halp.comp);
+		}
 	}
 
 	wil->isr_misc = isr;
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 10673fa9388ec..28d2bfd0fde79 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -1814,11 +1814,14 @@ void wil_halp_vote(struct wil6210_priv *wil)
 
 	if (++wil->halp.ref_cnt == 1) {
 		reinit_completion(&wil->halp.comp);
+		/* mark to IRQ context to handle HALP ICR */
+		wil->halp.handle_icr = true;
 		wil6210_set_halp(wil);
 		rc = wait_for_completion_timeout(&wil->halp.comp, to_jiffies);
 		if (!rc) {
 			wil_err(wil, "HALP vote timed out\n");
 			/* Mask HALP as done in case the interrupt is raised */
+			wil->halp.handle_icr = false;
 			wil6210_mask_halp(wil);
 		} else {
 			wil_dbg_irq(wil,
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 75fe1a3b70466..6a05f59ee58e9 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -778,6 +778,7 @@ struct wil_halp {
 	struct mutex		lock; /* protect halp ref_cnt */
 	unsigned int		ref_cnt;
 	struct completion	comp;
+	u8			handle_icr;
 };
 
 struct wil_blob_wrapper {
-- 
2.25.1


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

* [PATCH 4.19 07/13] wil6210: add general initialization/size checks
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (5 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 06/13] wil6210: ignore HALP ICR if already handled Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 08/13] wil6210: make sure Rx ring sizes are correlated Lee Jones
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Alexei Avshalom Lazar, Maya Erez, Kalle Valo, Lee Jones

From: Alexei Avshalom Lazar <ailizaro@codeaurora.org>

[ Upstream commit ac0e541ab2f2951845acee784ef487be40fb4c77 ]

Initialize unset variable, and verify that mid is valid.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/wil6210/debugfs.c | 2 ++
 drivers/net/wireless/ath/wil6210/wmi.c     | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index 44296c0159252..acd95ca0430b9 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -991,6 +991,8 @@ static ssize_t wil_write_file_txmgmt(struct file *file, const char __user *buf,
 	int rc;
 	void *frame;
 
+	memset(&params, 0, sizeof(params));
+
 	if (!len)
 		return -EINVAL;
 
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index 8a603432f5317..3928b13ae0266 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -2802,7 +2802,7 @@ static void wmi_event_handle(struct wil6210_priv *wil,
 
 		if (mid == MID_BROADCAST)
 			mid = 0;
-		if (mid >= wil->max_vifs) {
+		if (mid >= ARRAY_SIZE(wil->vifs) || mid >= wil->max_vifs) {
 			wil_dbg_wmi(wil, "invalid mid %d, event skipped\n",
 				    mid);
 			return;
-- 
2.25.1


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

* [PATCH 4.19 08/13] wil6210: make sure Rx ring sizes are correlated
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (6 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 07/13] wil6210: add general initialization/size checks Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 09/13] rpmsg: glink: Remove chunk size word align warning Lee Jones
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Dedy Lansky, Maya Erez, Kalle Valo, Lee Jones

From: Dedy Lansky <dlansky@codeaurora.org>

[ Upstream commit 61e5ec044748486f06dec760a19dce78247b3ad8 ]

When enlarging rx_ring_order module param, wil6210 fails to load
because there are not enough Rx buffers.
Fix this by enlarging number of Rx buffers at startup, if needed based
on rx_ring_order.

Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/wil6210/main.c      |  2 +-
 drivers/net/wireless/ath/wil6210/txrx.c      |  4 ++--
 drivers/net/wireless/ath/wil6210/txrx_edma.c | 11 ++++++++---
 drivers/net/wireless/ath/wil6210/wil6210.h   |  2 +-
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 28d2bfd0fde79..fe91db3478dc8 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -1687,7 +1687,7 @@ int __wil_up(struct wil6210_priv *wil)
 		return rc;
 
 	/* Rx RING. After MAC and beacon */
-	rc = wil->txrx_ops.rx_init(wil, 1 << rx_ring_order);
+	rc = wil->txrx_ops.rx_init(wil, rx_ring_order);
 	if (rc)
 		return rc;
 
diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c
index 73cdf54521f9b..236dcb6f5e84d 100644
--- a/drivers/net/wireless/ath/wil6210/txrx.c
+++ b/drivers/net/wireless/ath/wil6210/txrx.c
@@ -881,7 +881,7 @@ static void wil_rx_buf_len_init(struct wil6210_priv *wil)
 	}
 }
 
-static int wil_rx_init(struct wil6210_priv *wil, u16 size)
+static int wil_rx_init(struct wil6210_priv *wil, uint order)
 {
 	struct wil_ring *vring = &wil->ring_rx;
 	int rc;
@@ -895,7 +895,7 @@ static int wil_rx_init(struct wil6210_priv *wil, u16 size)
 
 	wil_rx_buf_len_init(wil);
 
-	vring->size = size;
+	vring->size = 1 << order;
 	vring->is_rx = true;
 	rc = wil_vring_alloc(wil, vring);
 	if (rc)
diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c
index 03d0e6c550b98..fe666a3583c10 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.c
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c
@@ -593,9 +593,9 @@ static void wil_rx_buf_len_init_edma(struct wil6210_priv *wil)
 		WIL_MAX_ETH_MTU : WIL_EDMA_RX_BUF_LEN_DEFAULT;
 }
 
-static int wil_rx_init_edma(struct wil6210_priv *wil, u16 desc_ring_size)
+static int wil_rx_init_edma(struct wil6210_priv *wil, uint desc_ring_order)
 {
-	u16 status_ring_size;
+	u16 status_ring_size, desc_ring_size = 1 << desc_ring_order;
 	struct wil_ring *ring = &wil->ring_rx;
 	int rc;
 	size_t elem_size = wil->use_compressed_rx_status ?
@@ -610,7 +610,12 @@ static int wil_rx_init_edma(struct wil6210_priv *wil, u16 desc_ring_size)
 			"compressed RX status cannot be used with SW reorder\n");
 		return -EINVAL;
 	}
-
+	if (wil->rx_status_ring_order <= desc_ring_order)
+		/* make sure sring is larger than desc ring */
+		wil->rx_status_ring_order = desc_ring_order + 1;
+	if (wil->rx_buff_id_count <= desc_ring_size)
+		/* make sure we will not run out of buff_ids */
+		wil->rx_buff_id_count = desc_ring_size + 512;
 	if (wil->rx_status_ring_order < WIL_SRING_SIZE_ORDER_MIN ||
 	    wil->rx_status_ring_order > WIL_SRING_SIZE_ORDER_MAX)
 		wil->rx_status_ring_order = WIL_RX_SRING_SIZE_ORDER_DEFAULT;
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 6a05f59ee58e9..bc89044d0b66e 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -602,7 +602,7 @@ struct wil_txrx_ops {
 			   struct wil_ring *ring, struct sk_buff *skb);
 	irqreturn_t (*irq_tx)(int irq, void *cookie);
 	/* RX ops */
-	int (*rx_init)(struct wil6210_priv *wil, u16 ring_size);
+	int (*rx_init)(struct wil6210_priv *wil, uint ring_order);
 	void (*rx_fini)(struct wil6210_priv *wil);
 	int (*wmi_addba_rx_resp)(struct wil6210_priv *wil, u8 mid, u8 cid,
 				 u8 tid, u8 token, u16 status, bool amsdu,
-- 
2.25.1


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

* [PATCH 4.19 09/13] rpmsg: glink: Remove chunk size word align warning
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (7 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 08/13] wil6210: make sure Rx ring sizes are correlated Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 10/13] wil6210: remove reset file from debugfs Lee Jones
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Chris Lew, Arun Kumar Neelakantam, Bjorn Andersson, Lee Jones

From: Chris Lew <clew@codeaurora.org>

[ Upstream commit f0beb4ba9b185d497c8efe7b349363700092aee0 ]

It is possible for the chunk sizes coming from the non RPM remote procs
to not be word aligned. Remove the alignment warning and continue to
read from the FIFO so execution is not stalled.

Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/rpmsg/qcom_glink_native.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 25c394a7077b8..facc577ab0acc 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -813,9 +813,6 @@ static int qcom_glink_rx_data(struct qcom_glink *glink, size_t avail)
 		return -EAGAIN;
 	}
 
-	if (WARN(chunk_size % 4, "Incoming data must be word aligned\n"))
-		return -EINVAL;
-
 	rcid = le16_to_cpu(hdr.msg.param1);
 	spin_lock_irqsave(&glink->idr_lock, flags);
 	channel = idr_find(&glink->rcids, rcid);
-- 
2.25.1


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

* [PATCH 4.19 10/13] wil6210: remove reset file from debugfs
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (8 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 09/13] rpmsg: glink: Remove chunk size word align warning Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-11 11:47   ` Greg KH
  2020-04-03 12:18 ` [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment Lee Jones
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Karthick Gopalasubramanian, Maya Erez, Kalle Valo, Lee Jones

From: Karthick Gopalasubramanian <kargop@codeaurora.org>

[ Upstream commit 32dcfe8316cdbd885542967c0c85f5b9de78874b ]

Reset file is not used and may cause race conditions
with operational driver if used.

Signed-off-by: Karthick Gopalasubramanian <kargop@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/net/wireless/ath/wil6210/debugfs.c | 27 ----------------------
 1 file changed, 27 deletions(-)

diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index acd95ca0430b9..55a809cb31054 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -730,32 +730,6 @@ struct dentry *wil_debugfs_create_ioblob(const char *name,
 	return debugfs_create_file(name, mode, parent, wil_blob, &fops_ioblob);
 }
 
-/*---reset---*/
-static ssize_t wil_write_file_reset(struct file *file, const char __user *buf,
-				    size_t len, loff_t *ppos)
-{
-	struct wil6210_priv *wil = file->private_data;
-	struct net_device *ndev = wil->main_ndev;
-
-	/**
-	 * BUG:
-	 * this code does NOT sync device state with the rest of system
-	 * use with care, debug only!!!
-	 */
-	rtnl_lock();
-	dev_close(ndev);
-	ndev->flags &= ~IFF_UP;
-	rtnl_unlock();
-	wil_reset(wil, true);
-
-	return len;
-}
-
-static const struct file_operations fops_reset = {
-	.write = wil_write_file_reset,
-	.open  = simple_open,
-};
-
 /*---write channel 1..4 to rxon for it, 0 to rxoff---*/
 static ssize_t wil_write_file_rxon(struct file *file, const char __user *buf,
 				   size_t len, loff_t *ppos)
@@ -2461,7 +2435,6 @@ static const struct {
 	{"desc",	0444,		&fops_txdesc},
 	{"bf",		0444,		&fops_bf},
 	{"mem_val",	0644,		&fops_memread},
-	{"reset",	0244,		&fops_reset},
 	{"rxon",	0244,		&fops_rxon},
 	{"tx_mgmt",	0244,		&fops_txmgmt},
 	{"wmi_send", 0244,		&fops_wmi},
-- 
2.25.1


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

* [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (9 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 10/13] wil6210: remove reset file from debugfs Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:26   ` Greg KH
  2020-04-03 12:18 ` [PATCH 4.19 12/13] mm/vmalloc.c: move 'area->pages' after if statement Lee Jones
                   ` (2 subsequent siblings)
  13 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable
  Cc: Alexander Shishkin, Peter Zijlstra, Arnaldo Carvalho de Melo,
	David Ahern, Jiri Olsa, Linus Torvalds, Mark Rutland,
	Namhyung Kim, Stephane Eranian, Thomas Gleixner, Vince Weaver,
	Ingo Molnar, Lee Jones

From: Alexander Shishkin <alexander.shishkin@linux.intel.com>

[ Upstream commit f25d8ba9e1b204b90fbf55970ea6e68955006068 ]

A comment is in a wrong place in perf_event_create_kernel_counter().
Fix that.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: https://lkml.kernel.org/r/20191030134731.5437-2-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 kernel/events/core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 8c70ee23fbe91..16f268475e8e4 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -10954,10 +10954,6 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
 	struct perf_event *event;
 	int err;
 
-	/*
-	 * Get the target context (task or percpu):
-	 */
-
 	event = perf_event_alloc(attr, cpu, task, NULL, NULL,
 				 overflow_handler, context, -1);
 	if (IS_ERR(event)) {
@@ -10968,6 +10964,9 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
 	/* Mark owner so we could distinguish it from user events. */
 	event->owner = TASK_TOMBSTONE;
 
+	/*
+	 * Get the target context (task or percpu):
+	 */
 	ctx = find_get_context(event->pmu, task, event);
 	if (IS_ERR(ctx)) {
 		err = PTR_ERR(ctx);
-- 
2.25.1


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

* [PATCH 4.19 12/13] mm/vmalloc.c: move 'area->pages' after if statement
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (10 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-03 12:18 ` [PATCH 4.19 13/13] usb: dwc3: don't set gadget->is_otg flag Lee Jones
  2020-04-20 11:24 ` [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Greg KH
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable
  Cc: Austin Kim, Michal Hocko, Andrew Morton, Uladzislau Rezki,
	Roman Gushchin, Roman Penyaev, Rick Edgecombe, Mike Rapoport,
	Andrey Ryabinin, Linus Torvalds, Lee Jones

From: Austin Kim <austindh.kim@gmail.com>

[ Upstream commit 7ea362427c170061b8822dd41bafaa72b3bcb9ad ]

If !area->pages statement is true where memory allocation fails, area is
freed.

In this case 'area->pages = pages' should not executed.  So move
'area->pages = pages' after if statement.

[akpm@linux-foundation.org: give area->pages the same treatment]
Link: http://lkml.kernel.org/r/20190830035716.GA190684@LGEARND20B15
Signed-off-by: Austin Kim <austindh.kim@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: Roman Penyaev <rpenyaev@suse.de>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 mm/vmalloc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 958d6ba9ee2d1..be65161f97531 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1668,7 +1668,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
 	nr_pages = get_vm_area_size(area) >> PAGE_SHIFT;
 	array_size = (nr_pages * sizeof(struct page *));
 
-	area->nr_pages = nr_pages;
 	/* Please note that the recursion is strictly bounded. */
 	if (array_size > PAGE_SIZE) {
 		pages = __vmalloc_node(array_size, 1, nested_gfp|highmem_mask,
@@ -1676,13 +1675,16 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
 	} else {
 		pages = kmalloc_node(array_size, nested_gfp, node);
 	}
-	area->pages = pages;
-	if (!area->pages) {
+
+	if (!pages) {
 		remove_vm_area(area->addr);
 		kfree(area);
 		return NULL;
 	}
 
+	area->pages = pages;
+	area->nr_pages = nr_pages;
+
 	for (i = 0; i < area->nr_pages; i++) {
 		struct page *page;
 
-- 
2.25.1


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

* [PATCH 4.19 13/13] usb: dwc3: don't set gadget->is_otg flag
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (11 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 12/13] mm/vmalloc.c: move 'area->pages' after if statement Lee Jones
@ 2020-04-03 12:18 ` Lee Jones
  2020-04-20 11:24 ` [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Greg KH
  13 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:18 UTC (permalink / raw)
  To: stable; +Cc: Roger Quadros, Felipe Balbi, Lee Jones

From: Roger Quadros <rogerq@ti.com>

[ Upstream commit c09b73cfac2a9317f1104169045c519c6021aa1d ]

This reverts
commit 6a4290cc28be1 ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.")

We don't yet support any of the OTG mechanisms (HNP/SRP/ADP)
and are not setting gadget->otg_caps, so don't set gadget->is_otg
flag.

If we do then we end up publishing a OTG1.0 descriptor in
the gadget descriptor which causes device enumeration to fail
if we are connected to a host with CONFIG_USB_OTG enabled.

Host side log without this patch

[   96.720453] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[   96.901391] usb 1-1: Dual-Role OTG device on non-HNP port
[   96.907552] usb 1-1: set a_alt_hnp_support failed: -32
[   97.060447] usb 1-1: new high-speed USB device number 3 using xhci-hcd
[   97.241378] usb 1-1: Dual-Role OTG device on non-HNP port
[   97.247536] usb 1-1: set a_alt_hnp_support failed: -32
[   97.253606] usb usb1-port1: attempt power cycle
[   97.960449] usb 1-1: new high-speed USB device number 4 using xhci-hcd
[   98.141383] usb 1-1: Dual-Role OTG device on non-HNP port
[   98.147540] usb 1-1: set a_alt_hnp_support failed: -32
[   98.300453] usb 1-1: new high-speed USB device number 5 using xhci-hcd
[   98.481391] usb 1-1: Dual-Role OTG device on non-HNP port
[   98.487545] usb 1-1: set a_alt_hnp_support failed: -32
[   98.493532] usb usb1-port1: unable to enumerate USB device

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc3/gadget.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index d482f89ffae2d..773d5dcaefcfb 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -3166,7 +3166,6 @@ int dwc3_gadget_init(struct dwc3 *dwc)
 	dwc->gadget.speed		= USB_SPEED_UNKNOWN;
 	dwc->gadget.sg_supported	= true;
 	dwc->gadget.name		= "dwc3-gadget";
-	dwc->gadget.is_otg		= dwc->dr_mode == USB_DR_MODE_OTG;
 
 	/*
 	 * FIXME We might be setting max_speed to <SUPER, however versions
-- 
2.25.1


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

* Re: [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment
  2020-04-03 12:18 ` [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment Lee Jones
@ 2020-04-03 12:26   ` Greg KH
  2020-04-03 12:52     ` Lee Jones
  0 siblings, 1 reply; 22+ messages in thread
From: Greg KH @ 2020-04-03 12:26 UTC (permalink / raw)
  To: Lee Jones
  Cc: stable, Alexander Shishkin, Peter Zijlstra,
	Arnaldo Carvalho de Melo, David Ahern, Jiri Olsa, Linus Torvalds,
	Mark Rutland, Namhyung Kim, Stephane Eranian, Thomas Gleixner,
	Vince Weaver, Ingo Molnar

On Fri, Apr 03, 2020 at 01:18:57PM +0100, Lee Jones wrote:
> From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> 
> [ Upstream commit f25d8ba9e1b204b90fbf55970ea6e68955006068 ]
> 
> A comment is in a wrong place in perf_event_create_kernel_counter().
> Fix that.
> 
> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Stephane Eranian <eranian@google.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Vince Weaver <vincent.weaver@maine.edu>
> Link: https://lkml.kernel.org/r/20191030134731.5437-2-alexander.shishkin@linux.intel.com
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  kernel/events/core.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 8c70ee23fbe91..16f268475e8e4 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -10954,10 +10954,6 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
>  	struct perf_event *event;
>  	int err;
>  
> -	/*
> -	 * Get the target context (task or percpu):
> -	 */
> -
>  	event = perf_event_alloc(attr, cpu, task, NULL, NULL,
>  				 overflow_handler, context, -1);
>  	if (IS_ERR(event)) {
> @@ -10968,6 +10964,9 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
>  	/* Mark owner so we could distinguish it from user events. */
>  	event->owner = TASK_TOMBSTONE;
>  
> +	/*
> +	 * Get the target context (task or percpu):
> +	 */
>  	ctx = find_get_context(event->pmu, task, event);
>  	if (IS_ERR(ctx)) {
>  		err = PTR_ERR(ctx);

Unless this is needed by a follow-on patch, I kind of doubt thsi is
needed in a stable kernel release :)

thanks,

greg k-h

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

* Re: [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment
  2020-04-03 12:26   ` Greg KH
@ 2020-04-03 12:52     ` Lee Jones
  2020-04-03 13:23       ` Alexander Shishkin
  0 siblings, 1 reply; 22+ messages in thread
From: Lee Jones @ 2020-04-03 12:52 UTC (permalink / raw)
  To: Greg KH
  Cc: stable, Alexander Shishkin, Peter Zijlstra,
	Arnaldo Carvalho de Melo, David Ahern, Jiri Olsa, Linus Torvalds,
	Mark Rutland, Namhyung Kim, Stephane Eranian, Thomas Gleixner,
	Vince Weaver, Ingo Molnar

On Fri, 03 Apr 2020, Greg KH wrote:

> On Fri, Apr 03, 2020 at 01:18:57PM +0100, Lee Jones wrote:
> > From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> > 
> > [ Upstream commit f25d8ba9e1b204b90fbf55970ea6e68955006068 ]
> > 
> > A comment is in a wrong place in perf_event_create_kernel_counter().
> > Fix that.
> > 
> > Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> > Cc: David Ahern <dsahern@gmail.com>
> > Cc: Jiri Olsa <jolsa@redhat.com>
> > Cc: Linus Torvalds <torvalds@linux-foundation.org>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Cc: Stephane Eranian <eranian@google.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Vince Weaver <vincent.weaver@maine.edu>
> > Link: https://lkml.kernel.org/r/20191030134731.5437-2-alexander.shishkin@linux.intel.com
> > Signed-off-by: Ingo Molnar <mingo@kernel.org>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  kernel/events/core.c | 7 +++----
> >  1 file changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/kernel/events/core.c b/kernel/events/core.c
> > index 8c70ee23fbe91..16f268475e8e4 100644
> > --- a/kernel/events/core.c
> > +++ b/kernel/events/core.c
> > @@ -10954,10 +10954,6 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
> >  	struct perf_event *event;
> >  	int err;
> >  
> > -	/*
> > -	 * Get the target context (task or percpu):
> > -	 */
> > -
> >  	event = perf_event_alloc(attr, cpu, task, NULL, NULL,
> >  				 overflow_handler, context, -1);
> >  	if (IS_ERR(event)) {
> > @@ -10968,6 +10964,9 @@ perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu,
> >  	/* Mark owner so we could distinguish it from user events. */
> >  	event->owner = TASK_TOMBSTONE;
> >  
> > +	/*
> > +	 * Get the target context (task or percpu):
> > +	 */
> >  	ctx = find_get_context(event->pmu, task, event);
> >  	if (IS_ERR(ctx)) {
> >  		err = PTR_ERR(ctx);
> 
> Unless this is needed by a follow-on patch, I kind of doubt thsi is
> needed in a stable kernel release :)

I believe you once called this "debugging the comments", or
similar. :)

No problem though - happy to drop it from this and other sets.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment
  2020-04-03 12:52     ` Lee Jones
@ 2020-04-03 13:23       ` Alexander Shishkin
  2020-04-11 11:49         ` Greg KH
  0 siblings, 1 reply; 22+ messages in thread
From: Alexander Shishkin @ 2020-04-03 13:23 UTC (permalink / raw)
  To: Lee Jones, Greg KH
  Cc: stable, Peter Zijlstra, Arnaldo Carvalho de Melo, David Ahern,
	Jiri Olsa, Linus Torvalds, Mark Rutland, Namhyung Kim,
	Stephane Eranian, Thomas Gleixner, Vince Weaver, Ingo Molnar,
	alexander.shishkin

Lee Jones <lee.jones@linaro.org> writes:

> On Fri, 03 Apr 2020, Greg KH wrote:
>
>> > +	/*
>> > +	 * Get the target context (task or percpu):
>> > +	 */
>> >  	ctx = find_get_context(event->pmu, task, event);
>> >  	if (IS_ERR(ctx)) {
>> >  		err = PTR_ERR(ctx);
>> 
>> Unless this is needed by a follow-on patch, I kind of doubt thsi is
>> needed in a stable kernel release :)
>
> I believe you once called this "debugging the comments", or
> similar. :)
>
> No problem though - happy to drop it from this and other sets.

It's a precursor to dce5affb94eb54edfff17727a6240a6a5d998666, which I
think is a stable candidate.

Regards,
--
Alex

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

* Re: [PATCH 4.19 10/13] wil6210: remove reset file from debugfs
  2020-04-03 12:18 ` [PATCH 4.19 10/13] wil6210: remove reset file from debugfs Lee Jones
@ 2020-04-11 11:47   ` Greg KH
  2020-04-14  7:42     ` Lee Jones
  0 siblings, 1 reply; 22+ messages in thread
From: Greg KH @ 2020-04-11 11:47 UTC (permalink / raw)
  To: Lee Jones; +Cc: stable, Karthick Gopalasubramanian, Maya Erez, Kalle Valo

On Fri, Apr 03, 2020 at 01:18:56PM +0100, Lee Jones wrote:
> From: Karthick Gopalasubramanian <kargop@codeaurora.org>
> 
> [ Upstream commit 32dcfe8316cdbd885542967c0c85f5b9de78874b ]
> 
> Reset file is not used and may cause race conditions
> with operational driver if used.
> 
> Signed-off-by: Karthick Gopalasubramanian <kargop@codeaurora.org>
> Signed-off-by: Maya Erez <merez@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/net/wireless/ath/wil6210/debugfs.c | 27 ----------------------
>  1 file changed, 27 deletions(-)

Why is this a patch for stable kernels?  debugfs is only for root, and
can do much worst things than this, which is why it shouldn't be
mounted/enabled on "real" systems.

thanks,

greg k-h

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

* Re: [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment
  2020-04-03 13:23       ` Alexander Shishkin
@ 2020-04-11 11:49         ` Greg KH
  2020-04-14  7:37           ` Lee Jones
  0 siblings, 1 reply; 22+ messages in thread
From: Greg KH @ 2020-04-11 11:49 UTC (permalink / raw)
  To: Alexander Shishkin
  Cc: Lee Jones, stable, Peter Zijlstra, Arnaldo Carvalho de Melo,
	David Ahern, Jiri Olsa, Linus Torvalds, Mark Rutland,
	Namhyung Kim, Stephane Eranian, Thomas Gleixner, Vince Weaver,
	Ingo Molnar

On Fri, Apr 03, 2020 at 04:23:42PM +0300, Alexander Shishkin wrote:
> Lee Jones <lee.jones@linaro.org> writes:
> 
> > On Fri, 03 Apr 2020, Greg KH wrote:
> >
> >> > +	/*
> >> > +	 * Get the target context (task or percpu):
> >> > +	 */
> >> >  	ctx = find_get_context(event->pmu, task, event);
> >> >  	if (IS_ERR(ctx)) {
> >> >  		err = PTR_ERR(ctx);
> >> 
> >> Unless this is needed by a follow-on patch, I kind of doubt thsi is
> >> needed in a stable kernel release :)
> >
> > I believe you once called this "debugging the comments", or
> > similar. :)
> >
> > No problem though - happy to drop it from this and other sets.
> 
> It's a precursor to dce5affb94eb54edfff17727a6240a6a5d998666, which I
> think is a stable candidate.

Ok, but that's not part of this patch series, so how was I supposed to
know that?  :)

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

* Re: [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment
  2020-04-11 11:49         ` Greg KH
@ 2020-04-14  7:37           ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-14  7:37 UTC (permalink / raw)
  To: Greg KH
  Cc: Alexander Shishkin, stable, Peter Zijlstra,
	Arnaldo Carvalho de Melo, David Ahern, Jiri Olsa, Linus Torvalds,
	Mark Rutland, Namhyung Kim, Stephane Eranian, Thomas Gleixner,
	Vince Weaver, Ingo Molnar

On Sat, 11 Apr 2020, Greg KH wrote:

> On Fri, Apr 03, 2020 at 04:23:42PM +0300, Alexander Shishkin wrote:
> > Lee Jones <lee.jones@linaro.org> writes:
> > 
> > > On Fri, 03 Apr 2020, Greg KH wrote:
> > >
> > >> > +	/*
> > >> > +	 * Get the target context (task or percpu):
> > >> > +	 */
> > >> >  	ctx = find_get_context(event->pmu, task, event);
> > >> >  	if (IS_ERR(ctx)) {
> > >> >  		err = PTR_ERR(ctx);
> > >> 
> > >> Unless this is needed by a follow-on patch, I kind of doubt thsi is
> > >> needed in a stable kernel release :)
> > >
> > > I believe you once called this "debugging the comments", or
> > > similar. :)
> > >
> > > No problem though - happy to drop it from this and other sets.
> > 
> > It's a precursor to dce5affb94eb54edfff17727a6240a6a5d998666, which I
> > think is a stable candidate.
> 
> Ok, but that's not part of this patch series, so how was I supposed to
> know that?  :)

It wasn't going to be part of mine either, since it's missing from the
Sony vendor tree (the repo I'm analysing to identify these Stable
backports), thus I've dropped the patch.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 4.19 10/13] wil6210: remove reset file from debugfs
  2020-04-11 11:47   ` Greg KH
@ 2020-04-14  7:42     ` Lee Jones
  0 siblings, 0 replies; 22+ messages in thread
From: Lee Jones @ 2020-04-14  7:42 UTC (permalink / raw)
  To: Greg KH; +Cc: stable, Karthick Gopalasubramanian, Maya Erez, Kalle Valo

On Sat, 11 Apr 2020, Greg KH wrote:

> On Fri, Apr 03, 2020 at 01:18:56PM +0100, Lee Jones wrote:
> > From: Karthick Gopalasubramanian <kargop@codeaurora.org>
> > 
> > [ Upstream commit 32dcfe8316cdbd885542967c0c85f5b9de78874b ]
> > 
> > Reset file is not used and may cause race conditions
> > with operational driver if used.
> > 
> > Signed-off-by: Karthick Gopalasubramanian <kargop@codeaurora.org>
> > Signed-off-by: Maya Erez <merez@codeaurora.org>
> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> >  drivers/net/wireless/ath/wil6210/debugfs.c | 27 ----------------------
> >  1 file changed, 27 deletions(-)
> 
> Why is this a patch for stable kernels?  debugfs is only for root, and
> can do much worst things than this, which is why it shouldn't be
> mounted/enabled on "real" systems.

This wasn't backported due to security issues.

It was backported since:

  "[The] Reset file ... may cause race conditions"

Final call is yours, as always.  Please do as you see fit.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree
  2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
                   ` (12 preceding siblings ...)
  2020-04-03 12:18 ` [PATCH 4.19 13/13] usb: dwc3: don't set gadget->is_otg flag Lee Jones
@ 2020-04-20 11:24 ` Greg KH
  13 siblings, 0 replies; 22+ messages in thread
From: Greg KH @ 2020-04-20 11:24 UTC (permalink / raw)
  To: Lee Jones; +Cc: stable

On Fri, Apr 03, 2020 at 01:18:46PM +0100, Lee Jones wrote:
> A recent review of the Sony Xperia Development kernel tree [0] resulted
> in the discovery of various patches which have been backported from
> Mainline in order to fix an array of issues.  These patches should be
> applied to Stable such that everyone can benefit from them.
> 
> Note: The review is still on-going (~50%) - more to follow.

All but one now queued up, thanks!

greg k-h

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

end of thread, other threads:[~2020-04-20 11:24 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 12:18 [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 01/13] clk: qcom: rcg: Return failure for RCG update Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 02/13] drm/msm: stop abusing dma_map/unmap for cache Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 03/13] arm64: Fix size of __early_cpu_boot_status Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 04/13] drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read() Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 05/13] wil6210: check rx_buff_mgmt before accessing it Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 06/13] wil6210: ignore HALP ICR if already handled Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 07/13] wil6210: add general initialization/size checks Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 08/13] wil6210: make sure Rx ring sizes are correlated Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 09/13] rpmsg: glink: Remove chunk size word align warning Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 10/13] wil6210: remove reset file from debugfs Lee Jones
2020-04-11 11:47   ` Greg KH
2020-04-14  7:42     ` Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 11/13] perf/core: Reattach a misplaced comment Lee Jones
2020-04-03 12:26   ` Greg KH
2020-04-03 12:52     ` Lee Jones
2020-04-03 13:23       ` Alexander Shishkin
2020-04-11 11:49         ` Greg KH
2020-04-14  7:37           ` Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 12/13] mm/vmalloc.c: move 'area->pages' after if statement Lee Jones
2020-04-03 12:18 ` [PATCH 4.19 13/13] usb: dwc3: don't set gadget->is_otg flag Lee Jones
2020-04-20 11:24 ` [PATCH 4.19 00/13] Backported fixes taken from Sony's Vendor tree Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.