<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mtd/ubi/fastmap.c, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-11-14T18:10:25Z</updated>
<entry>
<title>UBI: add missing kmem_cache_free() in process_pool_aeb error path</title>
<updated>2014-11-14T18:10:25Z</updated>
<author>
<name>Richard Genoud</name>
</author>
<published>2014-09-09T12:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42d5787d0b80f35448c4cd860101f2dc125a49f9'/>
<id>urn:sha1:42d5787d0b80f35448c4cd860101f2dc125a49f9</id>
<content type='text'>
commit 1bf1890e86869032099b539bc83b098be12fc5a7 upstream.

I ran into this error after a ubiupdatevol, because I forgot to backport
e9110361a9a4 UBI: fix the volumes tree sorting criteria.

UBI error: process_pool_aeb: orphaned volume in fastmap pool
UBI error: ubi_scan_fastmap: Attach by fastmap failed, doing a full scan!
kmem_cache_destroy ubi_ainf_peb_slab: Slab cache still has objects
CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.18-00053-gf05cac8dbf85 #1
[&lt;c000d298&gt;] (unwind_backtrace) from [&lt;c000baa8&gt;] (show_stack+0x10/0x14)
[&lt;c000baa8&gt;] (show_stack) from [&lt;c01b7a68&gt;] (destroy_ai+0x230/0x244)
[&lt;c01b7a68&gt;] (destroy_ai) from [&lt;c01b8fd4&gt;] (ubi_attach+0x98/0x1ec)
[&lt;c01b8fd4&gt;] (ubi_attach) from [&lt;c01ade90&gt;] (ubi_attach_mtd_dev+0x2b8/0x868)
[&lt;c01ade90&gt;] (ubi_attach_mtd_dev) from [&lt;c038b510&gt;] (ubi_init+0x1dc/0x2ac)
[&lt;c038b510&gt;] (ubi_init) from [&lt;c0008860&gt;] (do_one_initcall+0x94/0x140)
[&lt;c0008860&gt;] (do_one_initcall) from [&lt;c037aadc&gt;] (kernel_init_freeable+0xe8/0x1b0)
[&lt;c037aadc&gt;] (kernel_init_freeable) from [&lt;c02730ac&gt;] (kernel_init+0x8/0xe4)
[&lt;c02730ac&gt;] (kernel_init) from [&lt;c00093f0&gt;] (ret_from_fork+0x14/0x24)
UBI: scanning is finished

Freeing the cache in the error path fixes the Slab error.

Tested on at91sam9g35 (3.14.18+fastmap backports)

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>UBI: fastmap: do not miss bit-flips</title>
<updated>2014-07-16T05:32:00Z</updated>
<author>
<name>Brian Norris</name>
</author>
<published>2014-05-21T05:35:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44305ebde243a7cce2c592cc89afe5041d8bf884'/>
<id>urn:sha1:44305ebde243a7cce2c592cc89afe5041d8bf884</id>
<content type='text'>
The return value from 'ubi_io_read_ec_hdr()' was stored in 'err', not in 'ret'.
This fix makes sure Fastmap-enabled UBI does not miss bit-flip while reading EC
headers, events and scrubs the affected PEBs.

This issue was reported by Coverity Scan.

Artem: improved the commit message.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix the volumes tree sorting criteria</title>
<updated>2014-07-01T06:23:03Z</updated>
<author>
<name>Heiko Schocher</name>
</author>
<published>2014-06-24T07:25:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e9110361a9a4e258b072b14bd44eb78cf11453cb'/>
<id>urn:sha1:e9110361a9a4e258b072b14bd44eb78cf11453cb</id>
<content type='text'>
Commig "604b592 UBI: fix rb_tree node comparison in add_map"
broke fastmap backward compatibility and older fastmap images
cannot be mounted anymore. The reason is that it changes the
volumes RB-tree sorting criteria. This patch fixes the problem.

Artem: re-write the commit message

Signed-off-by: Heiko Schocher &lt;hs@denx.de&gt;
Acked-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix rb_tree node comparison in add_map</title>
<updated>2014-05-13T10:47:23Z</updated>
<author>
<name>Mike Snitzer</name>
</author>
<published>2014-03-21T19:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=604b592e6fd3c98f21435e1181ba7723ffc24715'/>
<id>urn:sha1:604b592e6fd3c98f21435e1181ba7723ffc24715</id>
<content type='text'>
The comparisons used in add_vol() shouldn't be identical.  Pretty sure
the following is correct but it is completely untested.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Acked-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: fix some use after free bugs</title>
<updated>2014-02-04T07:44:30Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2014-01-29T13:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5547fec74a566e1f5e00a937b9a367f7c6a94a8b'/>
<id>urn:sha1:5547fec74a566e1f5e00a937b9a367f7c6a94a8b</id>
<content type='text'>
Move the kmem_cache_free() calls down a couple lines.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: Add some asserts to ubi_attach_fastmap()</title>
<updated>2013-10-03T16:42:51Z</updated>
<author>
<name>Richard Weinberger</name>
</author>
<published>2013-09-28T13:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae0d146955665411a6d4cea5e0893429cfc52807'/>
<id>urn:sha1:ae0d146955665411a6d4cea5e0893429cfc52807</id>
<content type='text'>
Add more paranioa asserts to make it easier to detect
implementation errors.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: Fix memory leak in ubi_attach_fastmap() error path</title>
<updated>2013-10-03T16:42:50Z</updated>
<author>
<name>Richard Weinberger</name>
</author>
<published>2013-09-28T13:55:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe24c6e5f51ec5ea42d432f67618a084047a23ed'/>
<id>urn:sha1:fe24c6e5f51ec5ea42d432f67618a084047a23ed</id>
<content type='text'>
On error we have to free all three temporary lists.

Reported-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: fastmap: fix backward compatibility with image_seq</title>
<updated>2013-10-03T16:42:50Z</updated>
<author>
<name>Richard Genoud</name>
</author>
<published>2013-09-28T13:55:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c22301ad4fa0f4cf71e9c877d072e6f07a0bf682'/>
<id>urn:sha1:c22301ad4fa0f4cf71e9c877d072e6f07a0bf682</id>
<content type='text'>
Some old UBI implementations (e.g. U-Boot) have not implemented the image
sequence feature.
So, when erase blocks are written, the image sequence in the ec header
is lost (set to zero).
UBI scan_all() takes this case into account (commits
32bc4820287a1a03982979515949e8ea56eac641 and
2eadaad67b2b6bd132eda105128d2d466298b8e3)

But fastmap scan functions (ubi_scan_fastmap() and scan_pool()) didn't.

This patch fixes the issue.

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: Fix error path in scan_pool()</title>
<updated>2013-10-03T16:42:49Z</updated>
<author>
<name>Richard Weinberger</name>
</author>
<published>2013-09-28T13:55:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f240dca8f2fdf11d52a7bacd867e274c3b21a7d3'/>
<id>urn:sha1:f240dca8f2fdf11d52a7bacd867e274c3b21a7d3</id>
<content type='text'>
We have to set "ret", not "err" in case of an error.

Reported-and-tested-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: Fix invalidate_fastmap()</title>
<updated>2013-08-20T14:53:25Z</updated>
<author>
<name>Richard Weinberger</name>
</author>
<published>2013-08-19T20:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8930fa500f55215f0211db9b78255e727ac3f282'/>
<id>urn:sha1:8930fa500f55215f0211db9b78255e727ac3f282</id>
<content type='text'>
Onging tests uncovered that invalidate_fastmap() is broken.
It must not call ubi_wl_put_fm_peb() because all PEBs used
by the old fastmap have already been put back.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
</feed>
