spi: race in spi_finalize_current_message starting queue_kthread_work before the message is unmapped
Mark Brown
broonie at kernel.org
Tue May 12 09:50:53 PDT 2015
On Tue, May 12, 2015 at 02:07:21PM +0200, Martin Sperl wrote:
> On 2015-05-12 12:20, Mark Brown wrote:
> >We essentially have that; anything looking at a DMA mapped transfer had
> >better cope.
> I believe you miss my point:
No, I don't.
> a) with SPI_MASTER_MUST_ we will always allocate the buffer - we do not
In the current implementation, we can always change that in the future.
> And inside __spi_map_msg we can just add some code to create the simple
> scatter-gather mapping using a single preallocated page - so something
> along the lines (assuming that either tx_buf or rx_buf must be set):
Yes, to repeat what I said earlier I'm hoping someone with a need for
this will implement it.
> So the extra flag seems to be to be a "safer" approach and it also
> states more explicitly the needs of the driver.
I think it's easier to either have drivers handle scatterlists or not
rely on the flags for PIO and work harder if the code is looking
complicated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20150512/cd667fd2/attachment.sig>
More information about the linux-rpi-kernel
mailing list