Re: [PATCH 2/3] staging:iio:kfifo_buf: Fix potential buffer overflow in iio_read_first_n_kfifo

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

 



On 12/08/2011 09:17 PM, Greg KH wrote:
> On Thu, Dec 08, 2011 at 06:35:52PM +0100, Lars-Peter Clausen wrote:
>> n is the number of bytes to read, not the number of samples. So if there is
>> enough data available we will write to the userspace buffer beyond its bounds.
>> Fix this by copying n bytes maximum. Also round n down to the next multiple of
>> the sample size, so we will only read complete samples. If the buffer is too
>> small to hold at least one sample return -EINVAL.
>>
>> Also update the documentation of read_first_n to reflect the fact that 'n' is
>> supposed to be in bytes and not in samples.
>>
>> Acked-by: Jonathan Cameron <jic23@xxxxxxxxxx>
>> Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
>> ---
>>  drivers/staging/iio/buffer.h    |    2 +-
> 
> This patch no longer applies to my tree, care to refresh it and resend
> it?

Hi Greg,

I just rebased the patch on top of the current staging-next and it is
identically to this one. Could you try to re-apply it, if you still have it?
Otherwise I'll send it out again.

Thanks,
- Lars
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux