[PATCH] physmap: Fix leak of memory returned by parse_mtd_partitions
David Woodhouse
dwmw2 at infradead.org
Tue Nov 18 08:57:27 EST 2008
On Wed, 2008-11-12 at 11:08 -0500, Mike Frysinger wrote:
> i wonder why we duplicate this same code block in so many places. and
> why does every driver have to declare its own list of parsers ? cant
> we unify all of these in one place ?
Well, most boards only really want _one_ partition type; maybe two. And
the probes can be quite expensive and have false positives, so we don't
want to be doing all the probes for all devices.
It might make sense to just pass a bitmask indicating which partition
probes to use. Assuming we can agree on an ordering, that is :)
Another complication is that some boards have registered the whole
device first, while others have just registered the partitions.
I suspect it might be better to take the simple bug-fix approach for
now, given that we are planning a revamp of the MTD core API anyway --
we can redo partitions properly at the point, so they aren't just an
evil hack.
--
David Woodhouse Open Source Technology Centre
David.Woodhouse at intel.com Intel Corporation
More information about the linux-mtd
mailing list