Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2555754pxf; Sun, 4 Apr 2021 05:59:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx42szW9UR0SNFBbq8pn4Jy7z+ybyJM+GGb3XTiAXHWREV5d/GH5RSV064ep+h8uCQkFSLc X-Received: by 2002:a17:907:7745:: with SMTP id kx5mr23424961ejc.3.1617541145140; Sun, 04 Apr 2021 05:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617541145; cv=none; d=google.com; s=arc-20160816; b=L1ioIioq3f9qga3u+I6STOFhzOqCsl4Fdh6C+J5JJAbvQvPBrY8xK3Zbqih3tW9UKz Tnk/qpd4BRRi5NEOU6pZpww39Fukho8Ugq7BPxurOCgSr1qwPHNlb4HHj53TZ1jGshYJ 7D0u1sJp9QFT/S6TLbGNIWLwLAmO+QbljMOYJNySdQfmNhYcbm1vQHhg6ud8c1NkgGeM pJCNIB0ByoTqMSjUIiitkroLC0RlavHyuvzoiIv4HkOyztyIFSszeJfei4NvtpM+rxhN TwK76GZA4d69xFDO5ZGOVKg7NztFLp9VfXZHFEBQaf03ZKZGSB2jBwIWOmdwWqaxfnT2 GMaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=jEMRUAMh/TKgCIXDHS1CDEDrjjZuYl9CfCWWxLqsKns=; b=oOrDMO1OBNkuQCTqVoa20i1WKICO5H+ZD2I5EPwwpvWkRg6hPJSMV+SQOOT99IHxL8 vKWwASGllxjk1vHjpaO2tXvV4S6WygGSNdWMLAKVD8MMPCxMp641Pk5huSnKerMA+sUO YR/BT6PpqzKqbVDQCQKTMteyjW6KCbRz9DZSA975M1RlAnMWvA56lwS1gkKzbDGmCCPv ZplexgVUDrmrrEqPwfS10P1xWG/zlwA9EHfL+B+6wD9bF1Lof2LG5T/7I6PiJ1xHtRUU elVhRzL+o2kF86hkOoaJz2mMi/vIlSQ1Wv9yoVVbuqdH+PNbrsBpZOu7RSXMUfrpkOet +OOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=oS1SMgll; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si3297881edc.419.2021.04.04.05.58.42; Sun, 04 Apr 2021 05:59:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@mg.codeaurora.org header.s=smtp header.b=oS1SMgll; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbhDDM4d (ORCPT + 99 others); Sun, 4 Apr 2021 08:56:33 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:16550 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbhDDM4c (ORCPT ); Sun, 4 Apr 2021 08:56:32 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1617540988; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=jEMRUAMh/TKgCIXDHS1CDEDrjjZuYl9CfCWWxLqsKns=; b=oS1SMgll6UzxQ3lwFuhmi7ZaIW8SXd/kZ4sEf7rJ3mqIY3kSARVH0KClK7YuAH4+0AGLbsfr cWatNGgKRBEjW1U2qVglf/n8koJJoMsl6vSCVClYFWdQZABlh6tSPNw8Jt2pqcG6Fe6h7ha6 XDlvT9vUe4qR37Y3tE6YPwcGwzQ= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 6069b77be0e9c9a6b6167890 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sun, 04 Apr 2021 12:56:27 GMT Sender: pradeepc=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 39314C433ED; Sun, 4 Apr 2021 12:56:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: pradeepc) by smtp.codeaurora.org (Postfix) with ESMTPSA id 97C80C433CA; Sun, 4 Apr 2021 12:56:26 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 04 Apr 2021 05:56:26 -0700 From: Pradeep Kumar Chitrapu To: Karthikeyan periyasamy Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, John Crispin , pradeepc=codeaurora.org@codeaurora.org Subject: Re: [PATCH V8 1/3] ath11k: switch to using ieee80211_tx_status_ext() In-Reply-To: <183cd636909cec0b8d20da8515c146ab@codeaurora.org> References: <1616105397-1482-1-git-send-email-pradeepc@codeaurora.org> <1616105397-1482-2-git-send-email-pradeepc@codeaurora.org> <183cd636909cec0b8d20da8515c146ab@codeaurora.org> Message-ID: X-Sender: pradeepc@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-03-18 22:31, Karthikeyan periyasamy wrote: >> - ieee80211_tx_status(ar->hw, msdu); >> + spin_lock_bh(&ab->base_lock); >> + peer = ath11k_peer_find_by_id(ab, ts->peer_id); >> + if (peer) { >> + arsta = (struct ath11k_sta *)peer->sta->drv_priv; >> + status.sta = peer->sta; >> + status.skb = msdu; >> + status.info = info; >> + status.rate = &arsta->last_txrate; > > Assigning arsta holded last_txrate pointer to status.rate create race > condition problem b/w sta delete and ieee80211_tx_status_ext, no ? > Hw we ensure that arsta pointer is valid until > ieee80211_tx_status_ext() processing? > > Instead why don't we have local struct rate_info and assign like below > code snippet > > struct rate_info rate; > ... > rate = arsta->last_txrate; > status.rate = &rate; > > Thanks, > Karthikeyan P Thanks Karthikeyan, I have addressed this in V9..