From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org, linux-media@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <balbi@ti.com>,
Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Subject: Re: [PATCH] usb: hcd: get/put device and hcd for hcd_buffers()
Date: Sat, 6 Dec 2014 00:23:27 +0100 [thread overview]
Message-ID: <20141205232327.GB4854@linutronix.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1412051543510.1032-100000@iolanthe.rowland.org>
* Alan Stern | 2014-12-05 16:21:02 [-0500]:
>On Fri, 5 Dec 2014, Sebastian Andrzej Siewior wrote:
>> So instead, I hold the device struct in the HCD and the HCD struct on
>> every USB-buf-alloc. That means after a disconnect we still have a
>> refcount on usb_hcd and device and it will be cleaned "later" once the
>> last USB-buffer is released.
>
>This is not a valid solution. Notice that your _hcd_buffer_free still
>dereferences hcd->driver; that will not point to anything useful if you
>rmmod the HCD.
Hmm. You're right, that one is gone.
>Also, you neglected to move the calls to hcd_buffer_destroy from
>usb_remove_hcd to hcd_release.
I add them, I didn't move them.
>On the whole, it would be easier if the UVC driver could release its
>coherent DMA buffers during the disconnect callback. If that's not
>feasible we'll have to find some other solution.
I had one patch doing that. Let me grab it out on Monday.
>Alan Stern
>
Sebastian
next prev parent reply other threads:[~2014-12-05 23:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 20:03 [PATCH] usb: hcd: get/put device and hcd for hcd_buffers() Sebastian Andrzej Siewior
2014-12-05 21:19 ` Greg Kroah-Hartman
2014-12-05 23:13 ` Sebastian Andrzej Siewior
2014-12-06 0:37 ` Greg Kroah-Hartman
2014-12-08 9:44 ` David Laight
2014-12-09 15:24 ` 'Greg Kroah-Hartman'
2014-12-09 16:01 ` Sebastian Andrzej Siewior
2014-12-09 16:54 ` 'Greg Kroah-Hartman'
2014-12-10 18:25 ` Sebastian Andrzej Siewior
2014-12-05 21:21 ` Alan Stern
2014-12-05 23:23 ` Sebastian Andrzej Siewior [this message]
2014-12-08 8:43 ` Sebastian Andrzej Siewior
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=20141205232327.GB4854@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox