All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: fabrice.gasnier@st.com, Jonathan.Cameron@huawei.com,
	Stable@vger.kernel.org
Subject: 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: Mon, 14 Oct 2019 22:55:16 -0400	[thread overview]
Message-ID: <20191015025516.GI31224@sasha-vm> (raw)
In-Reply-To: <15710686967202@kroah.com>

On Mon, Oct 14, 2019 at 05:58:16PM +0200, gregkh@linuxfoundation.org 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@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From dcb10920179ab74caf88a6f2afadecfc2743b910 Mon Sep 17 00:00:00 2001
>From: Fabrice Gasnier <fabrice.gasnier@st.com>
>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@st.com>
>Cc: <Stable@vger.kernel.org>
>Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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.

-- 
Thanks,
Sasha

  reply	other threads:[~2019-10-15  3:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-14 15:58 FAILED: patch "[PATCH] iio: adc: stm32-adc: fix a race when using several adcs with" failed to apply to 4.19-stable tree gregkh
2019-10-15  2:55 ` Sasha Levin [this message]
2019-10-16 13:50   ` Fabrice Gasnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191015025516.GI31224@sasha-vm \
    --to=sashal@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Stable@vger.kernel.org \
    --cc=fabrice.gasnier@st.com \
    --cc=gregkh@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.