<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/fs/ubifs, branch v2012.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/fs/ubifs?h=v2012.10</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/fs/ubifs?h=v2012.10'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2012-09-10T09:37:42Z</updated>
<entry>
<title>ubifs: Fix ubifsload when using ZLIB</title>
<updated>2012-09-10T09:37:42Z</updated>
<author>
<name>Veli-Pekka Peltola</name>
<email>veli-pekka.peltola@bluegiga.com</email>
</author>
<published>2012-09-05T15:05:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8044c1387f7f8acb2a82f64f1b087848395deb15'/>
<id>urn:sha1:8044c1387f7f8acb2a82f64f1b087848395deb15</id>
<content type='text'>
Using ZLIB compression with UBIFS fails if last data node is not a size of
UBIFS_BLOCK_SIZE (4096 bytes).

Easiest way to test this is trying to read a file smaller than 4k:
=&gt; ubifsload 41000000 /etc/fstab
Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)...
UBIFS error (pid 0): read_block: bad data node (block 0, inode 2506)
UBIFS error (pid 0): do_readpage: cannot read page 0 of inode 2506, error -22
Error reading file '/etc/fstab'
/etc/fstab not found!
exit not allowed from main input shell.
=&gt;

With this patch:

=&gt; ubifsload 41000000 /etc/fstab
Loading file '/etc/fstab' to addr 0x41000000 with size 704 (0x000002c0)...
Done
=&gt;

Signed-off-by: Veli-Pekka Peltola &lt;veli-pekka.peltola@bluegiga.com&gt;
Cc: kmpark@infradead.org
Tested-by: Andreas Bießmann &lt;andreas.devel@googlemail.com&gt;
Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>ubifs: Fix memory leak in ubifs_finddir</title>
<updated>2012-09-03T09:37:50Z</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2012-08-28T12:00:24Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=be73913b91ca1e86c7478c1ab8af7b7ba6f3e4ad'/>
<id>urn:sha1:be73913b91ca1e86c7478c1ab8af7b7ba6f3e4ad</id>
<content type='text'>
This patch fixes a memory leak in ubifs_finddir().

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: dev.ma.dma@gmail.com
</content>
</entry>
<entry>
<title>UBIFS: Improve error message when reading superblock failed</title>
<updated>2012-08-09T20:12:16Z</updated>
<author>
<name>Bernhard Walle</name>
<email>walle@corscience.de</email>
</author>
<published>2012-04-02T01:58:34Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f75325e1927398f7e18e15f186b1fc52174cc19f'/>
<id>urn:sha1:f75325e1927398f7e18e15f186b1fc52174cc19f</id>
<content type='text'>
In addition to the error message also display the error code. I had the
problem that my malloc memory was not enough (ENOMEM), and if u-boot
had displayed the error code immediately that would have saved me some
debugging.

Signed-off-by: Bernhard Walle &lt;walle@corscience.de&gt;

Use ubifs_err instead of printf.
Add "errno=%d" in output as suggested by Albert Aribaud.

Signed-off-by: Thomas Weber &lt;weber@corscience.de&gt;
</content>
</entry>
<entry>
<title>ubifs bad superblock bug</title>
<updated>2011-10-12T09:33:17Z</updated>
<author>
<name>Lars Poeschel</name>
<email>larsi@wh2.tu-dresden.de</email>
</author>
<published>2011-10-12T09:31:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=349a8d5e56db4c0b199123d31ff5c0be67a39a42'/>
<id>urn:sha1:349a8d5e56db4c0b199123d31ff5c0be67a39a42</id>
<content type='text'>
This patch fixes an issue when ubifs reads a bad superblock. Later it
tries to free memory, that was not allocated, which freezes u-boot.
This is fixed by looking for a non null pointer before free.

The message I got before u-boot freezes:
UBI: max/mean erase counter: 53/32
UBIFS: mounted UBI device 0, volume 1, name "rootfs"
UBIFS: mounted read-only
UBIFS: file system size:   49140 bytes (50319360 KiB, 0 MiB, 49140 LEBs)
UBIFS: journal size:       49 bytes (6838272 KiB, 0 MiB, 6678 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root:  0 bytes (0 KiB)
UBIFS error (pid 0): ubifs_read_node: bad node type (255 but expected 9)
UBIFS error (pid 0): ubifs_read_node: bad node at LEB 330:13104
UBIFS error (pid 0): ubifs_iget: failed to read inode 1, error -22
Error reading superblock on volume 'ubi:rootfs'!

Signed-off-by: Lars Poeschel &lt;larsi@wh2.tu-dresden.de&gt;
Cc: Kyungmin Park &lt;kmpark@infradead.org&gt;
Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>UBIFS: fix warning: format '%lX' expects type 'long unsigned int'</title>
<updated>2011-09-09T23:10:32Z</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2011-09-09T22:41:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=aaf6935b223ccf746d1504661d2c40bf73698d3b'/>
<id>urn:sha1:aaf6935b223ccf746d1504661d2c40bf73698d3b</id>
<content type='text'>
Commit 46d7274 "UBIFS: Change ubifsload to set the filesize variable"
introduced the follwing compiler warning:

ubifs.c: In function 'ubifs_load':
ubifs.c:742: warning: format '%lX' expects type 'long unsigned int', but argument 3 has type 'u32'

Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Bastian Ruppert &lt;Bastian.Ruppert@Sewerin.de&gt;
</content>
</entry>
<entry>
<title>UBIFS: Change ubifsload to set the filesize variable</title>
<updated>2011-09-09T22:04:29Z</updated>
<author>
<name>Bastian Ruppert</name>
<email>Bastian.Ruppert@Sewerin.de</email>
</author>
<published>2011-09-05T03:03:57Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=46d7274cdcacc581bd02881e0aee4bb1a73e6f3a'/>
<id>urn:sha1:46d7274cdcacc581bd02881e0aee4bb1a73e6f3a</id>
<content type='text'>
This is the same behaviour like tftp or fatload command.

Signed-off-by: Bastian Ruppert &lt;Bastian.Ruppert@Sewerin.de&gt;
CC: kmpark@infradead.org
Acked-by: Detlev Zundel &lt;dzu@denx.de&gt;
</content>
</entry>
<entry>
<title>ubifs: Fix bad free() sequence in ubifs_finddir()</title>
<updated>2011-08-19T15:21:02Z</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2011-07-28T13:27:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3267bc1b2b52a8ffd0dfda663c02c86eaab6f70d'/>
<id>urn:sha1:3267bc1b2b52a8ffd0dfda663c02c86eaab6f70d</id>
<content type='text'>
Free private_data member element before freeing file structure.
This was causing malloc to crash. Also remove unnecessary variable
assigments as file structure gets free'd as well.

Signed-off-by: Rod Boyce &lt;uboot@teamboyce.co.uk&gt;
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>UBIFS: Fix dereferencing type-punned pointer compiler warning</title>
<updated>2011-01-11T10:09:36Z</updated>
<author>
<name>Dirk Behme</name>
<email>dirk.behme@googlemail.com</email>
</author>
<published>2010-12-25T09:58:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c7b7d4550d0178dc302c808f974a7beb0f80d3e1'/>
<id>urn:sha1:c7b7d4550d0178dc302c808f974a7beb0f80d3e1</id>
<content type='text'>
Fix compiler warning

In file included from ubifs.h:2137:0,
                 from ubifs.c:26:
misc.h: In function 'ubifs_idx_key':
misc.h:263:26: warning: dereferencing type-punned pointer will break strict-aliasing rules

seen with gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50).

No functional change.

CC: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Dirk Behme &lt;dirk.behme@googlemail.com&gt;
Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>ubifs.c: BUG: Error following links</title>
<updated>2010-12-03T17:24:04Z</updated>
<author>
<name>Ricardo Ribalda Delgado</name>
<email>ricardo.ribalda@gmail.com</email>
</author>
<published>2010-12-02T14:02:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=64b68178489b6845bcf460e9c6e618cb81740faf'/>
<id>urn:sha1:64b68178489b6845bcf460e9c6e618cb81740faf</id>
<content type='text'>
The link_name variable is declared inside the if block and it is used
outside it through the name pointer.

Signed-off-by: Ricardo Ribalda Delgado &lt;ricardo.ribalda@gmail.com&gt;
Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
<entry>
<title>UBIFS: Change ubifsload to not read beyond the requested size</title>
<updated>2010-12-03T15:33:47Z</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2010-11-01T16:28:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b1a14f8a1c2e72d5c58269d0200f722d8eec19c4'/>
<id>urn:sha1:b1a14f8a1c2e72d5c58269d0200f722d8eec19c4</id>
<content type='text'>
Until now ubifsload pads the destination with 0 up to a multiple of
UBIFS_BLOCK_SIZE (4KiB) while reading a file to memory. This patch
changes this behaviour to only read to the requested length. This
is either the file length or the length/size provided as parameter
to the ubifsload command.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
</entry>
</feed>
