Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp110110ybv; Tue, 4 Feb 2020 17:25:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyJoftuyYSPld2Z0PfA/cwHDMvAcBD3F5vTEwNbMzWwbQpFsoh4y1eaNVa5z3ooUVEfcqJe X-Received: by 2002:aca:2407:: with SMTP id n7mr1329947oic.14.1580865937036; Tue, 04 Feb 2020 17:25:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580865937; cv=none; d=google.com; s=arc-20160816; b=rigOIMpApxzgEdw/Vs7hbZCcI80L7TSMPi81i53v0u0UdZCyf3QNEDeivPIFXvwa70 Od8K0m5M1XlKmO26Z16Z1OZMCzD8SJjUGxEf23Vi9xDJ6VV1K15DQOe2gh8D4CGvi+aX PXDR85Nl5c5KWs34FASPK6fpZwsypvhA6mGDVN9yu94eSNJnXqClNadV7CHONAC9XKYd ljm7mlycmEr4ddUmLGKFEM7hyQ/RdIBumvrssZGyJiy4T04frg0TVjAcHNHHE61qVHDn DS9Eq6oj8UssWqlJXKSbatgaqxuVroC4Kz/vN+2b0at89sX7gSmG1gDHnnXJBJ41asws DAWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=nvU8Bm7e64yia8HQ3RtvUNluoAWYe9/80/taN/q3odc=; b=MNtBJOn/ZKUNPi0/z/b8958cF5nq+702sZEYlnkWj7dqW6lhC6tB5gw3AtnMV3W40o 94pnNOugBpfPgTVp5zAJD+cKtseJ2nHO75SQtle0Q0R3kVPmEgKRLpYggN+a+fYiahKv ANbHNgbhFrOGvLAo2c/UrUjhIefVMQs6iRFyFaKxTnBwgWvF697XEF3sLt3UoKhUqKDj 3pQoTMXknd7UvH63M5t9N0ScVdM/m5nrzHO02WLUqOOL8WB7NHJHcBDP2K+XAKJA0Xzn Bd2GpQCV7XEvnGSnGAPysiHeN/+EVTSqnLgIRW8FPm8PLebqS+ZNr/KzM09F7gJM9EpM cJbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=niZal6Mm; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6si12769627oth.26.2020.02.04.17.25.24; Tue, 04 Feb 2020 17:25:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=niZal6Mm; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727758AbgBEBWo (ORCPT + 99 others); Tue, 4 Feb 2020 20:22:44 -0500 Received: from mail25.static.mailgun.info ([104.130.122.25]:47055 "EHLO mail25.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727745AbgBEBWo (ORCPT ); Tue, 4 Feb 2020 20:22:44 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1580865763; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=nvU8Bm7e64yia8HQ3RtvUNluoAWYe9/80/taN/q3odc=; b=niZal6Mmzcp1n4k0yzGgUvNORL0dPDHeCYYf00WWRsKju2SlJ5Gu/fhngHZavCYivG3by9rh BGMj5fBekrX+/G+qVaxYNYdPQF0+9zqIv3fJX5nHzr/xV+BGVvAn3+jJfgA+GiiVSHQfRdCY O0IWGS2GvB/PKX+U+VnaY5xwc8I= X-Mailgun-Sending-Ip: 104.130.122.25 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 mxa.mailgun.org with ESMTP id 5e3a18e0.7effc153fa40-smtp-out-n02; Wed, 05 Feb 2020 01:22:40 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 9A5CDC433CB; Wed, 5 Feb 2020 01:22:39 +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=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from CHECSTP284781-LIN.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: periyasa) by smtp.codeaurora.org (Postfix) with ESMTPSA id 59258C43383; Wed, 5 Feb 2020 01:22:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 59258C43383 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=periyasa@codeaurora.org From: Karthikeyan Periyasamy To: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Karthikeyan Periyasamy Subject: [PATCH] ath11k: fix rcu lock protect in peer assoc confirmation Date: Wed, 5 Feb 2020 06:52:28 +0530 Message-Id: <1580865748-31286-1-git-send-email-periyasa@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org ath11k_mac_get_ar_by_vdev_id() get protected under rcu lock and unlock. peer association confirmation event get used this API without rcu protection, so corrected it. Signed-off-by: Karthikeyan Periyasamy --- drivers/net/wireless/ath/ath11k/wmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index a9b301c..9cbe038d 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -5345,15 +5345,18 @@ static void ath11k_peer_assoc_conf_event(struct ath11k_base *ab, struct sk_buff "peer assoc conf ev vdev id %d macaddr %pM\n", peer_assoc_conf.vdev_id, peer_assoc_conf.macaddr); + rcu_read_lock(); ar = ath11k_mac_get_ar_by_vdev_id(ab, peer_assoc_conf.vdev_id); if (!ar) { ath11k_warn(ab, "invalid vdev id in peer assoc conf ev %d", peer_assoc_conf.vdev_id); + rcu_read_unlock(); return; } complete(&ar->peer_assoc_done); + rcu_read_unlock(); } static void ath11k_update_stats_event(struct ath11k_base *ab, struct sk_buff *skb) -- 1.9.1