From 4300eeb952c99fca4627989789fec7fa76008dcf Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Mon, 11 May 2020 17:39:58 -0400 Subject: [PATCH] Fixes for 5.6 Signed-off-by: Sasha Levin --- ...redundant-cg-pg-ungate-on-runpm-ente.patch | 42 ++++++++++ ...-kfd-suspend-after-ip_suspend_phase1.patch | 45 +++++++++++ ...read_nolock-whenever-delayed-allocat.patch | 55 +++++++++++++ ...ioread_nolock-by-default-for-blocksi.patch | 66 ++++++++++++++++ .../net-macb-fix-runtime-pm-refcounting.patch | 71 +++++++++++++++++ ...e-hang-when-ns-scanning-fails-during.patch | 48 ++++++++++++ ...vme_identify_ns_descs-error-handling.patch | 77 +++++++++++++++++++ queue-5.6/series | 10 +++ ...bes-fix-a-double-initialization-typo.patch | 41 ++++++++++ ...s-fix-missing-id-assignment-to-the-c.patch | 44 +++++++++++ ...onsole-freeing-with-a-common-interfa.patch | 62 +++++++++++++++ 11 files changed, 561 insertions(+) create mode 100644 queue-5.6/drm-amdgpu-drop-redundant-cg-pg-ungate-on-runpm-ente.patch create mode 100644 queue-5.6/drm-amdgpu-move-kfd-suspend-after-ip_suspend_phase1.patch create mode 100644 queue-5.6/ext4-disable-dioread_nolock-whenever-delayed-allocat.patch create mode 100644 queue-5.6/ext4-don-t-set-dioread_nolock-by-default-for-blocksi.patch create mode 100644 queue-5.6/net-macb-fix-runtime-pm-refcounting.patch create mode 100644 queue-5.6/nvme-fix-possible-hang-when-ns-scanning-fails-during.patch create mode 100644 queue-5.6/nvme-refactor-nvme_identify_ns_descs-error-handling.patch create mode 100644 queue-5.6/tracing-kprobes-fix-a-double-initialization-typo.patch create mode 100644 queue-5.6/tty-xilinx_uartps-fix-missing-id-assignment-to-the-c.patch create mode 100644 queue-5.6/vt-fix-unicode-console-freeing-with-a-common-interfa.patch diff --git a/queue-5.6/drm-amdgpu-drop-redundant-cg-pg-ungate-on-runpm-ente.patch b/queue-5.6/drm-amdgpu-drop-redundant-cg-pg-ungate-on-runpm-ente.patch new file mode 100644 index 00000000000..51f4eff6f30 --- /dev/null +++ b/queue-5.6/drm-amdgpu-drop-redundant-cg-pg-ungate-on-runpm-ente.patch @@ -0,0 +1,42 @@ +From c2d65263a14f978cdaa07ca2d9a1dbff398c06bb Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 24 Apr 2020 15:36:22 +0800 +Subject: drm/amdgpu: drop redundant cg/pg ungate on runpm enter + +From: Evan Quan + +[ Upstream commit f7b52890daba570bc8162d43c96b5583bbdd4edd ] + +CG/PG ungate is already performed in ip_suspend_phase1. Otherwise, +the CG/PG ungate will be performed twice. That will cause gfxoff +disablement is performed twice also on runpm enter while gfxoff +enablemnt once on rump exit. That will put gfxoff into disabled +state. + +Fixes: b2a7e9735ab286 ("drm/amdgpu: fix the hw hang during perform system reboot and reset") +Signed-off-by: Evan Quan +Acked-by: Alex Deucher +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +index 1ddf2460cf834..5fcbacddb9b0e 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +@@ -3325,9 +3325,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) + } + } + +- amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE); +- amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE); +- + amdgpu_ras_suspend(adev); + + r = amdgpu_device_ip_suspend_phase1(adev); +-- +2.20.1 + diff --git a/queue-5.6/drm-amdgpu-move-kfd-suspend-after-ip_suspend_phase1.patch b/queue-5.6/drm-amdgpu-move-kfd-suspend-after-ip_suspend_phase1.patch new file mode 100644 index 00000000000..e148ff1358c --- /dev/null +++ b/queue-5.6/drm-amdgpu-move-kfd-suspend-after-ip_suspend_phase1.patch @@ -0,0 +1,45 @@ +From 8ec7f26eb97a41d780c232f27815e8ada52ea33b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 24 Apr 2020 15:32:41 +0800 +Subject: drm/amdgpu: move kfd suspend after ip_suspend_phase1 + +From: Evan Quan + +[ Upstream commit c457a273e118bb96e1db8d1825f313e6cafe4258 ] + +This sequence change should be safe as what did in ip_suspend_phase1 +is to suspend DCE only. And this is a prerequisite for coming +redundant cg/pg ungate dropping. + +Fixes: 487eca11a321ef ("drm/amdgpu: fix gfx hang during suspend with video playback (v2)") +Signed-off-by: Evan Quan +Acked-by: Alex Deucher +Signed-off-by: Alex Deucher +Cc: stable@vger.kernel.org +Signed-off-by: Sasha Levin +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +index f184cdca938de..1ddf2460cf834 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +@@ -3328,12 +3328,12 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) + amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE); + amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE); + +- amdgpu_amdkfd_suspend(adev); +- + amdgpu_ras_suspend(adev); + + r = amdgpu_device_ip_suspend_phase1(adev); + ++ amdgpu_amdkfd_suspend(adev); ++ + /* evict vram memory */ + amdgpu_bo_evict_vram(adev); + +-- +2.20.1 + diff --git a/queue-5.6/ext4-disable-dioread_nolock-whenever-delayed-allocat.patch b/queue-5.6/ext4-disable-dioread_nolock-whenever-delayed-allocat.patch new file mode 100644 index 00000000000..7edf4fb7a76 --- /dev/null +++ b/queue-5.6/ext4-disable-dioread_nolock-whenever-delayed-allocat.patch @@ -0,0 +1,55 @@ +From b0550d427ec3d9c1d31824d9b7507bceb56c09fe Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 19 Mar 2020 11:00:28 -0400 +Subject: ext4: disable dioread_nolock whenever delayed allocation is disabled + +From: Eric Whitney + +[ Upstream commit c8980e1980ccdc2229aa2218d532ddc62e0aabe5 ] + +The patch "ext4: make dioread_nolock the default" (244adf6426ee) causes +generic/422 to fail when run in kvm-xfstests' ext3conv test case. This +applies both the dioread_nolock and nodelalloc mount options, a +combination not previously tested by kvm-xfstests. The failure occurs +because the dioread_nolock code path splits a previously fallocated +multiblock extent into a series of single block extents when overwriting +a portion of that extent. That causes allocation of an extent tree leaf +node and a reshuffling of extents. Once writeback is completed, the +individual extents are recombined into a single extent, the extent is +moved again, and the leaf node is deleted. The difference in block +utilization before and after writeback due to the leaf node triggers the +failure. + +The original reason for this behavior was to avoid ENOSPC when handling +I/O completions during writeback in the dioread_nolock code paths when +delayed allocation is disabled. It may no longer be necessary, because +code was added in the past to reserve extra space to solve this problem +when delayed allocation is enabled, and this code may also apply when +delayed allocation is disabled. Until this can be verified, don't use +the dioread_nolock code paths if delayed allocation is disabled. + +Signed-off-by: Eric Whitney +Link: https://lore.kernel.org/r/20200319150028.24592-1-enwlinux@gmail.com +Signed-off-by: Theodore Ts'o +Signed-off-by: Sasha Levin +--- + fs/ext4/ext4_jbd2.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h +index 7ea4f6fa173b4..4b9002f0e84c0 100644 +--- a/fs/ext4/ext4_jbd2.h ++++ b/fs/ext4/ext4_jbd2.h +@@ -512,6 +512,9 @@ static inline int ext4_should_dioread_nolock(struct inode *inode) + return 0; + if (ext4_should_journal_data(inode)) + return 0; ++ /* temporary fix to prevent generic/422 test failures */ ++ if (!test_opt(inode->i_sb, DELALLOC)) ++ return 0; + return 1; + } + +-- +2.20.1 + diff --git a/queue-5.6/ext4-don-t-set-dioread_nolock-by-default-for-blocksi.patch b/queue-5.6/ext4-don-t-set-dioread_nolock-by-default-for-blocksi.patch new file mode 100644 index 00000000000..b3f0ce575ee --- /dev/null +++ b/queue-5.6/ext4-don-t-set-dioread_nolock-by-default-for-blocksi.patch @@ -0,0 +1,66 @@ +From fe771a96ae617aff0809831c213c4b264fe44aec Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 28 Mar 2020 01:37:44 +0530 +Subject: ext4: don't set dioread_nolock by default for blocksize < pagesize + +From: Ritesh Harjani + +Currently on calling echo 3 > drop_caches on host machine, we see +FS corruption in the guest. This happens on Power machine where +blocksize < pagesize. + +So as a temporary workaound don't enable dioread_nolock by default +for blocksize < pagesize until we identify the root cause. + +Also emit a warning msg in case if this mount option is manually +enabled for blocksize < pagesize. + +Reported-by: Aneesh Kumar K.V +Signed-off-by: Ritesh Harjani +Link: https://lore.kernel.org/r/20200327200744.12473-1-riteshh@linux.ibm.com +Signed-off-by: Theodore Ts'o +--- + fs/ext4/super.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/fs/ext4/super.c b/fs/ext4/super.c +index 446158ab507dd..70796de7c4682 100644 +--- a/fs/ext4/super.c ++++ b/fs/ext4/super.c +@@ -2181,6 +2181,14 @@ static int parse_options(char *options, struct super_block *sb, + } + } + #endif ++ if (test_opt(sb, DIOREAD_NOLOCK)) { ++ int blocksize = ++ BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size); ++ if (blocksize < PAGE_SIZE) ++ ext4_msg(sb, KERN_WARNING, "Warning: mounting with an " ++ "experimental mount option 'dioread_nolock' " ++ "for blocksize < PAGE_SIZE"); ++ } + return 1; + } + +@@ -3787,7 +3795,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) + set_opt(sb, NO_UID32); + /* xattr user namespace & acls are now defaulted on */ + set_opt(sb, XATTR_USER); +- set_opt(sb, DIOREAD_NOLOCK); + #ifdef CONFIG_EXT4_FS_POSIX_ACL + set_opt(sb, POSIX_ACL); + #endif +@@ -3837,6 +3844,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) + sbi->s_li_wait_mult = EXT4_DEF_LI_WAIT_MULT; + + blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size); ++ ++ if (blocksize == PAGE_SIZE) ++ set_opt(sb, DIOREAD_NOLOCK); ++ + if (blocksize < EXT4_MIN_BLOCK_SIZE || + blocksize > EXT4_MAX_BLOCK_SIZE) { + ext4_msg(sb, KERN_ERR, +-- +2.20.1 + diff --git a/queue-5.6/net-macb-fix-runtime-pm-refcounting.patch b/queue-5.6/net-macb-fix-runtime-pm-refcounting.patch new file mode 100644 index 00000000000..738d1f4f318 --- /dev/null +++ b/queue-5.6/net-macb-fix-runtime-pm-refcounting.patch @@ -0,0 +1,71 @@ +From c57723f0d7214c3c40b02d0f29e8102e39ed45e8 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 27 Apr 2020 13:51:20 +0300 +Subject: net: macb: Fix runtime PM refcounting + +From: Andy Shevchenko + +[ Upstream commit 0ce205d4660c312cdeb4a81066616dcc6f3799c4 ] + +The commit e6a41c23df0d, while trying to fix an issue, + + ("net: macb: ensure interface is not suspended on at91rm9200") + +introduced a refcounting regression, because in error case refcounter +must be balanced. Fix it by calling pm_runtime_put_noidle() in error case. + +While here, fix the same mistake in other couple of places. + +Fixes: e6a41c23df0d ("net: macb: ensure interface is not suspended on at91rm9200") +Cc: Alexandre Belloni +Cc: Claudiu Beznea +Signed-off-by: Andy Shevchenko +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/cadence/macb_main.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c +index b3a51935e8e0b..1fc83cd31cf28 100644 +--- a/drivers/net/ethernet/cadence/macb_main.c ++++ b/drivers/net/ethernet/cadence/macb_main.c +@@ -334,8 +334,10 @@ static int macb_mdio_read(struct mii_bus *bus, int mii_id, int regnum) + int status; + + status = pm_runtime_get_sync(&bp->pdev->dev); +- if (status < 0) ++ if (status < 0) { ++ pm_runtime_put_noidle(&bp->pdev->dev); + goto mdio_pm_exit; ++ } + + status = macb_mdio_wait_for_idle(bp); + if (status < 0) +@@ -386,8 +388,10 @@ static int macb_mdio_write(struct mii_bus *bus, int mii_id, int regnum, + int status; + + status = pm_runtime_get_sync(&bp->pdev->dev); +- if (status < 0) ++ if (status < 0) { ++ pm_runtime_put_noidle(&bp->pdev->dev); + goto mdio_pm_exit; ++ } + + status = macb_mdio_wait_for_idle(bp); + if (status < 0) +@@ -3803,8 +3807,10 @@ static int at91ether_open(struct net_device *dev) + int ret; + + ret = pm_runtime_get_sync(&lp->pdev->dev); +- if (ret < 0) ++ if (ret < 0) { ++ pm_runtime_put_noidle(&lp->pdev->dev); + return ret; ++ } + + /* Clear internal statistics */ + ctl = macb_readl(lp, NCR); +-- +2.20.1 + diff --git a/queue-5.6/nvme-fix-possible-hang-when-ns-scanning-fails-during.patch b/queue-5.6/nvme-fix-possible-hang-when-ns-scanning-fails-during.patch new file mode 100644 index 00000000000..96dd0e4e477 --- /dev/null +++ b/queue-5.6/nvme-fix-possible-hang-when-ns-scanning-fails-during.patch @@ -0,0 +1,48 @@ +From 5968f4d962352db059102fad48687b4b4f2034d3 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 6 May 2020 15:44:02 -0700 +Subject: nvme: fix possible hang when ns scanning fails during error recovery + +From: Sagi Grimberg + +[ Upstream commit 59c7c3caaaf8750df4ec3255082f15eb4e371514 ] + +When the controller is reconnecting, the host fails I/O and admin +commands as the host cannot reach the controller. ns scanning may +revalidate namespaces during that period and it is wrong to remove +namespaces due to these failures as we may hang (see 205da2434301). + +One command that may fail is nvme_identify_ns_descs. Since we return +success due to having ns identify descriptor list optional, we continue +to compare ns identifiers in nvme_revalidate_disk, obviously fail and +return -ENODEV to nvme_validate_ns, which will remove the namespace. + +Exactly what we don't want to happen. + +Fixes: 22802bf742c2 ("nvme: Namepace identification descriptor list is optional") +Tested-by: Anton Eidelman +Signed-off-by: Sagi Grimberg +Reviewed-by: Keith Busch +Signed-off-by: Christoph Hellwig +Signed-off-by: Jens Axboe +Signed-off-by: Sasha Levin +--- + drivers/nvme/host/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c +index 545e9e5f1b737..84f20369d8467 100644 +--- a/drivers/nvme/host/core.c ++++ b/drivers/nvme/host/core.c +@@ -1082,7 +1082,7 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid, + * Don't treat an error as fatal, as we potentially already + * have a NGUID or EUI-64. + */ +- if (status > 0) ++ if (status > 0 && !(status & NVME_SC_DNR)) + status = 0; + goto free_data; + } +-- +2.20.1 + diff --git a/queue-5.6/nvme-refactor-nvme_identify_ns_descs-error-handling.patch b/queue-5.6/nvme-refactor-nvme_identify_ns_descs-error-handling.patch new file mode 100644 index 00000000000..d22ae1298bd --- /dev/null +++ b/queue-5.6/nvme-refactor-nvme_identify_ns_descs-error-handling.patch @@ -0,0 +1,77 @@ +From 10dfca40e76ee7460a17142ea325cc1ab0b1cb56 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 25 Mar 2020 14:19:35 +0100 +Subject: nvme: refactor nvme_identify_ns_descs error handling + +From: Christoph Hellwig + +[ Upstream commit fb314eb0cbb2e11540d1ae1a7b28346397f621ef ] + +Move the handling of an error into the function from the caller, and +only do it for an actual error on the admin command itself, not the +command parsing, as that should be enough to deal with devices claiming +a bogus version compliance. + +Signed-off-by: Christoph Hellwig +Signed-off-by: Keith Busch +Signed-off-by: Sasha Levin +--- + drivers/nvme/host/core.c | 28 +++++++++++++--------------- + 1 file changed, 13 insertions(+), 15 deletions(-) + +diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c +index fb4c35a430650..545e9e5f1b737 100644 +--- a/drivers/nvme/host/core.c ++++ b/drivers/nvme/host/core.c +@@ -1075,8 +1075,17 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid, + + status = nvme_submit_sync_cmd(ctrl->admin_q, &c, data, + NVME_IDENTIFY_DATA_SIZE); +- if (status) ++ if (status) { ++ dev_warn(ctrl->device, ++ "Identify Descriptors failed (%d)\n", status); ++ /* ++ * Don't treat an error as fatal, as we potentially already ++ * have a NGUID or EUI-64. ++ */ ++ if (status > 0) ++ status = 0; + goto free_data; ++ } + + for (pos = 0; pos < NVME_IDENTIFY_DATA_SIZE; pos += len) { + struct nvme_ns_id_desc *cur = data + pos; +@@ -1734,26 +1743,15 @@ static void nvme_config_write_zeroes(struct gendisk *disk, struct nvme_ns *ns) + static int nvme_report_ns_ids(struct nvme_ctrl *ctrl, unsigned int nsid, + struct nvme_id_ns *id, struct nvme_ns_ids *ids) + { +- int ret = 0; +- + memset(ids, 0, sizeof(*ids)); + + if (ctrl->vs >= NVME_VS(1, 1, 0)) + memcpy(ids->eui64, id->eui64, sizeof(id->eui64)); + if (ctrl->vs >= NVME_VS(1, 2, 0)) + memcpy(ids->nguid, id->nguid, sizeof(id->nguid)); +- if (ctrl->vs >= NVME_VS(1, 3, 0)) { +- /* Don't treat error as fatal we potentially +- * already have a NGUID or EUI-64 +- */ +- ret = nvme_identify_ns_descs(ctrl, nsid, ids); +- if (ret) +- dev_warn(ctrl->device, +- "Identify Descriptors failed (%d)\n", ret); +- if (ret > 0) +- ret = 0; +- } +- return ret; ++ if (ctrl->vs >= NVME_VS(1, 3, 0)) ++ return nvme_identify_ns_descs(ctrl, nsid, ids); ++ return 0; + } + + static bool nvme_ns_ids_valid(struct nvme_ns_ids *ids) +-- +2.20.1 + diff --git a/queue-5.6/series b/queue-5.6/series index 4940debf7e3..c7c20b6153f 100644 --- a/queue-5.6/series +++ b/queue-5.6/series @@ -1,2 +1,12 @@ thunderbolt-check-return-value-of-tb_sw_read-in-usb4_switch_op.patch usb-serial-qcserial-add-dw5816e-support.patch +drm-amdgpu-move-kfd-suspend-after-ip_suspend_phase1.patch +drm-amdgpu-drop-redundant-cg-pg-ungate-on-runpm-ente.patch +vt-fix-unicode-console-freeing-with-a-common-interfa.patch +tty-xilinx_uartps-fix-missing-id-assignment-to-the-c.patch +ext4-don-t-set-dioread_nolock-by-default-for-blocksi.patch +ext4-disable-dioread_nolock-whenever-delayed-allocat.patch +nvme-refactor-nvme_identify_ns_descs-error-handling.patch +nvme-fix-possible-hang-when-ns-scanning-fails-during.patch +tracing-kprobes-fix-a-double-initialization-typo.patch +net-macb-fix-runtime-pm-refcounting.patch diff --git a/queue-5.6/tracing-kprobes-fix-a-double-initialization-typo.patch b/queue-5.6/tracing-kprobes-fix-a-double-initialization-typo.patch new file mode 100644 index 00000000000..4ae292147e8 --- /dev/null +++ b/queue-5.6/tracing-kprobes-fix-a-double-initialization-typo.patch @@ -0,0 +1,41 @@ +From f05bbae12a2b2748e32d838e5c11e769db164402 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 25 Apr 2020 14:49:09 +0900 +Subject: tracing/kprobes: Fix a double initialization typo + +From: Masami Hiramatsu + +[ Upstream commit dcbd21c9fca5e954fd4e3d91884907eb6d47187e ] + +Fix a typo that resulted in an unnecessary double +initialization to addr. + +Link: http://lkml.kernel.org/r/158779374968.6082.2337484008464939919.stgit@devnote2 + +Cc: Tom Zanussi +Cc: Ingo Molnar +Cc: stable@vger.kernel.org +Fixes: c7411a1a126f ("tracing/kprobe: Check whether the non-suffixed symbol is notrace") +Signed-off-by: Masami Hiramatsu +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Sasha Levin +--- + kernel/trace/trace_kprobe.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c +index d0568af4a0ef6..0d9300c3b0846 100644 +--- a/kernel/trace/trace_kprobe.c ++++ b/kernel/trace/trace_kprobe.c +@@ -453,7 +453,7 @@ static bool __within_notrace_func(unsigned long addr) + + static bool within_notrace_func(struct trace_kprobe *tk) + { +- unsigned long addr = addr = trace_kprobe_address(tk); ++ unsigned long addr = trace_kprobe_address(tk); + char symname[KSYM_NAME_LEN], *p; + + if (!__within_notrace_func(addr)) +-- +2.20.1 + diff --git a/queue-5.6/tty-xilinx_uartps-fix-missing-id-assignment-to-the-c.patch b/queue-5.6/tty-xilinx_uartps-fix-missing-id-assignment-to-the-c.patch new file mode 100644 index 00000000000..289ed1fcc51 --- /dev/null +++ b/queue-5.6/tty-xilinx_uartps-fix-missing-id-assignment-to-the-c.patch @@ -0,0 +1,44 @@ +From cd7aadc849bbdd4f3e95ed5c9896905284713c5b Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Mon, 4 May 2020 16:27:28 +0200 +Subject: tty: xilinx_uartps: Fix missing id assignment to the console + +From: Shubhrajyoti Datta + +[ Upstream commit 2ae11c46d5fdc46cb396e35911c713d271056d35 ] + +When serial console has been assigned to ttyPS1 (which is serial1 alias) +console index is not updated property and pointing to index -1 (statically +initialized) which ends up in situation where nothing has been printed on +the port. + +The commit 18cc7ac8a28e ("Revert "serial: uartps: Register own uart console +and driver structures"") didn't contain this line which was removed by +accident. + +Fixes: 18cc7ac8a28e ("Revert "serial: uartps: Register own uart console and driver structures"") +Signed-off-by: Shubhrajyoti Datta +Cc: stable +Signed-off-by: Michal Simek +Link: https://lore.kernel.org/r/ed3111533ef5bd342ee5ec504812240b870f0853.1588602446.git.michal.simek@xilinx.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/tty/serial/xilinx_uartps.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c +index 7a9b360b04386..1d8b6993a4357 100644 +--- a/drivers/tty/serial/xilinx_uartps.c ++++ b/drivers/tty/serial/xilinx_uartps.c +@@ -1471,6 +1471,7 @@ static int cdns_uart_probe(struct platform_device *pdev) + cdns_uart_uart_driver.nr = CDNS_UART_NR_PORTS; + #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE + cdns_uart_uart_driver.cons = &cdns_uart_console; ++ cdns_uart_console.index = id; + #endif + + rc = uart_register_driver(&cdns_uart_uart_driver); +-- +2.20.1 + diff --git a/queue-5.6/vt-fix-unicode-console-freeing-with-a-common-interfa.patch b/queue-5.6/vt-fix-unicode-console-freeing-with-a-common-interfa.patch new file mode 100644 index 00000000000..387339ddda8 --- /dev/null +++ b/queue-5.6/vt-fix-unicode-console-freeing-with-a-common-interfa.patch @@ -0,0 +1,62 @@ +From de05d9beb7ab08492400392817b519edfbe3d624 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 2 May 2020 11:01:07 -0400 +Subject: vt: fix unicode console freeing with a common interface + +From: Nicolas Pitre + +[ Upstream commit 57d38f26d81e4275748b69372f31df545dcd9b71 ] + +By directly using kfree() in different places we risk missing one if +it is switched to using vfree(), especially if the corresponding +vmalloc() is hidden away within a common abstraction. + +Oh wait, that's exactly what happened here. + +So let's fix this by creating a common abstraction for the free case +as well. + +Signed-off-by: Nicolas Pitre +Reported-by: syzbot+0bfda3ade1ee9288a1be@syzkaller.appspotmail.com +Fixes: 9a98e7a80f95 ("vt: don't use kmalloc() for the unicode screen buffer") +Cc: +Reviewed-by: Sam Ravnborg +Link: https://lore.kernel.org/r/nycvar.YSQ.7.76.2005021043110.2671@knanqh.ubzr +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sasha Levin +--- + drivers/tty/vt/vt.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c +index cc1a041913654..699d8b56cbe75 100644 +--- a/drivers/tty/vt/vt.c ++++ b/drivers/tty/vt/vt.c +@@ -365,9 +365,14 @@ static struct uni_screen *vc_uniscr_alloc(unsigned int cols, unsigned int rows) + return uniscr; + } + ++static void vc_uniscr_free(struct uni_screen *uniscr) ++{ ++ vfree(uniscr); ++} ++ + static void vc_uniscr_set(struct vc_data *vc, struct uni_screen *new_uniscr) + { +- vfree(vc->vc_uni_screen); ++ vc_uniscr_free(vc->vc_uni_screen); + vc->vc_uni_screen = new_uniscr; + } + +@@ -1230,7 +1235,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, + err = resize_screen(vc, new_cols, new_rows, user); + if (err) { + kfree(newscreen); +- kfree(new_uniscr); ++ vc_uniscr_free(new_uniscr); + return err; + } + +-- +2.20.1 + -- 2.47.3