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]
Date:	Mon, 12 Oct 2015 09:24:27 +0200 (CEST)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
cc:	Julia Lawall <Julia.Lawall@...6.fr>,
	Simon Horman <horms@...ge.net.au>,
	"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
	Magnus Damm <magnus.damm@...il.com>,
	Russell King <linux@....linux.org.uk>,
	Linux-sh list <linux-sh@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
	Andrew Lunn <andrew@...n.ch>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Jason Cooper <jason@...edaemon.net>
Subject: Re: [PATCH 3/5] ARM: shmobile: R-Mobile: add missing of_node_put



On Mon, 12 Oct 2015, Geert Uytterhoeven wrote:

> Hi Julia,
>
> On Sat, Oct 10, 2015 at 2:30 PM, Julia Lawall <Julia.Lawall@...6.fr> wrote:
> > --- a/arch/arm/mach-shmobile/pm-rmobile.c
> > +++ b/arch/arm/mach-shmobile/pm-rmobile.c
> > @@ -313,8 +313,10 @@ static int __init rmobile_add_pm_domains(void __iomem *base,
> >                 }
> >
> >                 pd = kzalloc(sizeof(*pd), GFP_KERNEL);
> > -               if (!pd)
> > +               if (!pd) {
> > +                       of_node_put(np);
> >                         return -ENOMEM;
> > +               }
>
> While technically this patch is correct, the system will be dead anyway if it
> ever goes OOM at core_initcall() time.

Maybe it would be better for the code to be correct to serve as an example
(or to avoid serving as a bad example) for others?

julia
--
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