diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-09-08 17:03:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-15 12:35:49 +0200 |
commit | 33ddca08bf9d68086e3e9ad6bef06ce881777894 (patch) | |
tree | 287b2a273a775a9a5b417c5eaa675d3b52f585e2 /drivers/tty | |
parent | serial: max310x: Set IRQF_TRIGGER_FALLING flag when dev.of_node is not NULL (diff) | |
download | linux-33ddca08bf9d68086e3e9ad6bef06ce881777894.tar.xz linux-33ddca08bf9d68086e3e9ad6bef06ce881777894.zip |
tty: serial: fsl_lpuart: use GFP_ATOMIC under spin lock
The function lpuart_start_rx_dma() is called from several
places, in some of which, such as lpuart_startup(), a lock
be held here, so we should use GFP_ATOMIC when a lock is held.
Fixes: 5887ad43ee02 ("tty: serial: fsl_lpuart: Use cyclic DMA for Rx")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index b21f3e541714..de9d5107c00a 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -852,7 +852,7 @@ static inline int lpuart_start_rx_dma(struct lpuart_port *sport) if (sport->rx_dma_rng_buf_len < 16) sport->rx_dma_rng_buf_len = 16; - ring->buf = kmalloc(sport->rx_dma_rng_buf_len, GFP_KERNEL); + ring->buf = kmalloc(sport->rx_dma_rng_buf_len, GFP_ATOMIC); if (!ring->buf) { dev_err(sport->port.dev, "Ring buf alloc failed\n"); return -ENOMEM; |