Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1195080pxa; Thu, 20 Aug 2020 05:19:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYnxJ35e3nsbuOLx1M3qF7YBdEaHqxLMAPkhkKcGKKvyQ4i9ihop84v/lGpjrxoDyn7StR X-Received: by 2002:aa7:d54d:: with SMTP id u13mr2696928edr.356.1597925971893; Thu, 20 Aug 2020 05:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597925971; cv=none; d=google.com; s=arc-20160816; b=Vf5Pm5QoEKVcgrRfDd9b6Dh8y7wZh++LJcAnpOQevqz73bOqZXXh9UKdaFyn7GXWWh 3eXd5wUriTGuKWkzZ8jY8m4hPBNljkQ+9ModFpPdY5QuhdL+t7pn9M7PDykChtmMJGZ8 1YTDe+9WR76mzO7AjhpX/folC+HDqeg5YC5qGsQ/ca8/fSKXuIZLSUp1LItyoYqM1qgj iufb3RjWzzJd3rfru4GyhMU0ODv5yEKxvkqHvMuYqXx8AAfhtbqv+MzdNX98f3TUqBj7 47YezO6RD67kWnJ07MdFbMPINNwjaDuL+jETyzFiQ49TxxCEipCnnb1HLQdFLAAiUlOm uigQ== 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=KCUSBxOr+Kk2d8vxR7EM6jk4OtL47CrP1jp9hVb1LA0=; b=yAl++4rC4mprDe8yJojRKTEjv2zWUYwqoopcZqCiCkN0bleu3WfeSp/rwFHS4dR8wg iBMEfWJ4V2ZYstmvjOEJos1TEJWAertoLBRw65PbjM3UM29TSRYwbyojOG6DZ3pQmiIh 5NEHO4qY7eTpp+h+Rv84LHGiBc1focWGK9RoINyvKMaqmNknEGDNnZhTTg6RPbQdu9fd 2ppdurIIrXO21N3VeEgOsC7w/sfBuHseoyHlZsOC21XSWSw2YyToXd5b+Mcrx6oibrcx TL+jCyXCMnvOkbCy7K5XGeWE8RFmbyzLyjTPZ2PjtcMaqoOiIlVgHTdzKynBs7eF86Nj ps9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IxpvB9UW; 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=fail (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 n6si1066822ejz.524.2020.08.20.05.19.07; Thu, 20 Aug 2020 05:19:31 -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=@kernel.org header.s=default header.b=IxpvB9UW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730314AbgHTMP4 (ORCPT + 99 others); Thu, 20 Aug 2020 08:15:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:40842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730280AbgHTJ5K (ORCPT ); Thu, 20 Aug 2020 05:57:10 -0400 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 65BB320855; Thu, 20 Aug 2020 09:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597917430; bh=xGxUnHsluFxwU65xYpb4LdNQ2JLGua3ff7qVUmlepgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IxpvB9UW5lkINIpol7ju2c56xtDbzkptjSo0AphJctj3N1XhHStt/0MyBsduXKtSH t6KKXGQ57fU+L1mBHIs7UO7dxHUrsOQy3u/osnLJw0zVbIG+U/01LumMqdUjqsvzwi f6hJiIi3/3k5pAMNRTeJwW0ZP3el+AasDEIE18Mg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Woojung.Huh@microchip.com" , Johan Hovold , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 028/212] net: lan78xx: fix transfer-buffer memory leak Date: Thu, 20 Aug 2020 11:20:01 +0200 Message-Id: <20200820091603.767240801@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091602.251285210@linuxfoundation.org> References: <20200820091602.251285210@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: Johan Hovold [ Upstream commit 63634aa679ba8b5e306ad0727120309ae6ba8a8e ] The interrupt URB transfer-buffer was never freed on disconnect or after probe errors. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Cc: Woojung.Huh@microchip.com Signed-off-by: Johan Hovold Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/usb/lan78xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index fd144a513e1fe..7e57aabe95545 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -3421,6 +3421,7 @@ static int lan78xx_probe(struct usb_interface *intf, usb_fill_int_urb(dev->urb_intr, dev->udev, dev->pipe_intr, buf, maxp, intr_complete, dev, period); + dev->urb_intr->transfer_flags |= URB_FREE_BUFFER; } } -- 2.25.1