Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2025536pxa; Mon, 3 Aug 2020 05:42:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV1gDWYgfXIXcmx+daHYVI0n/m3rjWB/OiheUGA9nyHuBw2m+Opk4//PnmEy7NfaH5XALg X-Received: by 2002:a50:fb10:: with SMTP id d16mr15701831edq.134.1596458563407; Mon, 03 Aug 2020 05:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596458563; cv=none; d=google.com; s=arc-20160816; b=n0LaUU1ifo2qHm6Gl36bgqdcSdsKEgbcqblRNs+lDXn43GAKFWZ/faI85O4o9z3HAc GHBIeo1cF4/p7LdYg7og4dkZCg921SWIZz+aTJPbxEHS17sm1nu/mn/1TzWj/fqvCQO+ Eb5IcdA8d9rtG//H9DizdADeEPQ5bwLOYLZAiR6lExG32hrQAGGeen4K3c8bjva+Ew/T b1bCOa+Bv3zq0UiCXbDnmJr07ALIBhrGcQ105bcGwHz6sXkzLmLe0fe+ylFEJrlYKIro fhWQm/PEYCX+atrfpgm0TwPFEle2om2vCI+8gO5eMfZdksXFUt7OE5Xq15Q5IpajOUmK q1zA== 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=GIhZf6NwkeqIYfIOmUYwG/EFq9/OewVbx0dec3Ks0dI=; b=jdnATVX49qwmRHPmtwoF+uoeHX4927NgQyqL9yyoHasKYwD9QH0ygDXWShesE2d05A VdZrhAtzysH9S84rk6MQRLwfH4z3ngK3wqNrd2aJRVMryHMiiseQ/+dvH/ljbEOONyPD yKDEfTbqQDh/OrokMPFCFl/QA0ybjEc6tzPAMnpZ8t76/nRg5Q+TuPka/Tmr05MWYerS MU9j/gORi/kc8eHf5xm6tYxwpNjHjMV+AtPttDZIZyKKpH9WGH0Lyxrp96sY1e0gRbMF FrDrvLxJSWF4AIFEcCe2XFG2IDJkecN3bkaApxskqoMgkk5SjSCirNbeBgp6h1P6MdUJ 64zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rUlIB0u4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si745505ejb.720.2020.08.03.05.42.20; Mon, 03 Aug 2020 05:42:43 -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=rUlIB0u4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729283AbgHCMcQ (ORCPT + 99 others); Mon, 3 Aug 2020 08:32:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:60004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728460AbgHCMcJ (ORCPT ); Mon, 3 Aug 2020 08:32:09 -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 ABAF12076B; Mon, 3 Aug 2020 12:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596457928; bh=LZWwTvS0tp1gdoXEyc79W/d6yllJPiT86ElTRyUHeQY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rUlIB0u4sryH/Y3G4t7boTSEc8XWNe6T1fT3z510RnY5KnGs/JeBEO+xc7PdmWD7C +Mj3ECHsqQ1nTP3LZusUYvPkVgT/8fyCsiUBzrRwUOgb36RUWL3vL2EUHPkN6LRmu2 zKZANGXT7xec81YxAecM+vy+fRMYcf4YhwUCj8pQ= 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.19 33/56] net: lan78xx: fix transfer-buffer memory leak Date: Mon, 3 Aug 2020 14:19:48 +0200 Message-Id: <20200803121851.938595494@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200803121850.306734207@linuxfoundation.org> References: <20200803121850.306734207@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 2dff233814ea5..d198f36785a46 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -3815,6 +3815,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