Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3693773ybv; Mon, 10 Feb 2020 04:50:36 -0800 (PST) X-Google-Smtp-Source: APXvYqyD0aq3zSEdgslQnA9+F2p4Q8GpPCw4YWnSi/e2FYjXR54mHlv8nqGJ6nAprUnukhRYZfkG X-Received: by 2002:aca:ddc2:: with SMTP id u185mr739637oig.24.1581339036065; Mon, 10 Feb 2020 04:50:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339036; cv=none; d=google.com; s=arc-20160816; b=RKsonGxD7zEdlJpPWfjkLkP9b4i0GLBipVTmNAeujDp0hxFtFB7W/fMt2c1z68fYCf fQZa1Klkqp8O/R/Yd3m2IqeHVa2Y6oU8zVwHVdBJBodOq0Iw7Bm8EqLfj/+68VpcetBP xWrXktGdeAhL0BeYgrBTIqNg3WzmKqhjqyS9KOaDrCo6LUoskaOSISByOkHelRphEvNd 7Ykx9c31IdpH+8JfR+j6yj05YqK6lffj+P/Zv9vXEvIZzUZiAI7ZN6fwRLy+64588WYf 8ZpHJymI/oIN0PuzN8e7GX2ED52ZpHozkNY4eMrXcgF+9VTokxzWWZx3BFvGSsLsCTV8 wMPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mk/mmOpQCPk3FmLfzvXoxzn7kpp4FnX66O20je3NK+k=; b=Txcde2jzEaW6YNlNzYPVM4Uy25gTc8CnQzTGPYwgJ6l4aLoh000VU/BDpX3fCZPAXC 3tPKGjapCFgeTmuhrUW0u552ylN/A+Ga4tsYmuk2P2Sl2BwPDwjIbUNCjcSWorg6mTNx GK338lff+W2v/PQ7ec+o0vScIgtmnRuOGgXUYALK0qKuObPQruLqpKfAOzu+368HoonH hb/bEtJ01P33atomr9Iq9RnksHRJTc2Mab0GIqg86n/cl41sv3V52CcTRtKl2bDM298s ngUhZPhI7m01wce56lBcng2gfuSmq/DjvuqXx+Bmgdu00Y37aFPOdRFV71sKOEMlm91j Nk/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UjD7esXj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 s20si157482otp.4.2020.02.10.04.50.24; Mon, 10 Feb 2020 04:50:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UjD7esXj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730502AbgBJMqC (ORCPT + 99 others); Mon, 10 Feb 2020 07:46:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:43130 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729656AbgBJMlR (ORCPT ); Mon, 10 Feb 2020 07:41:17 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F70E208C4; Mon, 10 Feb 2020 12:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338476; bh=L4r5YMKdPeOtPohxU0GhCvCY682DwqDYJCwck78rRGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UjD7esXjl1vu/cqtLZi5aKjt97w3y2zQ32s6R0x/v+2URtljbz/ntl6VwmQ7hpKcr Ll8ycZL/jgzve4UutVzgW+mVSbn3IOY5A1wTH87kAYVzZZyFiX50JgXs2zqOUexHVQ Flx+xQLzpbs4o/rQ65j1mVkgzXB9nfxREWpGo0fQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, huangwen , Ganapathi Bhat , Brian Norris , Kalle Valo Subject: [PATCH 5.5 207/367] mwifiex: fix unbalanced locking in mwifiex_process_country_ie() Date: Mon, 10 Feb 2020 04:32:00 -0800 Message-Id: <20200210122443.530864100@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brian Norris commit 65b1aae0d9d5962faccc06bdb8e91a2a0b09451c upstream. We called rcu_read_lock(), so we need to call rcu_read_unlock() before we return. Fixes: 3d94a4a8373b ("mwifiex: fix possible heap overflow in mwifiex_process_country_ie()") Cc: stable@vger.kernel.org Cc: huangwen Cc: Ganapathi Bhat Signed-off-by: Brian Norris Acked-by: Ganapathi Bhat Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c @@ -232,6 +232,7 @@ static int mwifiex_process_country_ie(st if (country_ie_len > (IEEE80211_COUNTRY_STRING_LEN + MWIFIEX_MAX_TRIPLET_802_11D)) { + rcu_read_unlock(); mwifiex_dbg(priv->adapter, ERROR, "11D: country_ie_len overflow!, deauth AP\n"); return -EINVAL;