Re: spi: race in spi_finalize_current_message starting queue_kthread_work before the message is unmapped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux