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] [day] [month] [year] [list]
Message-ID: <1338219259.3521.1.camel@debian>
Date:	Mon, 28 May 2012 17:34:19 +0200
From:	Emil Goode <emilgoode@...il.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	FlorianSchandinat@....de, linux-fbdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] video: bfin_adv7393fb: Fix cleanup code

Thanks Dan, I'll resend with these modifications.

Best regards, 
Emil Goode
On Mon, 2012-05-28 at 18:26 +0300, Dan Carpenter wrote:
> On Mon, May 28, 2012 at 04:40:19PM +0200, Emil Goode wrote:
> > This patch fixes the cleanup code of the bfin_adv7393_fb_probe
> > function by changing the order in which cleanup is performed
> > and by adding one label.
> > 
> 
> Could you list the actual bugs which were fixed:
> 
> 1) The resources were not freed in the order that we allocated them
>    so we call dma_free_coherent() before it was allocated.
> 2) The labels weren't in the right place which also meant that we
>    freed resources that weren't allocated.
> 3) We should free gpio_free(P_IDENT(P_PPI0_FS3)) before returning.
> 
> The new gpio_free() is more important than the added label.
> 
> Since you're changing all these, you may as well fix the label names
> as well.  The out_9 style labels suck.  The right way is to give
> them meaningful labels instead of GW-BASIC style labels.
> 
> Labels should be named after what happens when you arrive.  Some
> people name them after the start of the journey but that's a
> mistake.  It's just like the town of Chicago is still called Chicago
> even though you might goto Chicago starting from Boston.  Like this:
> 
> err_ppi:
> 	free_dma(CH_PPI);
> 	fb_dealloc_cmap(&fbdev->info.cmap);
> err_palette:
> 	kfree(fbdev->info.pseudo_palette);
> 
> regards,
> dan carpenter


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ