From nobody Mon Sep 8 08:59:05 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE4ABC54EE9 for ; Tue, 13 Sep 2022 14:56:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234730AbiIMO4K (ORCPT ); Tue, 13 Sep 2022 10:56:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234493AbiIMOw1 (ORCPT ); Tue, 13 Sep 2022 10:52:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C78072691; Tue, 13 Sep 2022 07:26:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DDA6D614D9; Tue, 13 Sep 2022 14:26:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF0CCC433D6; Tue, 13 Sep 2022 14:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663079196; bh=6dg7wJM+9nVt3Tpc611yRQluapQBqk4vI5Av4ksEclA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dL2GIT/1OGtlEODVwzZvgrLynDRC5M2UoY9Ze5ca/dRSiCWeSe0EIWAvKAzT+MekM ilQlU/1Ub2v4jPuE3ChlPw6YXEYdGe/wHkwlQKEC4Tijs/N6d35NLL78SXeHQQRwGX o5MGRJsYOpw8MxDP6y9BtzAZ52WOANcBsxleSswg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mika Westerberg Subject: [PATCH 5.4 041/108] thunderbolt: Use the actual buffer in tb_async_error() Date: Tue, 13 Sep 2022 16:06:12 +0200 Message-Id: <20220913140355.408028920@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140353.549108748@linuxfoundation.org> References: <20220913140353.549108748@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 no= tifications") 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 @@ -388,7 +388,7 @@ static void tb_ctl_rx_submit(struct ctl_ =20 static int tb_async_error(const struct ctl_pkg *pkg) { - const struct cfg_error_pkg *error =3D (const struct cfg_error_pkg *)pkg; + const struct cfg_error_pkg *error =3D pkg->buffer; =20 if (pkg->frame.eof !=3D TB_CFG_PKG_ERROR) return false;