Re: FAILED: patch "[PATCH] iio: adc: stm32-adc: fix a race when using several adcs with" failed to apply to 4.19-stable tree

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

 



On 10/15/19 4:55 AM, Sasha Levin wrote:
> On Mon, Oct 14, 2019 at 05:58:16PM +0200, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
>>
>> The patch below does not apply to the 4.19-stable tree.
>> If someone wants it applied there, or to any other stable or longterm
>> tree, then please email the backport, including the original git commit
>> id to <stable@xxxxxxxxxxxxxxx>.
>>
>> thanks,
>>
>> greg k-h
>>
>> ------------------ original commit in Linus's tree ------------------
>>
>> From dcb10920179ab74caf88a6f2afadecfc2743b910 Mon Sep 17 00:00:00 2001
>> From: Fabrice Gasnier <fabrice.gasnier@xxxxxx>
>> Date: Tue, 17 Sep 2019 14:38:16 +0200
>> Subject: [PATCH] iio: adc: stm32-adc: fix a race when using several
>> adcs with
>> dma and irq
>>
>> End of conversion may be handled by using IRQ or DMA. There may be a
>> race when two conversions complete at the same time on several ADCs.
>> EOC can be read as 'set' for several ADCs, with:
>> - an ADC configured to use IRQs. EOCIE bit is set. The handler is
>> normally
>>  called in this case.
>> - an ADC configured to use DMA. EOCIE bit isn't set. EOC triggers the DMA
>>  request instead. It's then automatically cleared by DMA read. But the
>>  handler gets called due to status bit is temporarily set (IRQ triggered
>>  by the other ADC).
>> So both EOC status bit in CSR and EOCIE control bit must be checked
>> before invoking the interrupt handler (e.g. call ISR only for
>> IRQ-enabled ADCs).
>>
>> Fixes: 2763ea0585c9 ("iio: adc: stm32: add optional dma support")
>>
>> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@xxxxxx>
>> Cc: <Stable@xxxxxxxxxxxxxxx>
>> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> 
> It would be nice if a stable patch wouldn't depend on a massive code
> movement patch...
> 
> Anyway, I ported both to 4.19 as it was just a minor missing dependency,
> but 4.14 requires more work I'll leave to someone who knows that code
> better than me.
> 

Hi Sasha,

Many thanks for the effort to port it on 4.19. I just sent a port for
these patches on 4.14 to stable@xxxxxxxxxxxxxxx. Please let me know if
this is correct.

Best Regards,
Fabrice



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux