From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:59646 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932157AbdERMYl (ORCPT ); Thu, 18 May 2017 08:24:41 -0400 Date: Thu, 18 May 2017 14:24:31 +0200 From: Greg Kroah-Hartman To: Krzysztof Kozlowski Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Seung-Woo Kim , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Shuah Khan Subject: Re: [PATCH 4.11 097/114] serial: samsung: Add missing checks for dma_map_single failure Message-ID: <20170518122431.GA21596@kroah.com> References: <20170518103604.736737251@linuxfoundation.org> <20170518103619.415703180@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: stable-owner@vger.kernel.org List-ID: On Thu, May 18, 2017 at 02:18:30PM +0200, Krzysztof Kozlowski wrote: > On Thu, May 18, 2017 at 12:46 PM, Greg Kroah-Hartman > wrote: > > 4.11-stable review patch. If anyone has any objections, please let me know. > > > > ------------------ > > > > From: Marek Szyprowski > > > > commit 500fcc08a32bfd54f11951ba81530775df15c474 upstream. > > > > This patch adds missing checks for dma_map_single() failure and proper error > > reporting. Although this issue was harmless on ARM architecture, it is always > > good to use the DMA mapping API in a proper way. This patch fixes the following > > DMA API debug warning: > > > > WARNING: CPU: 1 PID: 3785 at lib/dma-debug.c:1171 check_unmap+0x8a0/0xf28 > > dma-pl330 121a0000.pdma: DMA-API: device driver failed to check map error[device address=0x000000006e0f9000] [size=4096 bytes] [mapped as single] > > Modules linked in: > > CPU: 1 PID: 3785 Comm: (agetty) Tainted: G W 4.11.0-rc1-00137-g07ca963-dirty #59 > > Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) > > [] (unwind_backtrace) from [] (show_stack+0x20/0x24) > > [] (show_stack) from [] (dump_stack+0x84/0xa0) > > [] (dump_stack) from [] (__warn+0x14c/0x180) > > [] (__warn) from [] (warn_slowpath_fmt+0x48/0x50) > > [] (warn_slowpath_fmt) from [] (check_unmap+0x8a0/0xf28) > > [] (check_unmap) from [] (debug_dma_unmap_page+0x98/0xc8) > > [] (debug_dma_unmap_page) from [] (s3c24xx_serial_shutdown+0x314/0x52c) > > [] (s3c24xx_serial_shutdown) from [] (uart_port_shutdown+0x54/0x88) > > [] (uart_port_shutdown) from [] (uart_shutdown+0xd4/0x110) > > [] (uart_shutdown) from [] (uart_hangup+0x9c/0x208) > > [] (uart_hangup) from [] (__tty_hangup+0x49c/0x634) > > [] (__tty_hangup) from [] (tty_ioctl+0xc88/0x16e4) > > [] (tty_ioctl) from [] (do_vfs_ioctl+0xc4/0xd10) > > [] (do_vfs_ioctl) from [] (SyS_ioctl+0x7c/0x8c) > > [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c) > > > > Reported-by: Seung-Woo Kim > > Fixes: 62c37eedb74c8 ("serial: samsung: add dma reqest/release functions") > > Signed-off-by: Marek Szyprowski > > Reviewed-by: Bartlomiej Zolnierkiewicz > > Reviewed-by: Shuah Khan > > Signed-off-by: Greg Kroah-Hartman > > > > --- > > drivers/tty/serial/samsung.c | 31 ++++++++++++++++++++++++------- > > 1 file changed, 24 insertions(+), 7 deletions(-) > > > > --- a/drivers/tty/serial/samsung.c > > +++ b/drivers/tty/serial/samsung.c > > @@ -859,7 +859,7 @@ static void s3c24xx_serial_break_ctl(str > > static int s3c24xx_serial_request_dma(struct s3c24xx_uart_port *p) > > { > > struct s3c24xx_uart_dma *dma = p->dma; > > - unsigned long flags; > > + int ret; > > This does not compile: > http://www.krzk.eu/#/builders/5/builds/225 > It works fine in mainline because the patch 3/3 of the set was > removing the user of the flags. > > I'll send a fixup for stable. Ah, thanks, I didn't notice that on my test builds here :( greg k-h