Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp768164ybl; Wed, 11 Dec 2019 07:14:23 -0800 (PST) X-Google-Smtp-Source: APXvYqz7QF3UV8xHjaO9I/M4p8NsrGq2hMpxccSrlSkfUnxibbBtbZLKwcOKuBLukHPBf+Hc8Rr1 X-Received: by 2002:a05:6808:681:: with SMTP id k1mr3252363oig.117.1576077263364; Wed, 11 Dec 2019 07:14:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576077263; cv=none; d=google.com; s=arc-20160816; b=nVQHi6GXvrf58BFrcr0fFR14sQ2dQF8B3QgwI9LNFsF4a8ZV+c+lL+6L6CYuSG6wFq DxNmtL3fDtdJPaTeg14XOWzCFBphQf7roCf0c9HQnagd3xEX+R9FH04saoO7+mDAnT3v d1Fecr9lN/0AVMTjtLCNx9cYQR6CTOZZu8v9U2mKOJVb/Im9E9CMVreMTqEMffbbM739 U1lkz+ypdiR5et8coRnbIBt7FnXFEJFGys95Xf4shzr0tiApIXt1SE7vvNsn9YtNnr0V N1N3kgfj9JiZM9aipuEiksLZExJxOh6mzuO/sod6pp7C734OomvatWOR6ztw0dP+kXrj cYBQ== 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=wuuz28bCM4g5yCLPTMjb6F2S5uhm5d1egAnufj+AWuY=; b=X3vzqAzllNa0td4c/nNiskDnq2WP0D+BZeG0fIOQMsh9we1aEFnFh9G/nQBhATDM0b 6Hj568Xpay2uYqXf+RYnOIic1CZ6Dkq719Zx1RMsI9j4iPx2m+IqQ0rnnToobGbNXMcI I6FIoUZJtURjBIutAbAKgqk2VeNtFoFfqvGOHgD8zYlC0aBT6G8fqMkaKwPMDijdLbGw czEcY7vrNkVrzBuQ27/I09f7gug2fBzL9dEuXaYu7OmPFj7g8MaBmOyqbHJYbKMNuyMc 1+5LOV3GTCSE1eJFnj5NKmqQuvyNPftk/5d0DKReZeM2sH8uPT62veMfZkH5KIXiocWS P8zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=q268eQD+; 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 k130si1227940oih.135.2019.12.11.07.14.11; Wed, 11 Dec 2019 07:14:23 -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=q268eQD+; 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 S1730557AbfLKPLU (ORCPT + 99 others); Wed, 11 Dec 2019 10:11:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:59878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729797AbfLKPLU (ORCPT ); Wed, 11 Dec 2019 10:11:20 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 566C12465A; Wed, 11 Dec 2019 15:11:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576077079; bh=1zkA7yqeQ2Mxa55z37h26z1TWshV0LM+nelUIVNp/Uc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q268eQD+YwKYzym9llRmHJU5Gr54qldRpJYXqRRfYyxe8fHWzjgbUlyg6Al3MVJUB SrfG5VswZnJvhD/CujdwLyzXFeY9N7hLzwoaUArhUyKgJN/RJuntYOhvlpnWlNmEDL Ao1A0EbFXIoO2kOs3MvdDaJedRZFdDNz2X9CINss= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Navid Emamdoost , Kalle Valo Subject: [PATCH 5.3 001/105] rsi: release skb if rsi_prepare_beacon fails Date: Wed, 11 Dec 2019 16:04:50 +0100 Message-Id: <20191211150221.978611813@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191211150221.153659747@linuxfoundation.org> References: <20191211150221.153659747@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore 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: Navid Emamdoost commit d563131ef23cbc756026f839a82598c8445bc45f upstream. In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should be released. Signed-off-by: Navid Emamdoost Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c @@ -1756,6 +1756,7 @@ static int rsi_send_beacon(struct rsi_co skb_pull(skb, (64 - dword_align_bytes)); if (rsi_prepare_beacon(common, skb)) { rsi_dbg(ERR_ZONE, "Failed to prepare beacon\n"); + dev_kfree_skb(skb); return -EINVAL; } skb_queue_tail(&common->tx_queue[MGMT_BEACON_Q], skb);