public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Michael Doswald <michael.doswald@gmx.net>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 3.19-rc4: Fix race condition in i.MX serial port driver
Date: Fri, 30 Jan 2015 15:25:09 -0800	[thread overview]
Message-ID: <20150130232509.GA21337@kroah.com> (raw)
In-Reply-To: <trinity-2ff5fec6-196c-4ecc-9ec2-f1b223f0ea25-1421165228466@3capp-gmx-bs70>

On Tue, Jan 13, 2015 at 05:07:08PM +0100, Michael Doswald wrote:
> Under pressure, the imx.c device driver may transfer the same data multiple
> times. 
> 
> Reason: 
> Function imx_dma_tx checks for an active DMA transfer by calling
> dmaengine_tx_status. The return value may indicate that no transfer is 
> running while the dma_tx_callback function is still being executed. In 
> this case the xmit->tail pointer may not be updated to the correct value 
> when imx_dma_tx initiates a new DMA transfer, which will result in a DMA
> transfer with the same base address as the previous one.
> 
> Patch:
> Use existing dma_is_txing variable to guard DMA transfer initiation instead
> of dmaengine_tx_status. Clear dma_is_txing at the end of the DMA callback
> function therefore extending the critical section where the port lock is
> held. Critical section extension is in line with the callback function 
> of other drivers, e.g. serial-tegra.c (tegra_uart_tx_dma_complete).
>  
>  
> Signed-off-by: Michael Doswald <michael.doswald@gmx.net>
> ---
>  drivers/tty/serial/imx.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)

Fails to apply to my tree :(


  reply	other threads:[~2015-01-30 23:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 16:07 [PATCH] 3.19-rc4: Fix race condition in i.MX serial port driver Michael Doswald
2015-01-30 23:25 ` Greg KH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-01-31 14:03 Michael Doswald

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=20150130232509.GA21337@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=michael.doswald@gmx.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox