* [PATCH] net: can: esd_usb2: fix memory leak on disconnect
@ 2014-10-10 20:31 Alexey Khoroshilov
2014-10-13 8:05 ` Matthias Fuchs
2014-10-18 16:48 ` Marc Kleine-Budde
0 siblings, 2 replies; 3+ messages in thread
From: Alexey Khoroshilov @ 2014-10-10 20:31 UTC (permalink / raw)
To: Matthias Fuchs, Wolfgang Grandegger, Marc Kleine-Budde
Cc: Alexey Khoroshilov, linux-can, netdev, linux-kernel, ldv-project
It seems struct esd_usb2 dev is not deallocated on disconnect.
The patch adds the deallocation.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
drivers/net/can/usb/esd_usb2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c
index b7c9e8b11460..7a90075529c3 100644
--- a/drivers/net/can/usb/esd_usb2.c
+++ b/drivers/net/can/usb/esd_usb2.c
@@ -1143,6 +1143,7 @@ static void esd_usb2_disconnect(struct usb_interface *intf)
}
}
unlink_all_urbs(dev);
+ kfree(dev);
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: can: esd_usb2: fix memory leak on disconnect
2014-10-10 20:31 [PATCH] net: can: esd_usb2: fix memory leak on disconnect Alexey Khoroshilov
@ 2014-10-13 8:05 ` Matthias Fuchs
2014-10-18 16:48 ` Marc Kleine-Budde
1 sibling, 0 replies; 3+ messages in thread
From: Matthias Fuchs @ 2014-10-13 8:05 UTC (permalink / raw)
To: Alexey Khoroshilov, Wolfgang Grandegger, Marc Kleine-Budde
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org
Hi Alexey,
On 10/10/2014 10:31 PM, Alexey Khoroshilov wrote:
> It seems struct esd_usb2 dev is not deallocated on disconnect.
>
> The patch adds the deallocation.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> ---
> drivers/net/can/usb/esd_usb2.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c
> index b7c9e8b11460..7a90075529c3 100644
> --- a/drivers/net/can/usb/esd_usb2.c
> +++ b/drivers/net/can/usb/esd_usb2.c
> @@ -1143,6 +1143,7 @@ static void esd_usb2_disconnect(struct usb_interface *intf)
> }
> }
> unlink_all_urbs(dev);
> + kfree(dev);
> }
> }
>
>
thanks for pointing this out. Marc, can you please catch this up.
Matthias
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: can: esd_usb2: fix memory leak on disconnect
2014-10-10 20:31 [PATCH] net: can: esd_usb2: fix memory leak on disconnect Alexey Khoroshilov
2014-10-13 8:05 ` Matthias Fuchs
@ 2014-10-18 16:48 ` Marc Kleine-Budde
1 sibling, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2014-10-18 16:48 UTC (permalink / raw)
To: Alexey Khoroshilov
Cc: Matthias Fuchs, Wolfgang Grandegger, linux-can, netdev,
linux-kernel, ldv-project
On Sat, Oct 11, 2014 at 12:31:07AM +0400, Alexey Khoroshilov wrote:
> It seems struct esd_usb2 dev is not deallocated on disconnect.
>
> The patch adds the deallocation.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Applied to the can tree.
Thanks,
Marc
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-18 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10 20:31 [PATCH] net: can: esd_usb2: fix memory leak on disconnect Alexey Khoroshilov
2014-10-13 8:05 ` Matthias Fuchs
2014-10-18 16:48 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).