lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200817143800.701262067@linuxfoundation.org>
Date:   Mon, 17 Aug 2020 17:15:00 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Jonathan Corbet <corbet@....net>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Jani Nikula <jani.nikula@...el.com>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Eric Miao <eric.miao@...vell.com>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.4 099/270] video: pxafb: Fix the function used to balance a dma_alloc_coherent() call

From: Christophe JAILLET <christophe.jaillet@...adoo.fr>

[ Upstream commit 499a2c41b954518c372873202d5e7714e22010c4 ]

'dma_alloc_coherent()' must be balanced by a call to 'dma_free_coherent()'
not 'dma_free_wc()'.
The correct dma_free_ function is already used in the error handling path
of the probe function.

Fixes: 77e196752bdd ("[ARM] pxafb: allow video memory size to be configurable")
Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Sumit Semwal <sumit.semwal@...aro.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Cc: Jonathan Corbet <corbet@....net>
Cc: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Jani Nikula <jani.nikula@...el.com>
cc: Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
Cc: Eric Miao <eric.miao@...vell.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200429084505.108897-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
 drivers/video/fbdev/pxafb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index f70c9f79622ec..27635926cea3f 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -2425,8 +2425,8 @@ static int pxafb_remove(struct platform_device *dev)
 
 	free_pages_exact(fbi->video_mem, fbi->video_mem_size);
 
-	dma_free_wc(&dev->dev, fbi->dma_buff_size, fbi->dma_buff,
-		    fbi->dma_buff_phys);
+	dma_free_coherent(&dev->dev, fbi->dma_buff_size, fbi->dma_buff,
+			  fbi->dma_buff_phys);
 
 	return 0;
 }
-- 
2.25.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ