mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-27 05:30:56 +07:00
serial: sh-sci: Fix TX buffer mapping leak
The mapped transmit buffer is never unmapped. This leaks quite some mappings, as the mapping is done in uart_ops.startup(), i.e. every time the device is opened. Unmap the buffer on device close. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
79904420b7
commit
2e301474f1
@ -1384,6 +1384,8 @@ static void sci_tx_dma_release(struct sci_port *s, bool enable_pio)
|
||||
|
||||
s->chan_tx = NULL;
|
||||
s->cookie_tx = -EINVAL;
|
||||
dma_unmap_single(chan->device->dev, s->tx_dma_addr, UART_XMIT_SIZE,
|
||||
DMA_TO_DEVICE);
|
||||
dma_release_channel(chan);
|
||||
if (enable_pio)
|
||||
sci_start_tx(port);
|
||||
|
Loading…
Reference in New Issue
Block a user