Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp347496pxj; Thu, 20 May 2021 10:40:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLj1duVHzAS4ZoSSwPNn5GTXG7c72uE0xruC+eZKyubp9lxQl9YJePQf7hSVIebyS+UsDd X-Received: by 2002:a50:9f6b:: with SMTP id b98mr6300689edf.318.1621532404882; Thu, 20 May 2021 10:40:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621532404; cv=none; d=google.com; s=arc-20160816; b=ZkruvtgBtKWk8J2eueYPQeavczto5JoCcqFZW1JUuAs4l/pBaWY1QeaNiwje/3hFFp F4Z0wK8fpGpP4tkEgzx7FwCrULFd8LztDVTvE2R9SR+j22gXHnwUZC6QFbZrxsurhz+k 06l5N+6KuMWkO0dTfOlupjd0zACdPKC2ypvMVN48ZvJ6lXuTqYeLpzcdDKSn5k50zMfP qdluYikAGn7vxNdI1/6OZAAhTG/Kl86N3xdtWlsEOseuss3PQjx+MZ6qfKBQvPkZsJjd nOn//+qCVvO2gISeqZaD41eauwTYwIve6yWwpIQjujEY4dpX7A+T0DkWmkYYqZc94jkM ociA== 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=AV4beEWrvhYXvJp/7Kj4N0ITu/zEmtkYcIwEOEi+gpI=; b=omAvZFG0AzKk7nJubV9dv5yIIEgaE2F6ddCNA1uDleudWCL9wo6Hha3Q/A3wwiID9k YCcK9bI35SSKyX/oUm6d5kH9Xe6mTCe8aewS1BDwVRKvLX/fzy3rzZPdlv3IABnVWwbQ OEzgBQDkktc5iNjFWgJ8hbp2ahscnRRgnUcaKZmqL8g6QAZEelcUP/tjd8w1Pl5Vzu/7 kjZnZJ2aXzd3UnjeUSy0+OW49fRKo6IR7+wbGjKfBQfPnAqFTRpS3xlluhzthPNWIy48 g141Vn53uIuGL9N3Ut2WeM+NmjJHKA356PsxmP+HL37cPn1UE4ZvzPhX3FMzWUTboCBp HIjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hfK9wu3I; 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 w10si116365edq.435.2021.05.20.10.39.41; Thu, 20 May 2021 10:40:04 -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=hfK9wu3I; 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 S235577AbhETKHV (ORCPT + 99 others); Thu, 20 May 2021 06:07:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:37248 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235047AbhETKBx (ORCPT ); Thu, 20 May 2021 06:01:53 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E363661421; Thu, 20 May 2021 09:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503577; bh=w6JjWfvx0/KxablD9QkYLIjUpPO76ZMO4tRBlwAJeuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hfK9wu3IzD4K+DynlfiNuEzVA073a1oguXXsrMSxLPLDGYDLaPcf4ThNaqLhAtd7i YrInKZPtToVQo/AgqmXckMVuIP2mL3Ryd4tQOH+7+aOaas9xJYWfcriagkpIfnq/OF ODzBsEYNryXiQ5V6xFGsaBiBL4NpxK9+ud20Uwz8= 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 4.19 283/425] ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock Date: Thu, 20 May 2021 11:20:52 +0200 Message-Id: <20210520092140.746525449@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@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 04dc5714aa72..243887fdb343 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -465,6 +465,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