From patchwork Fri Jun 10 09:01:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Ma X-Patchwork-Id: 1641759 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=ZPfstXve; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LKFLv0hS5z9s5V for ; Fri, 10 Jun 2022 19:01:25 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nzaW1-0001Xv-Gf; Fri, 10 Jun 2022 09:01:13 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nzaVz-0001Xn-GL for kernel-team@lists.ubuntu.com; Fri, 10 Jun 2022 09:01:11 +0000 Received: from localhost.localdomain (unknown [222.129.35.96]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 688673F1AD for ; Fri, 10 Jun 2022 09:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1654851671; bh=aOfEKH34w+/Ln9XxIY9s8g3E1qre7BPcfDMEbDiGJto=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=ZPfstXvewA1MhhuQDUirOYIXMStBxx4R59OsTvHMSJa71xtSatZBTW9qngCYuyNO/ 6wzpTh6GTQW1MHb3Unz82qrVB99aSEOnT6BFZKs+qSPp9g3G27gM7YPFWpOJaexpDW E+VBN2fKGwJXA2afcszZEc9XXSG0gEsnqlM4bhIhvTbXMq7WXYG+r8YpF4/kb7lYrv npmI7F+HszWZI3MAuN1SDkwXn+omlM7TPJCIQM1jDMMH9068shRyc1P9nsU4iyagOw SLK5JLT31pcxh2H+ZuGsd5dftav1anJKPGmlytw1WJJSfQHh0kXaRFoyAT1GV7OBWK R7tZgUHCsEeKA== From: Aaron Ma To: kernel-team@lists.ubuntu.com Subject: [SRU][Jammy/OEM-5.17][PATCH 0/1] Fix calltrace in mac80211 Date: Fri, 10 Jun 2022 17:01:01 +0800 Message-Id: <20220610090102.323501-1-aaron.ma@canonical.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1978297 [Impact] When bootup Jammy kernel, it shows callrace: kernel: ================================================================================ kernel: UBSAN: invalid-load in /home/u/aaron/bionic/net/mac80211/status.c:1164:21 kernel: load of value 216 is not a valid value for type '_Bool' kernel: CPU: 9 PID: 0 Comm: swapper/9 Not tainted 5.15.36+ #12 kernel: Hardware name: LENOVO 21D2SIT061/21D2SIT061, BIOS N3GET30W (1.11 ) 05/27/2022 kernel: Call Trace: kernel: kernel: dump_stack_lvl+0x4a/0x5f kernel: dump_stack+0x10/0x12 kernel: ubsan_epilogue+0x9/0x45 kernel: __ubsan_handle_load_invalid_value.cold+0x44/0x49 kernel: ieee80211_tx_status_ext.cold+0x1e/0xb0 [mac80211] kernel: ? percpu_ref_kill_and_confirm+0xd0/0xd0 kernel: ? rht_key_get_hash.isra.0+0x19/0x20 [mac80211] kernel: ? sta_info_hash_lookup+0xac/0x100 [mac80211] kernel: ieee80211_tx_status+0x72/0xa0 [mac80211] kernel: ieee80211_tasklet_handler+0xa2/0xd0 [mac80211] kernel: tasklet_action_common.constprop.0+0xc0/0xf0 kernel: tasklet_action+0x22/0x30 kernel: __do_softirq+0xd9/0x2e3 kernel: irq_exit_rcu+0x8c/0xb0 kernel: common_interrupt+0x8a/0xa0 kernel: kernel: kernel: asm_common_interrupt+0x1e/0x40 kernel: RIP: 0010:cpuidle_enter_state+0xd9/0x620 kernel: Code: 3d b4 85 3d 5c e8 57 a7 6b ff 49 89 c7 0f 1f 44 00 00 31 ff e8 a8 b3 6b ff 80 7d d0> kernel: RSP: 0018:ffff9e2dc01f7e38 EFLAGS: 00000246 kernel: RAX: ffff8dfdb6870b00 RBX: ffff8df6c3ab6c00 RCX: 000000023cd33784 kernel: RDX: 000000023d103fa8 RSI: 000000023cd33784 RDI: 0000000000000000 kernel: RBP: ffff9e2dc01f7e88 R08: 000000023cd33d63 R09: 00000000000aae60 kernel: R10: 0000000000000004 R11: 071c71c71c71c71c R12: ffffffffa4ce65a0 kernel: R13: 0000000000000003 R14: 0000000000000003 R15: 000000023cd33d63 kernel: ? cpuidle_enter_state+0xc8/0x620 kernel: ? sched_clock_local+0x13/0x90 kernel: cpuidle_enter+0x2e/0x40 kernel: do_idle+0x203/0x2a0 kernel: cpu_startup_entry+0x20/0x30 kernel: start_secondary+0x12a/0x180 kernel: secondary_startup_64_no_verify+0xc2/0xcb kernel: kernel: ================================================================================ [Fix] The size of the status_driver_data field was not adjusted when the is_valid_ack_signal field was added. Adjust the struct size accordingly. [Test] Verified on hardware, no error. [Where problems could occur] Low risk, It may break wifi driver. Minor changes in title of "Copyright" when backport. Avraham Stern (1): mac80211: fix struct ieee80211_tx_info size drivers/net/wireless/ath/ath10k/txrx.c | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 2 +- drivers/net/wireless/ath/ath11k/dp_tx.c | 5 +++-- include/net/mac80211.h | 19 +++++++++++++++---- net/mac80211/status.c | 11 ++++++++--- 5 files changed, 28 insertions(+), 11 deletions(-) Acked-by: Tim Gardner Acked-by: Luke Nowakowski-Krijger