Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2772313imj; Mon, 11 Feb 2019 08:14:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IbM5tLPjqTNWOybFR7jDFMg+mhGTajZROdRJ80MKiOoAxtIORODESdMfC9Qm2Pdd9tF9XVE X-Received: by 2002:a63:981:: with SMTP id 123mr29639676pgj.444.1549901651319; Mon, 11 Feb 2019 08:14:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901651; cv=none; d=google.com; s=arc-20160816; b=bfgiCA2igEanZoIt96NQDoqexEvOFui9BtXSVzMfuCsRvVz9k+bsSHJ8YqYpvDOxpU 9n0P8OXoVrJjr83GVnQxUBY97tCUz3i68aesytzz6cNT1CyOU59vP2LA0CTrasFtZ4d4 hqPWse+1JBPGNCi5FCd9jT/iYlACVF4kPuWIOybLg4hZFo6Rk1cxM30Q8hb5wXDbPzsw 1WKhNelDDpzHi0RxYMdcpvalZ5kKSRfcu3D/uCncJ5YiwohoynJVDdXXrG58wx3vQIrq 5LgKqlJWuZhKAHulrokDHwYruSpEYsh3dCBcXqMgzTnJDr+Qpm16ZH855ttcOKJyUml6 JC8w== 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=eC1Y8MTbP54MXpHAu+I+a8wCRlHPYbai7xWPeT87wxk=; b=aKarifgGZiRXOkoXq9uip1SGjj0bzDcVo0Jv4UrcZn8DkYdap9WCgJOIkDtcajDUS6 DBJiVV+6igKVvtU0xyT3FHFttGgx2YzCU/1UEu1TaGErujVHbGmbz3EvJjywU9VdJpiB 90aTAIlJxIj6Q4sdrXjP+zla+iXWKXqeIMNAgobvZEg5QywqIWuVXdgXURsTaELktxwf JBUb3qhws2wmXg853Lqpv1Qu+H4YkSd3mvNk/nEcF/2A3gYe3qDeD58vMZgiPqgSYMoO uJ9ih22XBajxj6SNbVvl38RS9Pc25Q20PMVyrfa8firjI26FekM6e42Z255zn5yJxjNv nZLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1FM2+am8; 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 d87si6920538pfj.265.2019.02.11.08.13.52; Mon, 11 Feb 2019 08:14:11 -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=1FM2+am8; 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 S1728845AbfBKOWr (ORCPT + 99 others); Mon, 11 Feb 2019 09:22:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:55700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728826AbfBKOWn (ORCPT ); Mon, 11 Feb 2019 09:22:43 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 2F50220838; Mon, 11 Feb 2019 14:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549894962; bh=kPq9RmFpsouLies7BiScocOt/BTu0f9ohICoxVIMuTs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1FM2+am8Xji4L5t+uP2BZQMrx6iibDmxTheMAUimlHyNJHDE9tcp2NXrVC4w1cK7/ wsh0Cz8CZxzXDhZlRjB3XmV56dWMSKzVBUHF7K0NF+ar8QVFslwuBl8stuxrXkoz+t 034aELnKgVpZvGI2CJsWNq0UNm+U6A/ArJ6bxtPA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lior David , Maya Erez , Kalle Valo , Sasha Levin Subject: [PATCH 4.20 016/352] wil6210: fix memory leak in wil_find_tx_bcast_2 Date: Mon, 11 Feb 2019 15:14:03 +0100 Message-Id: <20190211141847.412358794@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 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 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 664497400c89a4d40aee51bcf48bbd2e4dc71104 ] A successful call to wil_tx_ring takes skb reference so it will only be freed in wil_tx_complete. Consume the skb in wil_find_tx_bcast_2 to prevent memory leak. Signed-off-by: Lior David Signed-off-by: Maya Erez Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/wil6210/txrx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/wil6210/txrx.c b/drivers/net/wireless/ath/wil6210/txrx.c index cc5f263cc965..005c4ba9e823 100644 --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c @@ -1403,6 +1403,8 @@ found: wil_dbg_txrx(wil, "BCAST DUP -> ring %d\n", i); wil_set_da_for_vring(wil, skb2, i); wil_tx_ring(wil, vif, v2, skb2); + /* successful call to wil_tx_ring takes skb2 ref */ + dev_kfree_skb_any(skb2); } else { wil_err(wil, "skb_copy failed\n"); } -- 2.19.1