From: Oliver Neukum <oneukum@suse.com>
To: Romain Izard <romain.izard.pro@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: usb: cdc_acm: Do not leak URB buffers
Date: Mon, 24 Sep 2018 13:28:38 +0200 [thread overview]
Message-ID: <1537788518.22022.6.camel@suse.com> (raw)
On Do, 2018-09-20 at 16:49 +0200, Romain Izard wrote:
> When the ACM TTY port is disconnected, the URBs it uses must be killed, and
> then the buffers must be freed. Unfortunately a previous refactor removed
> the code freeing the buffers because it looked extremely similar to the
> code killing the URBs.
>
> As a result, there were many new leaks for each plug/unplug cycle of a
> CDC-ACM device, that were detected by kmemleak.
>
> Restore the missing code, and the memory leak is removed.
>
> Fixes: ba8c931ded8d ("cdc-acm: refactor killing urbs")
> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
WARNING: multiple messages have this Message-ID (diff)
From: Oliver Neukum <oneukum@suse.com>
To: Romain Izard <romain.izard.pro@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: cdc_acm: Do not leak URB buffers
Date: Mon, 24 Sep 2018 13:28:38 +0200 [thread overview]
Message-ID: <1537788518.22022.6.camel@suse.com> (raw)
In-Reply-To: <20180920144904.24911-1-romain.izard.pro@gmail.com>
On Do, 2018-09-20 at 16:49 +0200, Romain Izard wrote:
> When the ACM TTY port is disconnected, the URBs it uses must be killed, and
> then the buffers must be freed. Unfortunately a previous refactor removed
> the code freeing the buffers because it looked extremely similar to the
> code killing the URBs.
>
> As a result, there were many new leaks for each plug/unplug cycle of a
> CDC-ACM device, that were detected by kmemleak.
>
> Restore the missing code, and the memory leak is removed.
>
> Fixes: ba8c931ded8d ("cdc-acm: refactor killing urbs")
> Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
next reply other threads:[~2018-09-24 11:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 11:28 Oliver Neukum [this message]
2018-09-24 11:28 ` [PATCH] usb: cdc_acm: Do not leak URB buffers Oliver Neukum
-- strict thread matches above, loose matches on Subject: below --
2018-09-24 11:28 Oliver Neukum
2018-09-24 11:28 ` [PATCH] " Oliver Neukum
2018-09-24 8:20 Romain Izard
2018-09-24 8:20 ` [PATCH] " Romain Izard
2018-09-21 13:18 Oliver Neukum
2018-09-21 13:18 ` [PATCH] " Oliver Neukum
2018-09-20 14:49 Romain Izard
2018-09-20 14:49 ` [PATCH] " Romain Izard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1537788518.22022.6.camel@suse.com \
--to=oneukum@suse.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=romain.izard.pro@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.