Re: [PATCH] spi/fsl-espi: fix rx_buf in fsl_espi_cmd_trans()/fsl_espi_rw_trans()

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

 



On 05/19/2014 06:22 PM, Mark Brown wrote:
> On Mon, May 19, 2014 at 05:30:24PM +0200, Valentin Longchamp wrote:
>> Or are you talking about the initial memcpy call that fills up the local buffer
>> in both rw_trans() and cmd_trans() ? And maybe your second point with the
>> scatterlists is about replacing these memcpy calls ?
> 
> We shouldn't need this copy at all and therefore there should be no need
> to make sure it is copying into an adequately sized buffer.  The only
> thing I can think that the memcpy() is for is ensuring that the data is
> sent from a physically contiguous buffer but scatter/gather should
> handle that.
> 

OK I see your point. The problem is that I currently have no time to write/test
a patch that replaces this unnecessary memcpy() to the buffer with
scatter/gather, it will have to wait a bit.

On the other hand, the patch I have sent fixes a buffer overflow with the
current implementation so it could be good to take it if I don't send another
patch with the above improvement.

Valentin
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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