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:	Fri, 31 Jul 2015 19:24:58 +0200
From:	Boris Brezillon <boris.brezillon@...e-electrons.com>
To:	Michal Suchanek <hramrach@...il.com>
Cc:	Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	David Woodhouse <dwmw2@...radead.org>,
	Brian Norris <computersforpeace@...il.com>,
	devicetree <devicetree@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	MTD Maling List <linux-mtd@...ts.infradead.org>
Subject: Re: [PATCH v2 5/5] mtd: ofpart: move ofpart partitions to a
 dedicated dt node

On Fri, 31 Jul 2015 18:52:01 +0200
Michal Suchanek <hramrach@...il.com> wrote:


> >
> >>               (*pparts)[i].offset = of_read_number(reg, a_cells);
> >>               (*pparts)[i].size = of_read_number(reg + a_cells, s_cells);
> >>
> >> @@ -92,15 +116,15 @@ static int parse_ofpart_partitions(struct mtd_info *master,
> >>               i++;
> >>       }
> >>
> >> -     if (!i) {
> >> -             of_node_put(pp);
> >> -             pr_err("No valid partition found on %s\n", node->full_name);
> >> -             kfree(*pparts);
> >> -             *pparts = NULL;
> >> -             return -EINVAL;
> >> -     }
> >> -
> >
> > Are you sure you can safely remove this check?
> 
> Yes. It was incomplete check to reject some partitioning schemes
> considered invalid.
> 
> Now there is stricter checking above so this can be removed.

Indeed, I was worried about resources deallocation, but this is handle
by the caller, and if nr_parts is zero the master MTD device will
be exposed.




-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
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