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: <8b2623680c557828814dda4602d29c5cc5d889d8.camel@decadent.org.uk>
Date:   Thu, 21 May 2020 21:28:10 +0100
From:   Ben Hutchings <ben@...adent.org.uk>
To:     Marion & Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc:     akpm@...ux-foundation.org, Denis Kirjanov <kda@...ux-powerpc.org>,
        YueHaibing <yuehaibing@...wei.com>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Lubomir Rintel <lkundrak@...sk>
Subject: Re: [PATCH 3.16 35/99] pxa168fb: Fix the function used to release
 some memory in an error handling path

On Thu, 2020-05-21 at 16:31 +0200, Marion & Christophe JAILLET wrote:
> Hi,
> 
> sorry for the noise, I have messed up my 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ usage.
> I thought I was looking at the 3.16.83 branch, but I was not.
> 
> The patch looks good to me.

Thanks for reviewing,

Ben.

> CJ
> 
> Le 21/05/2020 à 16:09, Marion & Christophe JAILLET a écrit :
> > Hi,
> > 
> > I don't think that this one is applicable to 3.16.x
> > 
> > The remove function and the error handling path of the probe function 
> > both use 'dma_free_wc'.
> > I've not look in details, but it looks consistent and the patch would 
> > not apply as-is anyway.
> > 
> > just my 2c.
> > 
> > CJ
> > 
> > Le 20/05/2020 à 16:14, Ben Hutchings a écrit :
> > > 3.16.84-rc1 review patch.  If anyone has any objections, please let 
> > > me know.
> > > 
> > > ------------------
> > > 
> > > From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> > > 
> > > commit 3c911fe799d1c338d94b78e7182ad452c37af897 upstream.
> > > 
> > > In the probe function, some resources are allocated using 
> > > 'dma_alloc_wc()',
> > > they should be released with 'dma_free_wc()', not 'dma_free_coherent()'.
> > > 
> > > We already use 'dma_free_wc()' in the remove function, but not in the
> > > error handling path of the probe function.
> > > 
> > > Also, remove a useless 'PAGE_ALIGN()'. 'info->fix.smem_len' is already
> > > PAGE_ALIGNed.
> > > 
> > > Fixes: 638772c7553f ("fb: add support of LCD display controller on 
> > > pxa168/910 (base layer)")
> > > Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> > > Reviewed-by: Lubomir Rintel <lkundrak@...sk>
> > > CC: YueHaibing <yuehaibing@...wei.com>
> > > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> > > Link: 
> > > https://patchwork.freedesktop.org/patch/msgid/20190831100024.3248-1-christophe.jaillet@wanadoo.fr
> > > [bwh: Backported to 3.16: Use dma_free_writecombine().]
> > > Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
> > > ---
> > >   drivers/video/fbdev/pxa168fb.c | 6 +++---
> > >   1 file changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > --- a/drivers/video/fbdev/pxa168fb.c
> > > +++ b/drivers/video/fbdev/pxa168fb.c
> > > @@ -772,8 +772,8 @@ failed_free_cmap:
> > >   failed_free_clk:
> > >       clk_disable(fbi->clk);
> > >   failed_free_fbmem:
> > > -    dma_free_coherent(fbi->dev, info->fix.smem_len,
> > > -            info->screen_base, fbi->fb_start_dma);
> > > +    dma_free_writecombine(fbi->dev, info->fix.smem_len,
> > > +                  info->screen_base, fbi->fb_start_dma);
> > >   failed_free_info:
> > >       kfree(info);
> > >   failed_put_clk:
> > > @@ -809,7 +809,7 @@ static int pxa168fb_remove(struct platfo
> > >         irq = platform_get_irq(pdev, 0);
> > >   -    dma_free_writecombine(fbi->dev, PAGE_ALIGN(info->fix.smem_len),
> > > +    dma_free_writecombine(fbi->dev, info->fix.smem_len,
> > >                   info->screen_base, info->fix.smem_start);
> > >         clk_disable(fbi->clk);
> > > 
-- 
Ben Hutchings
Reality is just a crutch for people who can't handle science fiction.



Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ