<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mtd/mtdpart.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-11-27T12:48:19Z</updated>
<entry>
<title>mtd: mtdpart: fix add_mtd_partitions error path</title>
<updated>2015-11-27T12:48:19Z</updated>
<author>
<name>Boris BREZILLON</name>
</author>
<published>2015-07-30T10:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9ac3882c96ad4d554be337d28ea202988b68b3d'/>
<id>urn:sha1:f9ac3882c96ad4d554be337d28ea202988b68b3d</id>
<content type='text'>
commit e5bae86797141e4a95e42d825f737cb36d7b8c37 upstream.

If we fail to allocate a partition structure in the middle of the partition
creation process, the already allocated partitions are never removed, which
means they are still present in the partition list and their resources are
never freed.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>mtd: mtdpart: break it as soon as we parse out the partitions</title>
<updated>2012-10-17T02:49:13Z</updated>
<author>
<name>Huang Shijie</name>
</author>
<published>2012-08-18T17:07:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6d6eb108e31288a1a1abfef69353783dd2be611'/>
<id>urn:sha1:c6d6eb108e31288a1a1abfef69353783dd2be611</id>
<content type='text'>
commit c51803ddba10d80d9f246066802c6e359cf1d44c upstream.

We may cause a memory leak when the @types has more then one parser.

Take the `default_mtd_part_types` for example. The default_mtd_part_types has
two parsers now: `cmdlinepart` and `ofpart`.

Assume the following case:
The kernel command line sets the partitions like:
	#gpmi-nand:20m(boot),20m(kernel),1g(rootfs),-(user)
But the devicetree file(such as arch/arm/boot/dts/imx28-evk.dts) also sets
the same partitions as the kernel command line does.

In the current code, the partitions parsed out by the `ofpart` will
overwrite the @pparts which has already set by the `cmdlinepart` parser,
and the the partitions parsed out by the `cmdlinepart` is missed.
A memory leak occurs.

So we should break the code as soon as we parse out the partitions,
In actually, this patch makes a priority order between the parsers.
If one parser has already parsed out the partitions successfully,
it's no need to use another parser anymore.

Signed-off-by: Huang Shijie &lt;shijie8@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>mtd: utilize `mtd_is_*()' functions</title>
<updated>2011-09-21T06:19:06Z</updated>
<author>
<name>Brian Norris</name>
</author>
<published>2011-09-21T01:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d57f40544a41fdfe90fd863b6865138c5a82f1cc'/>
<id>urn:sha1:d57f40544a41fdfe90fd863b6865138c5a82f1cc</id>
<content type='text'>
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: rename MTD_OOB_* to MTD_OPS_*</title>
<updated>2011-09-11T12:28:59Z</updated>
<author>
<name>Brian Norris</name>
</author>
<published>2011-08-31T01:45:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0612b9ddc2eeda014dd805c87c752b342d8f80f0'/>
<id>urn:sha1:0612b9ddc2eeda014dd805c87c752b342d8f80f0</id>
<content type='text'>
These modes are not necessarily for OOB only. Particularly, MTD_OOB_RAW
affected operations on in-band page data as well. To clarify these
options and to emphasize that their effect is applied per-operation, we
change the primary prefix to MTD_OPS_.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: remove put_partition_parser() from public header</title>
<updated>2011-09-11T12:02:13Z</updated>
<author>
<name>Dmitry Eremin-Solenikov</name>
</author>
<published>2011-06-23T11:26:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=953b3bd1911260b8acd8f35fa26440c1a943e59a'/>
<id>urn:sha1:953b3bd1911260b8acd8f35fa26440c1a943e59a</id>
<content type='text'>
There is no need to pollute public header with a definition private
to mtdpart.c. Move it from mtd/partitions.h to mtdpart.c

Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>mtd: hide parse_mtd_partitions</title>
<updated>2011-09-11T12:02:13Z</updated>
<author>
<name>Dmitry Eremin-Solenikov</name>
</author>
<published>2011-06-23T11:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3165f44bcd4b987cbcc694af739ab955b561e05b'/>
<id>urn:sha1:3165f44bcd4b987cbcc694af739ab955b561e05b</id>
<content type='text'>
There is no need to export parse_mtd_partitions() now , as it's fully handled
by registration functions. So move the definition to private header and
remove respective EXPORT_SYMBOL_GPL.

Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>mtd: prepare to convert of_mtd_parse_partitions to partition parser</title>
<updated>2011-09-11T12:02:10Z</updated>
<author>
<name>Dmitry Eremin-Solenikov</name>
</author>
<published>2011-05-29T17:32:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d26c87d64eff271146b40b66c7de8cfeaf956707'/>
<id>urn:sha1:d26c87d64eff271146b40b66c7de8cfeaf956707</id>
<content type='text'>
Prepare to convert of_mtd_parse_partitions() to usual partitions parser:
1) Register ofpart parser
2) Internally don't use passed device for error printing
3) Add device_node to mtd_part_parser_data struct
4) Move of_mtd_parse_partitions from __devinit to common text section
5) add ofpart to the default list of partition parsers

Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;dedekind1@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: abstract last MTD partition parser argument</title>
<updated>2011-09-11T12:02:10Z</updated>
<author>
<name>Dmitry Eremin-Solenikov</name>
</author>
<published>2011-06-10T14:18:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7975330154af17aecc167b33ca866b6b3d98918'/>
<id>urn:sha1:c7975330154af17aecc167b33ca866b6b3d98918</id>
<content type='text'>
Encapsulate last MTD partition parser argument into a separate
structure. Currently it holds only 'origin' field for RedBoot parser,
but will be extended in future to contain at least device_node for OF
devices.

Amended commentary to make kerneldoc happy

Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;dedekind1@gmail.com&gt;
</content>
</entry>
<entry>
<title>mtd: document parse_mtd_partitions</title>
<updated>2011-09-11T12:02:05Z</updated>
<author>
<name>Artem Bityutskiy</name>
</author>
<published>2011-06-08T08:42:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad274cecdbce18d13075bde3aabe5882802056de'/>
<id>urn:sha1:ad274cecdbce18d13075bde3aabe5882802056de</id>
<content type='text'>
Add a kerneldoc comment for the 'parse_mtd_partitions()' function - its
behavior has changed recently so it is good idea to have it documented.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>mtd: add a flags for partitions which should just leave smth. after them</title>
<updated>2011-09-11T12:02:04Z</updated>
<author>
<name>Dmitry Eremin-Solenikov</name>
</author>
<published>2011-06-06T14:04:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a31368bf92ef2a7da3ba379672c405bd2751df9'/>
<id>urn:sha1:1a31368bf92ef2a7da3ba379672c405bd2751df9</id>
<content type='text'>
Add support for MTDPART_OFS_RETAIN: such partitions start at the current
offset, take as much space as possible, but rain part-&gt;size bytes after
the end of the partitions for other parts. Primarily this is intended
for ts72xx arm platforms cleanup.

Artem: tweaked the patch a bit

Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
</feed>
