All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.de>
To: Florian Mickler <florian@mickler.org>
Cc: "Roedel, Joerg" <Joerg.Roedel@amd.com>,
	"Greg Kroah-Hartman" <greg@kroah.com>,
	"janne-dvb@grunau.be" <janne-dvb@grunau.be>,
	"g.marco@freenet.de" <g.marco@freenet.de>,
	"tskd2@yahoo.co.jp" <tskd2@yahoo.co.jp>,
	"liplianin@me.by" <liplianin@me.by>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"pb@linuxtv.org" <pb@linuxtv.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"max@veneto.com" <max@veneto.com>,
	"mchehab@infradead.org" <mchehab@infradead.org>,
	"aet@rasterburn.org" <aet@rasterburn.org>,
	"mkrufky@linuxtv.org" <mkrufky@linuxtv.org>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	"js@linuxtv.org" <js@linuxtv.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Andy Walls <awalls@md.metrocast.net>,
	"nick@nick-andrew.net" <nick@nick-andrew.net>
Subject: Re: [PATCH 0/6] get rid of on-stack dma buffers
Date: Tue, 22 Mar 2011 14:12:46 +0100	[thread overview]
Message-ID: <201103221412.46507.oneukum@suse.de> (raw)
In-Reply-To: <AANLkTimXobrwc-XHgoVN1dD5NCTde64dykbyvtJMo229@mail.gmail.com>

Am Dienstag, 22. März 2011, 14:08:17 schrieb Florian Mickler:
> Am 22.03.2011 12:10 schrieb "Roedel, Joerg" <Joerg.Roedel@amd.com>:
> >
> > On Mon, Mar 21, 2011 at 05:03:15PM -0400, Florian Mickler wrote:
> > > I guess (not verified), that the dma api takes sufficient precautions
> > > to abort the dma transfer if a timeout happens.  So freeing _should_
> > > not be an issue. (At least, I would expect big fat warnings everywhere
> > > if that were the case)
> >
> > Freeing is very well an issue. All you can expect from the DMA-API is to
> > give you a valid DMA handle for your device. But it can not prevent that
> > a device uses this handle after you returned it. You need to make sure
> > yourself that any pending DMA is canceled before calling kfree().
> 
> Does usb_control_msg do this? It waits for completion but takes also a
> timeout parameter. I will recheck this once I'm home.

It uses usb_start_wait_urb() which upon a timeout kills the URB. The
buffer is unused after usb_control_msg() returns.

	HTH
		Oliver

  parent reply	other threads:[~2011-03-22 13:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 18:33 [PATCH 0/6] get rid of on-stack dma buffers Florian Mickler
2011-03-21 18:33 ` [PATCH 1/6] [media] a800: " Florian Mickler
2011-03-21 18:33 ` [PATCH 2/6 v2] [media] vp7045: " Florian Mickler
2011-03-21 18:33 ` [PATCH 3/6] [media] friio: " Florian Mickler
2011-03-21 18:33 ` [PATCH 4/6] [media] dw2102: get rid of on-stack dma buffer Florian Mickler
2011-03-21 18:33 ` [PATCH 5/6] [media] m920x: get rid of on-stack dma buffers Florian Mickler
2011-03-21 18:33 ` [PATCH 6/6] [media] opera1: get rid of on-stack dma buffer Florian Mickler
2011-03-21 19:26 ` [PATCH 0/6] get rid of on-stack dma buffers Andy Walls
2011-03-21 21:03   ` Florian Mickler
2011-03-22 10:44     ` Roedel, Joerg
     [not found]       ` <AANLkTimXobrwc-XHgoVN1dD5NCTde64dykbyvtJMo229@mail.gmail.com>
2011-03-22 13:12         ` Oliver Neukum [this message]
2011-03-22 14:27       ` Florian Mickler
2011-03-22 10:59     ` Jiri Kosina
2011-03-22 12:33       ` Johannes Stezenbach
2011-03-22 13:35     ` James Bottomley
2011-03-22 14:02       ` Florian Mickler
2011-03-22 20:15       ` David Miller

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=201103221412.46507.oneukum@suse.de \
    --to=oneukum@suse.de \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=Joerg.Roedel@amd.com \
    --cc=aet@rasterburn.org \
    --cc=awalls@md.metrocast.net \
    --cc=florian@mickler.org \
    --cc=g.marco@freenet.de \
    --cc=greg@kroah.com \
    --cc=janne-dvb@grunau.be \
    --cc=js@linuxtv.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=liplianin@me.by \
    --cc=max@veneto.com \
    --cc=mchehab@infradead.org \
    --cc=mkrufky@linuxtv.org \
    --cc=nick@nick-andrew.net \
    --cc=pb@linuxtv.org \
    --cc=rjw@sisk.pl \
    --cc=tskd2@yahoo.co.jp \
    /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.