Re: [RFC] DMA mapping error check analysis

From: Stefan Richter
Date: Mon Sep 10 2012 - 13:17:58 EST


On Sep 10 Shuah Khan wrote:
>
> > >
> > > http://linuxdriverproject.org/mediawiki/index.php/DMA_Mapping_Error_Analysis
> >
> > > File Name # of calls Status
> > > drivers/firewire/core-iso.c 1 Unmap Broken
> > > drivers/firewire/ohci.c 1 Unmap Broken
> >
> > In ohci.c, ar_context_release() takes care of cleanup.
> >
> > In core-iso.c, on failure, the callers are responsible to call
> > fw_iso_buffer_destroy() eventually. (ioctl_create_iso_context()
> > doesn't do this correctly if it's called multiple times.)
> >
>
> Thanks. I updated the page with your comments. I moved ohci.c to Good
> status and left core-iso.c in Unmap Broken in case
> ioctl_create_iso_context() case is worth fixing.

I don't see what could go wrong if ioctl_create_iso_context() is called
multiple times. But I wrote the current (= v3.5-rc1) serialization code in
it, hence am blind for mistakes which are my own. So anyboy who spots an
actual problem please describe it, or even better send a patch.

(Hmm, fw_device_op_mmap()'s fail: path is executed outside the
client->lock protected section. That might be a problem. I need to look
further into it.)
--
Stefan Richter
-=====-===-- =--= -=-=-
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/