Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4630740pxj; Wed, 12 May 2021 09:37:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRuaB0hAd9D/gySKyWaDyAdrGezCQ6dMZ9cvnDx442/IM9Jp3kiuJT6ymrqIpEFxE+DVH1 X-Received: by 2002:a05:6830:825:: with SMTP id t5mr31317290ots.297.1620837429966; Wed, 12 May 2021 09:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837429; cv=none; d=google.com; s=arc-20160816; b=M6LECF3Fv3vzzMoSR3EzeXh/Tzn8Iip/N08dGRTTYNskbalONp0xHdyV05afsRf1QO PHyFfg8pQy/ClVywCycQSgmQQYvOtyIZA4PRx3Exyy/9sTH4Rop8uoCvzWt7R48Wm1wa Bw1mlPsLiopstmGosWRUIYdUnbTr+N6Pq8gyIfOalZAOqc58Hnj3na/qnHBwzfrlkIMw ptTZQRg0ltOy1Da/Sp1kSuoTXW8rMnicTygVnK8CSoBZCgBwNxvf8E9rjcihqvpbVzB8 NffYFLLcy/cFwu/FXxR3YO4EndLeaJ80RIVQ1i78CVM+ahlkBh8JyiHRtQYgbWgbV9D1 XsOQ== 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=lAgKR/g7hVmjl0H28AiYWPfrKhdnxDXX8uxmlRjo0m8=; b=dVfCQaF/kZUXeQxEYSohfkGmfHOrEJCb9qq/cx/nh+F+7H11w8sQQczuFmbRjZN8U4 +4u9IzKULEL/ag/uZgjaVrasApM8K+4FEovs5xUOxPpF7L5rAKmlcFsekP8rtKfsa2Dr gquLuNob4AUwWwkolTO0FDOKSPGSvvZHvJUCzP+CEGq10RZrKFm5okEPrQYc2lCjeFvr goFoTv5pXARod4tvKmTYlh2ZtWGfzxjqXXmorz2RIbalKxJ5dePUrVdKCHmqEZ1yfF3/ IJNesvqkJCuJBGQF3eDCa6uAFLg7SdIlJbvjrqxZ2Sv3vFk3NYmjeiLO5GDjpiOe4Vye NbRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cl8Jxvdf; 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 u141si423576oif.255.2021.05.12.09.36.56; Wed, 12 May 2021 09:37:09 -0700 (PDT) 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=Cl8Jxvdf; 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 S242809AbhELQfy (ORCPT + 99 others); Wed, 12 May 2021 12:35:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:42208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234846AbhELPn0 (ORCPT ); Wed, 12 May 2021 11:43:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BA79D61C8C; Wed, 12 May 2021 15:22:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832947; bh=JiSwBk7n+z9UDxHWijuW9vbtAqoFPPUFO5JE7rJFJas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cl8JxvdfPOuvw5NgmQXz1yCfhneq0OQloktIrdeQykdhWmjFup5Sk0014CSqo8EEx l4/z4rT0BsRkY31J0wivupO3vacQ+q0LSHHZRNAG+F7oBS+PUQZbB4hgIVb4USJcj6 jdHdFGp8Ah2YYnduLCrRpQex2jC/1+Pl7O95pbJI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Machek , Shuah Khan , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 488/530] ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock Date: Wed, 12 May 2021 16:49:58 +0200 Message-Id: <20210512144835.794461810@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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: Shuah Khan [ Upstream commit eaaf52e4b866f265eb791897d622961293fd48c1 ] ath10k_wmi_tlv_op_pull_peer_stats_info() could try to unlock RCU lock winthout locking it first when peer reason doesn't match the valid cases for this function. Add a default case to return without unlocking. Fixes: 09078368d516 ("ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()") Reported-by: Pavel Machek Signed-off-by: Shuah Khan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210406230228.31301-1-skhan@linuxfoundation.org Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index e7072fc4f487..4f2fbc610d79 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -592,6 +592,9 @@ static void ath10k_wmi_event_tdls_peer(struct ath10k *ar, struct sk_buff *skb) GFP_ATOMIC ); break; + default: + kfree(tb); + return; } exit: -- 2.30.2