From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com ([209.85.128.194]:35163 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751022AbdDDJgZ (ORCPT ); Tue, 4 Apr 2017 05:36:25 -0400 Date: Tue, 4 Apr 2017 11:36:21 +0200 From: Krzysztof Kozlowski To: Marek Szyprowski Cc: linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org, Sylwester Nawrocki , Bartlomiej Zolnierkiewicz , Greg Kroah-Hartman , Seung-Woo Kim , Joonyoung Shim , Inki Dae , stable@vger.kernel.org Subject: Re: [PATCH v3 2/3] serial: samsung: Add missing checks for dma_map_single failure Message-ID: <20170404093621.GA28551@kozik-book> References: <1491200468-28463-1-git-send-email-m.szyprowski@samsung.com> <1491200468-28463-2-git-send-email-m.szyprowski@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1491200468-28463-2-git-send-email-m.szyprowski@samsung.com> Sender: stable-owner@vger.kernel.org List-ID: On Mon, Apr 03, 2017 at 08:21:00AM +0200, Marek Szyprowski wrote: > 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") > CC: stable@vger.kernel.org # v4.10+ > Signed-off-by: Marek Szyprowski > Reviewed-by: Bartlomiej Zolnierkiewicz > --- > This issue was there since adding DMA support, but this patch applies cleanly > only to v4.10+ kernels due to other changes in the surrounding code. > > v3: > - moved spinlock removal to separate patch, extended commit message Thanks for the changes, looks fine. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof