From 6b2f99bb672c8ffc5f423728d8b3bfcb422a08d7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 6 Sep 2022 12:04:12 +0200 Subject: [PATCH] 4.19-stable patches added patches: thunderbolt-use-the-actual-buffer-in-tb_async_error.patch --- queue-4.19/series | 1 + ...-the-actual-buffer-in-tb_async_error.patch | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 queue-4.19/thunderbolt-use-the-actual-buffer-in-tb_async_error.patch diff --git a/queue-4.19/series b/queue-4.19/series index 177322583c5..ef76f375fe5 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -22,3 +22,4 @@ revert-clk-core-honor-clk_ops_parent_enable-for-clk-.patch clk-core-fix-runtime-pm-sequence-in-clk_core_unprepa.patch input-rk805-pwrkey-fix-module-autoloading.patch hwmon-gpio-fan-fix-array-out-of-bounds-access.patch +thunderbolt-use-the-actual-buffer-in-tb_async_error.patch diff --git a/queue-4.19/thunderbolt-use-the-actual-buffer-in-tb_async_error.patch b/queue-4.19/thunderbolt-use-the-actual-buffer-in-tb_async_error.patch new file mode 100644 index 00000000000..99f78c2cecc --- /dev/null +++ b/queue-4.19/thunderbolt-use-the-actual-buffer-in-tb_async_error.patch @@ -0,0 +1,31 @@ +From eb100b8fa8e8b59eb3e5fc7a5fd4a1e3c5950f64 Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Fri, 29 Apr 2022 17:10:17 +0300 +Subject: thunderbolt: Use the actual buffer in tb_async_error() + +From: Mika Westerberg + +commit eb100b8fa8e8b59eb3e5fc7a5fd4a1e3c5950f64 upstream. + +The received notification packet is held in pkg->buffer and not in pkg +itself. Fix this by using the correct buffer. + +Fixes: 81a54b5e1986 ("thunderbolt: Let the connection manager handle all notifications") +Cc: stable@vger.kernel.org +Signed-off-by: Mika Westerberg +Signed-off-by: Greg Kroah-Hartman +--- + drivers/thunderbolt/ctl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/thunderbolt/ctl.c ++++ b/drivers/thunderbolt/ctl.c +@@ -387,7 +387,7 @@ static void tb_ctl_rx_submit(struct ctl_ + + static int tb_async_error(const struct ctl_pkg *pkg) + { +- const struct cfg_error_pkg *error = (const struct cfg_error_pkg *)pkg; ++ const struct cfg_error_pkg *error = pkg->buffer; + + if (pkg->frame.eof != TB_CFG_PKG_ERROR) + return false; -- 2.47.3