Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3706549pxb; Mon, 24 Jan 2022 15:56:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgNziBMOfBURZElQlHvhx5kq20dF6CdpkmxSIQ9GFdPQRLwtwJleUjgNOwg3Hj6UTi7QNk X-Received: by 2002:a62:7ecb:0:b0:4c8:6137:6f39 with SMTP id z194-20020a627ecb000000b004c861376f39mr9257133pfc.43.1643068470532; Mon, 24 Jan 2022 15:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643068470; cv=none; d=google.com; s=arc-20160816; b=sEKANYDU+UvI2mY/JukbTuSg0qdH3Zc2uENufPSb64W3K3m6s6q0AN9CTEMEtk6QrO xEM6nj/tn+DTMhHtFPShfuRKhPLkrV3zm0QSnxzBCXucatfjoSA6A2EozXFQW9HFMVUQ i0343bptv0JULItboyH88+mgnsR8TDnKnSYFJpJRSxkIZyzjC5LL+jXQ62SYY6JIXYVT 1kJFA6tRwYbpnqw2EGO3Hn7BSbHruQyxswQshyNh3ENX4c9njUaLjSx/YgOywCt4DigJ o18S0rLZRzqSvXoBfwi+jfstWfxExbsaJYW2fUY/n7DeInlkem/B31mpn+OwlgYisO+6 KpZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kCk3WFalzcrLv5KHg284W8bm6Vc1gTOsqBFu9P1jbQ4=; b=Sg+dTZAJP/f2lPgdgkVAmYtgMlRKyKQ35SqtmcGlRgySGHMAp4X4XMqi+nkuQhB1xe EBjnXI0EuHmLJ6/JDzEnl6LmOxC5lW8kUrZ1am65EBoIA/FpIaV4nCxrx5RCvO355GmJ /1zjw4oVUnDvd2r7R3tutxc0omozOLjNdBpNw5DyN3PQbfvVYwGCgvJbCITomEZQq8x/ CatybOmIgIJZUW+k8b56tlBBiQXw2zAdDVStjk2z1EvsSp9PsULbm3/fQVOfGOXG2suW lBNsNhO420DOpsmlZbJGcnajBLbqCqQh3m+wH1AXKYoj3FnK+RhWR6yIRsAWnumEw720 H8AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JkKVHWzO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si14018569pgb.149.2022.01.24.15.54.18; Mon, 24 Jan 2022 15:54:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JkKVHWzO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2364789AbiAXXtF (ORCPT + 99 others); Mon, 24 Jan 2022 18:49:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1582435AbiAXWro (ORCPT ); Mon, 24 Jan 2022 17:47:44 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30D14C058C96; Mon, 24 Jan 2022 13:06:49 -0800 (PST) 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 B1E7B61445; Mon, 24 Jan 2022 21:06:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9180DC340E5; Mon, 24 Jan 2022 21:06:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058408; bh=WdeP14lQcT211iQn/z2o5VGDSh3Z+nRsba1nDaLWiWI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JkKVHWzOuYu7A9FcXK6Iklwvz6usuX2jvawyRnSzrxRwI0BnUCbZAUSJjSLzaPL/B IM9oivmd8ZJadaqb7CNX4MPEJrg5TW4fr55ITcgV6FlXHh6GdBaZlvgcJM17M7n8c4 VrVr5VBf0e1gE/kOyfXasJOfANlFRPgwBFy1ydaA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rameshkumar Sundaram , Kalle Valo , Sasha Levin Subject: [PATCH 5.16 0280/1039] ath11k: Fix deleting uninitialized kernel timer during fragment cache flush Date: Mon, 24 Jan 2022 19:34:29 +0100 Message-Id: <20220124184134.699382002@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rameshkumar Sundaram [ Upstream commit ba53ee7f7f38cf0592b8be1dcdabaf8f7535f8c1 ] frag_timer will be created & initialized for stations when they associate and will be deleted during every key installation while flushing old fragments. For AP interface self peer will be created and Group keys will be installed for this peer, but there will be no real Station entry & hence frag_timer won't be created and initialized, deleting such uninitialized kernel timers causes below warnings and backtraces printed with CONFIG_DEBUG_OBJECTS_TIMERS enabled. [ 177.828008] ODEBUG: assert_init not available (active state 0) object type: timer_list hint: 0x0 [ 177.836833] WARNING: CPU: 3 PID: 188 at lib/debugobjects.c:508 debug_print_object+0xb0/0xf0 [ 177.845185] Modules linked in: ath11k_pci ath11k qmi_helpers qrtr_mhi qrtr ns mhi [ 177.852679] CPU: 3 PID: 188 Comm: hostapd Not tainted 5.14.0-rc3-32919-g4034139e1838-dirty #14 [ 177.865805] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) [ 177.871804] pc : debug_print_object+0xb0/0xf0 [ 177.876155] lr : debug_print_object+0xb0/0xf0 [ 177.880505] sp : ffffffc01169b5a0 [ 177.883810] x29: ffffffc01169b5a0 x28: ffffff80081c2320 x27: ffffff80081c4078 [ 177.890942] x26: ffffff8003fe8f28 x25: ffffff8003de9890 x24: ffffffc01134d738 [ 177.898075] x23: ffffffc010948f20 x22: ffffffc010b2d2e0 x21: ffffffc01169b628 [ 177.905206] x20: ffffffc01134d700 x19: ffffffc010c80d98 x18: 00000000000003f6 [ 177.912339] x17: 203a657079742074 x16: 63656a626f202930 x15: 0000000000000152 [ 177.919471] x14: 0000000000000152 x13: 00000000ffffffea x12: ffffffc010d732e0 [ 177.926603] x11: 0000000000000003 x10: ffffffc010d432a0 x9 : ffffffc010d432f8 [ 177.933735] x8 : 000000000002ffe8 x7 : c0000000ffffdfff x6 : 0000000000000001 [ 177.940866] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 00000000ffffffff [ 177.947997] x2 : ffffffc010c93240 x1 : ffffff80023624c0 x0 : 0000000000000054 [ 177.955130] Call trace: [ 177.957567] debug_print_object+0xb0/0xf0 [ 177.961570] debug_object_assert_init+0x124/0x178 [ 177.966269] try_to_del_timer_sync+0x1c/0x70 [ 177.970536] del_timer_sync+0x30/0x50 [ 177.974192] ath11k_peer_frags_flush+0x34/0x68 [ath11k] [ 177.979439] ath11k_mac_op_set_key+0x1e4/0x338 [ath11k] [ 177.984673] ieee80211_key_enable_hw_accel+0xc8/0x3d0 [ 177.989722] ieee80211_key_replace+0x360/0x740 [ 177.994160] ieee80211_key_link+0x16c/0x210 [ 177.998337] ieee80211_add_key+0x138/0x338 [ 178.002426] nl80211_new_key+0xfc/0x258 [ 178.006257] genl_family_rcv_msg_doit.isra.17+0xd8/0x120 [ 178.011565] genl_rcv_msg+0xd8/0x1c8 [ 178.015134] netlink_rcv_skb+0x38/0xf8 [ 178.018877] genl_rcv+0x34/0x48 [ 178.022012] netlink_unicast+0x174/0x230 [ 178.025928] netlink_sendmsg+0x188/0x388 [ 178.029845] ____sys_sendmsg+0x218/0x250 [ 178.033763] ___sys_sendmsg+0x68/0x90 [ 178.037418] __sys_sendmsg+0x44/0x88 [ 178.040988] __arm64_sys_sendmsg+0x20/0x28 [ 178.045077] invoke_syscall.constprop.5+0x54/0xe0 [ 178.049776] do_el0_svc+0x74/0xc0 [ 178.053084] el0_svc+0x10/0x18 [ 178.056133] el0t_64_sync_handler+0x88/0xb0 [ 178.060310] el0t_64_sync+0x148/0x14c [ 178.063966] ---[ end trace 8a5cf0bf9d34a058 ]--- Add changes to not to delete frag timer for peers during group key installation. Tested on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01092-QCAHKSWPL_SILICONZ-1 Fixes: c3944a562102 ("ath11k: Clear the fragment cache during key install") Signed-off-by: Rameshkumar Sundaram Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1639071421-25078-1-git-send-email-quic_ramess@quicinc.com Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath11k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 821332cbeb5de..67be109eda910 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -3452,7 +3452,7 @@ static int ath11k_mac_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, /* flush the fragments cache during key (re)install to * ensure all frags in the new frag list belong to the same key. */ - if (peer && cmd == SET_KEY) + if (peer && sta && cmd == SET_KEY) ath11k_peer_frags_flush(ar, peer); spin_unlock_bh(&ab->base_lock); -- 2.34.1