[<prev] [next>] [day] [month] [year] [list]
Message-ID: <trinity-9d19a383-9282-48e7-bcaf-2da48e937031-1422713009062@3capp-gmx-bs71>
Date: Sat, 31 Jan 2015 15:03:29 +0100
From: "Michael Doswald" <michael.doswald@....net>
To: "Greg KH" <greg@...ah.com>
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] 3.19-rc4: Fix race condition in i.MX serial port driver
On 31.01.2015 00:25, Greg KH 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@....net>
>> ---
>> drivers/tty/serial/imx.c | 11 ++++-------
>> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> Fails to apply to my tree :(
>
Hi,
I'm sorry, it seems I made the mistake to create the patch against 3.19-rc3 instead of rc4. I just saw that the rc4 tree already contains a patch which fixes the exact same problem (commit 42f752b3fbcfee9c27e4f6f6216e60e130ba98c8 by Dirk Behme).
Thank you for notifying me.
Regards,
Michael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists