From: Alexey Khoroshilov <khoroshilov@ispras.ru>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
ldv-project@linuxtesting.org
Subject: Re: [PATCH] USB: input: gtco.c: fix usb_dev leak
Date: Mon, 27 Jan 2014 10:31:36 +0400 [thread overview]
Message-ID: <52E5FD48.7040208@ispras.ru> (raw)
In-Reply-To: <20140121195957.GB29615@core.coreip.homeip.net>
On 21.01.2014 23:59, Dmitry Torokhov wrote:
> On Sun, Jan 19, 2014 at 03:24:26AM +0400, Alexey Khoroshilov wrote:
>> There is usb_get_dev() in gtco_probe(), but there is no usb_put_dev()
>> anywhere in the driver.
>>
>> The patch adds usb_get_dev() to failure handling code of gtco_probe()
>> and to gtco_disconnect(().
> Hmm, I think gtco should simply not use usb_get_dev() in the first
> place.
>
> Thanks.
Dear Dmitry,
Could you please clarify why usb_get_dev() not needed here?
We store reference to usb_dev in gtco structure, so we should refcount it.
What is wrong in this reasoning?
Thanks,
Alexey
next prev parent reply other threads:[~2014-01-27 6:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-18 23:24 [PATCH] USB: input: gtco.c: fix usb_dev leak Alexey Khoroshilov
2014-01-21 19:59 ` Dmitry Torokhov
2014-01-27 6:31 ` Alexey Khoroshilov [this message]
2014-01-27 6:54 ` Dmitry Torokhov
2014-01-27 10:29 ` Alexey Khoroshilov
2014-01-27 13:17 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2014-01-27 20:10 Alexey Khoroshilov
2014-01-27 20:24 ` Dmitry Torokhov
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=52E5FD48.7040208@ispras.ru \
--to=khoroshilov@ispras.ru \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=ldv-project@linuxtesting.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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.